Some quick background . . . Internally, Celestia uses coordinate conventions that are not standard in astronomy. The conversion is trivial: to convert a position vector R0 in Celestia's internal coordinates to R1 in the standard J2000 ecliptic system:
R1x = R0x
R1y = -R0z
R1z = R0y
(It amounts to a rotation of 90 degrees about the x-axis.)
In SSC files, Celestia's internal coordinate system is hidden: positions in FixedPositions, SampledOrbits, etc. are all given in standard astronomical coordinates. But, the non-standard coordinates are still used in celx scripts. I'd like to address this problem without breaking existing scripts. It's particularly important, because the coordinates generated by ScriptedOrbits (and the rotations produced by ScriptedRotations) are all in the standard coordinate system.
I've seen only a very few existing scripts that depend on the current definitions of reference frames: Clive Pottinger's Celestia Visual Guide, Harald Schmidt's azimuth-elevation script, and Toti's Gravity Simulator. But, there are almost certainly more out there that simply haven't been published, so I'm afraid to simply change how frames work. Another possibility is to add some sort of version tag to frame objects, along with new methods for creating frames: frames created with the new method would get the old version and maintain compatilibity, frames created with the new methods would use standard astronomical conventions for coordinates.
This idea could be extended even further. We could give the celestia object itself a version. Suppose that you could create a new celestia object like this:
Code: Select all
cel = celestia:newinterface("1.6.0")
Then, you'd could call all of the usual celestia object methods with cel. Any objects created from cel via newframe, etc. would inherit the new version tag and behave in the new manner. Obviously, things could get out of control with different functions behaving very differently across Celestia versions--even though compatibility would be maintained, documentation and code maintenance would be a headache. But, for a very few key changes such as coordinate conventions, the cost could be worthwhile.
--Chris