Cosmographia Export¶
Propagated trajectories can be exported as SPICE SPK kernels for visualization in JPL Cosmographia or other SPICE-compatible tools.
Workflow¶
- Propagate the spacecraft trajectory using
CentralBodyPropagatoror any other propagator. - Write the ephemeris to an SPK file using
Spacecraft.WriteEphemeris(). - Load the SPK in Cosmographia (or another SPICE viewer) alongside the standard planetary kernels.
Example¶
// Propagate
var solution = propagator.Propagate();
// Export trajectory as SPK kernel
spacecraft.WriteEphemeris(new FileInfo("output/mission.bsp"));
The exported SPK uses the spacecraft's NAIF ID and covers the propagated time window. Cosmographia can then render the trajectory relative to any loaded celestial body.
Kernel compatibility
Ensure the Cosmographia session loads the same planetary and leap-second kernels used during propagation so that frames and epochs are consistent.