Struct nyx_space::celestia::eclipse::Orbit [−][src]
pub struct Orbit { pub x: f64, pub y: f64, pub z: f64, pub vx: f64, pub vy: f64, pub vz: f64, pub dt: Epoch, pub frame: Frame, pub stm: Option<Matrix6<f64>>, pub stm_kind: StmKind, }
Expand description
Orbit defines an orbital state
Unless noted otherwise, algorithms are from GMAT 2016a StateConversionUtil.cpp. Regardless of the constructor used, this struct stores all the state information in Cartesian coordinates as these are always non singular. Note: although not yet supported, this struct may change once True of Date or other nutation frames are added to the toolkit.
Fields
x: f64
in km
y: f64
in km
z: f64
in km
vx: f64
in km/s
vy: f64
in km/s
vz: f64
in km/s
dt: Epoch
frame: Frame
Frame contains everything we need to compute state information
stm: Option<Matrix6<f64>>
Optionally stores an STM
stm_kind: StmKind
Implementations
Creates a new Orbit in the provided frame at the provided Epoch.
Units: km, km, km, km/s, km/s, km/s
Creates a new Orbit and initializes its STM.
Creates a new Orbit in the provided frame at the provided Epoch in time with 0.0 velocity.
Units: km, km, km
Creates a new Orbit around in the provided frame from the borrowed state vector
The state vector must be x, y, z, vx, vy, vz. This function is a shortcut to cartesian
and as such it has the same unit requirements.
Returns the velocity vector of this Orbit in [km/s, km/s, km/s]
Returns this state as a Cartesian Vector6 in [km, km, km, km/s, km/s, km/s]
Note that the time is not returned in the vector.
Returns the distance in kilometers between this state and another state. Will panic is the frames are different
Returns the distance in kilometers between this state and a point assumed to be in the same frame.
Returns the unit vector in the direction of the state radius
Returns the unit vector in the direction of the state velocity
Creates a new Orbit around the provided Celestial or Geoid frame from the Keplerian orbital elements.
Units: km, none, degrees, degrees, degrees, degrees
WARNING: This function will panic if the singularities in the conversion are expected. NOTE: The state is defined in Cartesian coordinates as they are non-singular. This causes rounding errors when creating a state from its Keplerian orbital elements (cf. the state tests). One should expect these errors to be on the order of 1e-12.
Creates a new Orbit from the provided semi-major axis altitude in kilometers
Creates a new Orbit from the provided radii of apoapsis and periapsis, in kilometers
Creates a new Orbit from the provided altitudes of apoapsis and periapsis, in kilometers
Creates a new Orbit around the provided frame from the borrowed state vector
The state vector must be sma, ecc, inc, raan, aop, ta. This function is a shortcut to cartesian
and as such it has the same unit requirements.
Creates a new Orbit from the geodetic latitude (φ), longitude (λ) and height with respect to the ellipsoid of the frame.
Units: degrees, degrees, km
NOTE: This computation differs from the spherical coordinates because we consider the flattening of body.
Reference: G. Xu and Y. Xu, “GPS”, DOI 10.1007/978-3-662-50367-6_2, 2016
WARNING: This uses the rotational rates known to Nyx. For other objects, use from_altlatlong
for other celestial bodies.
Creates a new Orbit from the latitude (φ), longitude (λ) and height with respect to the frame’s ellipsoid.
Units: degrees, degrees, km, rad/s NOTE: This computation differs from the spherical coordinates because we consider the flattening of body. Reference: G. Xu and Y. Xu, “GPS”, DOI 10.1007/978-3-662-50367-6_2, 2016
Returns this state as a Keplerian Vector6 in [km, none, degrees, degrees, degrees, degrees]
Note that the time is not returned in the vector.
Returns a copy of the state with a provided SMA added to the current one
Returns a copy of the state with a provided ECC added to the current one
Returns a copy of the state with a provided INC added to the current one
Returns a copy of the state with a provided AOP added to the current one
Returns a copy of the state with a provided RAAN added to the current one
Returns the true anomaly in degrees between 0 and 360.0
NOTE: This function will emit a warning stating that the TA should be avoided if in a very near circular orbit Code from https://github.com/ChristopherRabotin/GMAT/blob/80bde040e12946a61dae90d9fc3538f16df34190/src/gmatutil/util/StateConversionUtil.cpp#L6835
Returns a copy of the state with a provided TA added to the current one
Returns a copy of this state with the provided apoasis and periapse
Returns a copy of this state with the provided apoasis and periapse added to the current values
Returns the argument of latitude in degrees
NOTE: If the orbit is near circular, the AoL will be computed from the true longitude instead of relying on the ill-defined true anomaly.
Returns the radius of periapsis (or perigee around Earth), in kilometers.
Returns the radius of apoapsis (or apogee around Earth), in kilometers.
Returns the altitude of periapsis (or perigee around Earth), in kilometers.
Returns the altitude of apoapsis (or apogee around Earth), in kilometers.
Returns the eccentric anomaly in degrees
This is a conversion from GMAT’s StateConversionUtil::TrueToEccentricAnomaly
Returns the mean anomaly in degrees
This is a conversion from GMAT’s StateConversionUtil::TrueToMeanAnomaly
Returns the semi parameter (or semilatus rectum)
Returns whether this state satisfies the requirement to compute the Mean Brouwer Short orbital element set.
This is a conversion from GMAT’s StateConversionUtil::CartesianToBrouwerMeanShort.
The details are at the log level info
.
NOTE: Mean Brouwer Short are only defined around Earth. However, nyx
does not check the
main celestial body around which the state is defined (GMAT does perform this verification).
Returns the geodetic longitude (λ) in degrees. Value is between 0 and 360 degrees.
Although the reference is not Vallado, the math from Vallado proves to be equivalent. Reference: G. Xu and Y. Xu, “GPS”, DOI 10.1007/978-3-662-50367-6_2, 2016
Returns the geodetic latitude (φ) in degrees. Value is between -180 and +180 degrees.
Reference: Vallado, 4th Ed., Algorithm 12 page 172.
Returns the geodetic height in km.
Reference: Vallado, 4th Ed., Algorithm 12 page 172.
Returns the right ascension of this orbit in degrees
Returns the declination of this orbit in degrees
Returns the semi minor axis in km, includes code for a hyperbolic orbit
Returns the velocity declination of this orbit in degrees
Returns the radius of periapse in kilometers for the provided turn angle of this hyperbolic orbit.
Returns the turn angle in degrees for the provided radius of periapse passage of this hyperbolic orbit
Returns the hyperbolic anomaly in degrees between 0 and 360.0
Returns the direct cosine rotation matrix to convert to this inertial state.
Copies this orbit after applying the provided delta-v (in km/s)
Rotate this state provided a direct cosine matrix of position and velocity
Rotate this state provided a direct cosine matrix of position and velocity
Rotate the position and the velocity of this state provided a direct cosine matrix of position and velocity WARNING: You only want to use this if you’ll only be using the position components of the rotated state. This does not account for the transport theorem and therefore is physically WRONG.
Rotate the position of this state provided a direct cosine matrix of position and velocity WARNING: You only want to use this if you’ll only be using the position components of the rotated state. This does not account for the transport theorem and therefore is physically WRONG.
Sets the STM of this state of identity, which also enables computation of the STM for spacecraft navigation
Sets the STM of this state of identity, which also enables computation of the STM for trajectory optimization
Disable the STM of this state
Copies the current state but disables the STM
Sets the STM of this state of identity
Trait Implementations
Stop searching when the time has converged to less than 0.1 seconds
Finds the darkest part of an eclipse within 2% of penumbra (i.e. 98% in shadow)
Stop searching when the time has converged to less than 0.1 seconds
Finds the slightest penumbra within 2%(i.e. 98% in visibility)
Perform a measurement from the ground station to the receiver (rx).
Returns the nominal state as computed by the dynamics
Implementation of Orbit as a State for orbital dynamics with STM
Returns a state whose position, velocity and frame are zero, and STM is I_{6x6}.
type PropVecSize = U42
Return this state as a vector for the propagation/estimation
Set this state
Return this state as a vector for the propagation/estimation
fn ctor_from(
self,
delta_t_s: f64,
vector: &VectorN<f64, Self::PropVecSize>
) -> Self where
DefaultAllocator: Allocator<f64, Self::PropVecSize>,
[src]
fn ctor_from(
self,
delta_t_s: f64,
vector: &VectorN<f64, Self::PropVecSize>
) -> Self where
DefaultAllocator: Allocator<f64, Self::PropVecSize>,
[src]Reconstruct a new State from the provided delta time in seconds compared to the current state and with the provided vector. Read more
Auto Trait Implementations
impl RefUnwindSafe for Orbit
impl UnwindSafe for Orbit
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V
impl<T> ClosedNeg for T where
T: Neg<Output = T>,