[Kstars-devel] SatLib

Jason Harris kstars at 30doradus.org
Sat Jul 15 01:06:58 CEST 2006


Hi Jean-Baptiste,

I have finally begun work on adding earth satellites to KStars using your 
SatLib framework.  If you don't mind, I'd like to give some feedback on the 
API to hopefully make a future version of the lib a little more usable for 
KStars.

First, a brief introduction to your library for my fellow KStars devs:

The two main functions for our purposes are:

   int SatInit(char *ObsName, double ObsLat, double ObsLong, double ObsAlt, 
char *TLE_file);
   int SatFindPosition(char *satname, double jd_start, double step, long 
number_pos, SPositionSat *pPositionSat[]);

SatInit() reads in all of the satellites' orbital data from the TLE_file and 
creates the global sat array to hold these data.  It also sets up the 
geodetic position of the observing station.

SatFindPosition() returns an array of SPositionSat structs, which basically 
encode the instantaneous Azimuth/Elevation coordinates for the named 
satellite, for a series of instants, starting at jd_start.

So, the usage pattern is to first call SatInit() and then call 
SatFindPosition() on each satellite for which you want a track.

Now, my comments:

*) Is it possible to decouple the initialization of the satellite orbital data 
from the initialization of the geographic position?  Ideally, I'd like to 
call SatInit() once when KStars starts up, and then be able to react when the 
user changes their geographic position without reading the orbital data all 
over again.  Maybe the geographic position data would make more sense as 
arguments to SatFindPosition() than SatInit() ?

*) Maybe this is just my prejudice as a C++ guy, but it seems kind of 
dangerous to have global variables with simple names like "sat".  

*) Can there be a version of SatFindPosition() that returns Equatorial 
coordinates rather than Horizontal?  This isn't a big deal; we have functions 
to do the conversion, of course.  Also, do you correct for atmospheric 
refraction in determining the elevation coordinate?

*) What are the units for the ObsAlt parameter of SatInit()?  Is it the height 
above sea level, or the distance from Earth's center?

thanks for your efforts!

Jason

On Sunday 25 September 2005 06:35, jb wrote:
> Hi all :)
>
> On a previous mail, I've told developping a C library for position
> satellites calculation.
>
> This job will be done on 8-9 October week end ;) (a good code week end)
>
> What's the aim ?
> Having a strong, fast and light C library that gives Ra & Dec of a
> satellites, by given TLE, position and time.
>
> To do what ?
> search what satelites you've seen last night, predict ISS pass on Sun or
> moon...
>
> Why not include this on Kstars code ?
> We want to share it with all other ephemerids program (cartes du
> ciel/Skycharts for example)
>
> A Little problem :
> we aren't really good programmers ;) but we'll be helped by Patrick
> Chevalley to do this.
>
> If you have any asks, hints, clue, code to do this, please send me a mail
> to this adress.
>
> Mail you soon,
>
> 					Jean-baptiste BUTET
>
>
>
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel

-- 
-------------------------------
KStars: http://edu.kde.org/kstars
Forums: http://kstars.30doradus.org


More information about the Kstars-devel mailing list