API Reference — Orbital Elements¶
- skyfield.elementslib.osculating_elements_of(position, reference_frame=None, gm_km3_s2=None)¶
Produce the osculating orbital elements for a position.
position
is an instance ofICRF
. These are commonly returned by theat()
method of any Solar System body.reference_frame
is an optional argument and is a 3x3 numpy array. The reference frame by default is the ICRF. Commonly used reference frames are found in skyfield.data.spice.inertial_frames.gm_km3_s2
is an optional float argument representing the gravitational parameter (G*M) in units of km^3/s^2, which is the sum of the masses of the orbiting object and the object being orbited. If not specified, this is calculated for you.This function returns an instance of
OsculatingElements
- class skyfield.elementslib.OsculatingElements(position, velocity, time, mu_km_s)¶
One or more sets of osculating orbital elements.
An
OsculatingElements
object can be initialized with the following parameters:- positionDistance object
Position vector with shape (3,) or (3, n)
- velocityVelocity object
Velocity vector with shape (3,) or (3, n)
- time: Time object
The times of the position and velocity vectors
- mu_km_s: float
Gravitational parameter (G*M) in units of km^3/s^2