API Question What is the format of the in-Orbiter star catalogue?

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,420
Reaction score
2
Points
0
Location
Moscow
To avoid carrying large blocks of mostly redundant star position data, would like to be able to read the in-sim catalogue from C++. Is it possible and if yes, how?
 
The Star.bin file consists of number of these records:
Code:
struct StarRec {
	float lng, lat, mag;
};
 
Did the reading, but was not really satisfied with the results. First off, how are lat and lon converted to Euler angles in the orbiter's J2000 frame (the values are really strange, I suppose they are in radians)? Second, the mag field values were quite weird, ranging from -0.5 IIRC to 59000+... (For the time being, I switched to reading the star marker files instead).
 
Lat and lon are indeed in radians. Star.bin file is loaded by graphics client, so you can check for example sources of D3D7Client. Loading and converting of spherical to Cartesian coordinates on celestial sphere (vertex coordinates), as also checking magnitude against set in configuration parameters are done in CelSphere.cpp.

If you want star names, then it's better to read marker files. All the stars in Star.bin file are anonymous, and only marker file with common star names for star system contains their names.
 
Back
Top