The reason: .stc files provide a spherical polar coordinate system in the equatorial frame, while stars.dat and Celestia's internal code use rectangular coordinates in the ecliptic frame. The stars.dat file can therefore be translated directly into Celestia's internal coordinates, while a .stc entry first has to be converted to rectangular coordinates (involves a bunch of trigonometric functions), then rotated into the ecliptic frame (quaternion multiplication). It is therefore difficult and in some cases may be inmpossible to find a set of input coordinates in the .stc file that produce a given set of rectangular coordinates from .stc
Proposed solution: a new property in the .stc file that allows specifying rectangular coordinates in the ecliptic frame. I'm proposing the name EclipticXYZ for this, usage, e.g.
Code: Select all
TestStar {
EclipticXYZ<ly> [ 1.2 3.4 5.6 ] # default units are light years
AbsMag 7.8
SpectralType "?"
}
If specified together with RA/Dec/Distance, EclipticXYZ wins. (OrbitBarycenter wins over EclipticXYZ)
This would probably be most useful for people processing stars.dat with automated tools. It would nevertheless be a really bad idea to convert the whole of stars.dat to a .stc file, as this would waste disk space and processing time on startup.
Questions:
- Does this seem like a useful addition?
- Any better names than "EclipticXYZ" for this?