Orbit
- class ssapy.orbit.Orbit(r, v, t, mu=398600441800000.0, propkw=None)[source][source]
Bases:
object
Orbital state of one or more objects.
This class represents one or more instantaneous (osculating) states of orbiting bodies. Representations in Cartesian, Keplerian, and equinoctial elements are available. The default initializer requires Cartesian elements, though class methods are also available to initialize with Keplerian or equinoctial elements.
Note that generally this class can represent either a single scalar orbit, in which case attributes will generally be scalar floats, or a vector of orbits, in which case attributes will be ndarrays of floats. For attributes that are intrinsically vectors even for a single orbit (position, velocity, …), a 2d array will be used for a “vector of orbits”, with the first dimension representing the different orbits.
For simplicity, we will only indicate the “single scalar Orbit” dimensions in docstrings. For a vector-Orbit, most scalar input arguments can be supplied as broadcastable arrays, and scalar attributes become array attributes. When a multi-dimensional array is required, the first dimension is the one over different orbits.
- Parameters:
r ((3,) array_like) – Position of orbiting object in meters.
v ((3,) array_like) – Velocity of orbiting objects in meters per second.
t (float or astropy.time.Time) – If float or array of float, then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC
mu (float, optional) – Gravitational constant of central body in m^3/s^2. (Default: Earth’s gravitational constant in WGS84).
- hx, hy
Components of the equinoctial inclination vector.
- Type:
- ex, ey
Components of the equinoctial eccentricity vector.
- Type:
- fromKeplerianElements(a, e, i, pa, raan, trueAnomaly, t, mu)[source][source]
Construct an Orbit from Keplerian elements.
- fromEquinoctialElements(a, hx, hy, ex, ey, lv, t, mu)[source][source]
Construct an Orbit from Equinoctial elements.
Notes
Although much of the Orbit class here is agnostic with respect to the coordinate reference frame, we strongly recommend that positions and velocities be specified in the GCRF frame. Some other classes in this module do insist on this frame, (e.g., EarthObserver). We will try to indicate where the GCRF frame is required, but make no guarantees that we don’t miss any such instances.
Attributes Summary
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
Equinoctial elements (a, hx, hy, ex, ey, lv).
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
Keplerian elements (a, e, i, pa, raan, trueAnomaly).
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
meant to be used for lazy evaluation of an object attribute.
Methods Summary
at
(t[, propagator])Propagate this orbit to time t.
fromEquinoctialElements
(a, hx, hy, ex, ey, lv, t)Construct an Orbit from equinoctial elements.
fromKeplerianElements
(a, e, i, pa, raan, ...)Construct an Orbit from Keplerian elements.
fromKozaiMeanKeplerianElements
(a, e, i, pa, ...)Construct an Orbit from Kozai mean Keplerian elements.
fromTLE
(sat_name, tle_filename[, propkw])Construct an Orbit from a TLE file
fromTLETuple
(tle[, propkw])Construct an Orbit from a TLE tuple
Attributes Documentation
- LRL[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- a[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- angularMomentum[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- apoapsis[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- e[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- eccentricAnomaly[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- energy[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- ex[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- ey[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- hx[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- hy[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- i[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- kozaiMeanKeplerianElements[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- lE[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- lM[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- lonPa[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- lv[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- meanAnomaly[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- meanMotion[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- p[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- pa[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- periapsis[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- period[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- raan[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- tle[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
- trueAnomaly[source]
meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself.
Methods Documentation
- at(t, propagator=KeplerianPropagator())[source][source]
Propagate this orbit to time t.
- Parameters:
t (float or astropy.time.Time) – If float, then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC
propagator (Propagator, optional) – The propagator instance to use.
- Returns:
Propagated Orbit.
- Return type:
- classmethod fromEquinoctialElements(a, hx, hy, ex, ey, lv, t, mu=398600441800000.0, propkw=None)[source][source]
Construct an Orbit from equinoctial elements.
- Parameters:
a (float) – Semimajor axis in meters.
hx (float) – Components of the equinoctial inclination vector.
hy (float) – Components of the equinoctial inclination vector.
ex (float) – Components of the equinoctial eccentricity vector.
ey (float) – Components of the equinoctial eccentricity vector.
lv (float) – True longitude in radians.
t (float or astropy.time.Time) – If float, then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC
mu (float, optional) – Gravitational constant of central body in m^3/s^2. (Default: Earth’s gravitational constant in WGS84).
- Returns:
The Orbit with given parameters.
- Return type:
- classmethod fromKeplerianElements(a, e, i, pa, raan, trueAnomaly, t, mu=398600441800000.0, propkw=None)[source][source]
Construct an Orbit from Keplerian elements.
- Parameters:
a (float) – Semimajor axis in meters.
e (float) – Keplerian eccentricity.
i (float) – Keplerian inclination in radians.
pa (float) – Keplerian periapsis argument in radians.
raan (float) – Keplerian right ascension of the ascending node in radians.
trueAnomaly (float) – Keplerian true anomaly in radians.
t (float or astropy.time.Time) – If float, then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC
mu (float, optional) – Gravitational constant of central body in m^3/s^2. (Default: Earth’s gravitational constant in WGS84).
- Returns:
The Orbit with given parameters.
- Return type:
- classmethod fromKozaiMeanKeplerianElements(a, e, i, pa, raan, trueAnomaly, t, mu=398600441800000.0, _useTEME=False, propkw=None)[source][source]
Construct an Orbit from Kozai mean Keplerian elements. By default, this method also converts from the TEME reference frame to the GCRF frame. This is mainly to support TLEs and SGP4, so the default gravitational parameter is WGS84.
- Parameters:
a (float) – Semimajor axis in meters.
e (float) – Keplerian eccentricity.
i (float) – Keplerian inclination in radians.
pa (float) – Keplerian periapsis argument in radians.
raan (float) – Keplerian right ascension of the ascending node in radians.
trueAnomaly (float) – Keplerian true anomaly in radians.
t (float or astropy.time.Time) – If float, then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC
mu (float, optional) – Gravitational constant of central body in m^3/s^2. (Default: Earth’s gravitational constant in WGS84).
- Returns:
The Orbit with given parameters.
- Return type: