#[non_exhaustive]pub struct Ellipse {
pub level: f64,
pub scale: f64,
pub center_east_m: f64,
pub center_north_m: f64,
pub semi_major_m: f64,
pub semi_minor_m: f64,
pub major_heading_rad: f64,
}Expand description
An ellipse on the ground, holding a share of the landings. Built by Ellipse::gaussian,
Scatter::ellipse or Scatter::prediction_ellipse; it serializes as its fields and reads
back through checks on each.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.level: f64Its level, in (0, 1): the share of a normal spread it holds, or for a prediction
ellipse the probability that the next flight lands inside it.
scale: f64Its scale k: the semi-axes are k standard deviations along each axis.
center_east_m: f64Its center, east of the pad, m.
center_north_m: f64Its center, north of the pad, m.
semi_major_m: f64Half its long axis, m.
semi_minor_m: f64Half its short axis, m; zero for landings on a line.
major_heading_rad: f64Its long axis’s heading, clockwise from north, in [0, π).
Implementations§
Source§impl Ellipse
impl Ellipse
Sourcepub fn gaussian(
center_east_m: f64,
center_north_m: f64,
covariance: &Covariance,
level: f64,
) -> Result<Self, AnalysisError>
pub fn gaussian( center_east_m: f64, center_north_m: f64, covariance: &Covariance, level: f64, ) -> Result<Self, AnalysisError>
The ellipse holding the share level of a normal spread with the mean
(center_east_m, center_north_m) and the covariance covariance, both known: its scale is
gaussian_scale.
§Errors
AnalysisError::Domain for a level outside (0, 1), a center that isn’t finite, or a
covariance so large that an axis overflows.
Sourcepub fn contains(&self, east_m: f64, north_m: f64) -> bool
pub fn contains(&self, east_m: f64, north_m: f64) -> bool
Whether the point east_m, north_m (m from the pad) lies inside or on the ellipse.
Neither semi-axis is taken below 10⁻¹² of the ellipse’s size and distance from the pad
(a + |center east| + |center north|). Rounding in the center, the heading and this
test’s rotation puts a point that lies on a flat ellipse’s axis (a zero minor axis, from
landings on a line) a few units of rounding off it, and the floor keeps it inside. Against
any real spread the floor is far below a millimeter.
Trait Implementations§
impl Copy for Ellipse
Source§impl<'de> Deserialize<'de> for Ellipse
impl<'de> Deserialize<'de> for Ellipse
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>,
impl StructuralPartialEq for Ellipse
Auto Trait Implementations§
impl Freeze for Ellipse
impl RefUnwindSafe for Ellipse
impl Send for Ellipse
impl Sync for Ellipse
impl Unpin for Ellipse
impl UnsafeUnpin for Ellipse
impl UnwindSafe for Ellipse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more