SPICE
Posted: 12.09.2006, 17:53
I've added support for SPICE ephemerides to Celestia. SPICE is NASA's library for archiving data for space missions--spacecraft and planet positions, orientations, and other data.
SPICE is one of the easiest to use and best documented software libraries I've ever worked with. The documentation is comprehensive and very easy to read--a lot of it is worthwhile reading even if you're not writing code.
Here's how a SPICE orbit appears in an ssc file:
SpiceOrbit
{
Kernel "de403_2000-2020.bsp"
Target "Pluto Barycenter"
Origin "Sun"
BoundingRadius 40
Period 248.0
}
The Kernel field is the name of a SPICE kernel file containing
ephemeris data. There's a repository of SPICE kernels here:
ftp://naif.jpl.nasa.gov/pub/naif/
Celestia searches for SPICE kernels in an add-on's data directory.
Target is the name of the that the orbit is for; origin is the object
that the orbit will be referred to. The names are not Celestia SSC
names but standard NAIF name strings. There's a list here:
http://www.gps.caltech.edu/~marsdata/req/naif_ids.html
The reference plane for SpiceOrbits is always the J2000 ecliptic. For
moons, make sure that the OrbitReferencePlane is set to "ecliptic"
The BoundingRadius of the orbit needs to be supplied in order for
culling to work. As far as I can tell, there's no way to extract this
from the SPICE kernel file. Period is optional; it's used by Celestia
only for orbit path rendering. If it's set to zero or not given at
all, the orbit is assumed to be an aperiodic trajectory. The units for
BoundingRadius and Period are AU and years for bodies that directly
orbit a star, and kilometers and Earth solar days for other bodies.
The switch in units is for consistency with other Celestia orbits--I
wish I hadn't used two different unit systems in ssc files, but it's a
bit late to go back now.
The current implementation should not be considered final, and I
welcome suggestions for improvements to the SPICE orbit ssc
definition.
--Chris
SPICE is one of the easiest to use and best documented software libraries I've ever worked with. The documentation is comprehensive and very easy to read--a lot of it is worthwhile reading even if you're not writing code.
Here's how a SPICE orbit appears in an ssc file:
SpiceOrbit
{
Kernel "de403_2000-2020.bsp"
Target "Pluto Barycenter"
Origin "Sun"
BoundingRadius 40
Period 248.0
}
The Kernel field is the name of a SPICE kernel file containing
ephemeris data. There's a repository of SPICE kernels here:
ftp://naif.jpl.nasa.gov/pub/naif/
Celestia searches for SPICE kernels in an add-on's data directory.
Target is the name of the that the orbit is for; origin is the object
that the orbit will be referred to. The names are not Celestia SSC
names but standard NAIF name strings. There's a list here:
http://www.gps.caltech.edu/~marsdata/req/naif_ids.html
The reference plane for SpiceOrbits is always the J2000 ecliptic. For
moons, make sure that the OrbitReferencePlane is set to "ecliptic"
The BoundingRadius of the orbit needs to be supplied in order for
culling to work. As far as I can tell, there's no way to extract this
from the SPICE kernel file. Period is optional; it's used by Celestia
only for orbit path rendering. If it's set to zero or not given at
all, the orbit is assumed to be an aperiodic trajectory. The units for
BoundingRadius and Period are AU and years for bodies that directly
orbit a star, and kilometers and Earth solar days for other bodies.
The switch in units is for consistency with other Celestia orbits--I
wish I hadn't used two different unit systems in ssc files, but it's a
bit late to go back now.
The current implementation should not be considered final, and I
welcome suggestions for improvements to the SPICE orbit ssc
definition.
--Chris