pub struct Motion {
pub longitude_deg_per_day: Option<f64>,
pub latitude_deg_per_day: Option<f64>,
pub distance_au_per_day: Option<f64>,
}Expand description
Apparent motion data for a position sample.
Fields§
§longitude_deg_per_day: Option<f64>Longitude speed in degrees per day.
latitude_deg_per_day: Option<f64>Latitude speed in degrees per day.
distance_au_per_day: Option<f64>Distance speed in astronomical units per day.
Implementations§
Source§impl Motion
impl Motion
Sourcepub const fn new(
longitude_deg_per_day: Option<f64>,
latitude_deg_per_day: Option<f64>,
distance_au_per_day: Option<f64>,
) -> Self
pub const fn new( longitude_deg_per_day: Option<f64>, latitude_deg_per_day: Option<f64>, distance_au_per_day: Option<f64>, ) -> Self
Creates a new motion sample.
Sourcepub const fn longitude_speed(self) -> Option<f64>
pub const fn longitude_speed(self) -> Option<f64>
Returns the longitudinal motion speed when available.
Sourcepub const fn latitude_speed(self) -> Option<f64>
pub const fn latitude_speed(self) -> Option<f64>
Returns the latitudinal motion speed when available.
Sourcepub const fn distance_speed(self) -> Option<f64>
pub const fn distance_speed(self) -> Option<f64>
Returns the radial motion speed when available.
Sourcepub fn summary_line(self) -> String
pub fn summary_line(self) -> String
Returns a compact one-line summary of the motion sample.
Sourcepub fn validate(self) -> Result<(), MotionValidationError>
pub fn validate(self) -> Result<(), MotionValidationError>
Validates that every populated motion component is finite.
Sourcepub fn longitude_direction(self) -> Option<MotionDirection>
pub fn longitude_direction(self) -> Option<MotionDirection>
Returns the coarse longitudinal motion direction when that speed is available.
The classification is sign-based: positive speed is direct, negative speed is retrograde, and an exact zero speed is stationary. Non-finite longitudinal speeds are treated as unknown until the sample is validated.
Trait Implementations§
impl Copy for Motion
Source§impl<'de> Deserialize<'de> for Motion
impl<'de> Deserialize<'de> for Motion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Motion
Auto Trait Implementations§
impl Freeze for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnsafeUnpin for Motion
impl UnwindSafe for Motion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more