[−][src]Module nyx_space::celestia
Provides the solar system planets, and state and (later) ephemeride management.
State creation and management
extern crate hifitime; extern crate nyx_space as nyx; fn main(){ use hifitime::julian::ModifiedJulian; use nyx::celestia::{State, EARTH, ECI}; let dt = ModifiedJulian { days: 21545.0 }; // The parameter is anything which implements `CelestialBody`. // In this case, we're creating these states around Earth. let cart = State::from_cartesian::<EARTH, ModifiedJulian>( 5946.673548288958, 1656.154606023661, 2259.012129598249, -3.098683050943824, 4.579534132135011, 6.246541551539432, dt, ECI {}, ); let cart_simple = State::from_cartesian_eci( 5946.673548288958, 1656.154606023661, 2259.012129598249, -3.098683050943824, 4.579534132135011, 6.246541551539432, dt, ); let kep = State::from_keplerian::<EARTH, ModifiedJulian>( 7712.186117895041, 0.15899999999999995, 53.75369, 1.99863286421117e-05, 359.787880000004, 25.434003407751188, dt, ECI {}, ); // We can check whether two states are equal. if cart != kep { panic!("This won't happen"); } if cart != cart_simple { panic!("This won't happen either"); } // Of more interest, we can fetch specific orbital elements. println!("sma = {} km inc = {} degrees", cart.sma(), cart.inc()); // Note that the state data is stored as X, Y, Z, VX, VY, VZ. // Hence, the following print statement may display some rounded values despite // being created with fixed values. GMAT has the same "issue" // (but `nyx` won't change your script). println!("ecc = {} km RAAN = {} degrees", kep.ecc(), cart.raan()); }
Structs
EARTH | Planet Earth as defined in GMAT 2016a. |
ECEF | ECEF is the Earth Centered Earth Fixed frame. It's an approximation of a body fixed frame which currently only account for the rotation of Earth. |
ECI | |
ICRF | |
JUPITER | Planet Jupiter as defined in GMAT 2016a. |
MARS | Planet Mars as defined in GMAT 2016a. |
MERCURY | Planet Mercury as defined in GMAT 2016a. Warning: Keplerian dynamics are not a correct representation of the orbit of Mercury (cf. this discussion) so one should take into account that general relativity is required for high fidelity dynamics in the vicinity of this planet. |
NEPTUNE | Planet Neptune as defined in GMAT 2016a. |
SATURN | Planet Saturn as defined in GMAT 2016a. |
SSB | Solar system barycenter |
State | State defines an orbital state parameterized by a |
URANUS | Planet Uranus as defined in GMAT 2016a. |
VENUS | Planet Venus as defined in GMAT 2016a. |
Constants
ECC_EPSILON | If an orbit has an eccentricity below the following value, it is considered circular (only affects warning messages) |
Traits
CelestialBody |
|
CoordinateFrame | Defines a coordinate frame trait around the body B which implements the trait NAIF. |
NAIF |
|