pub struct AzEl {
pub epoch: DateTime<Utc>,
pub azimuth: f64,
pub elevation: f64,
pub range: Option<f64>,
pub range_rate: Option<f64>,
pub azimuth_rate: Option<f64>,
pub elevation_rate: Option<f64>,
}Expand description
Azimuth and Elevation observation.
Represents an angular observation in the local horizontal coordinate system:
- Azimuth (Az): Angle measured clockwise from true North, in radians [0, 2π)
- Elevation (El): Angle measured above the local horizon, in radians [-π/2, +π/2]
Fields§
§epoch: DateTime<Utc>UTC epoch of the observation
azimuth: f64Azimuth in radians [0, 2π), measured clockwise from North
elevation: f64Elevation in radians [-π/2, +π/2], measured above horizon
range: Option<f64>Slant range in kilometers (optional)
range_rate: Option<f64>Range rate in km/s (optional)
azimuth_rate: Option<f64>Azimuth rate in rad/s (optional)
elevation_rate: Option<f64>Elevation rate in rad/s (optional)
Implementations§
Source§impl AzEl
impl AzEl
Sourcepub fn new(epoch: DateTime<Utc>, azimuth: f64, elevation: f64) -> Self
pub fn new(epoch: DateTime<Utc>, azimuth: f64, elevation: f64) -> Self
Create a new Az/El observation.
§Arguments
epoch- UTC epoch of the observationazimuth- Azimuth in radians [0, 2π), measured clockwise from Northelevation- Elevation in radians [-π/2, +π/2], measured above horizon
Sourcepub fn from_degrees(epoch: DateTime<Utc>, az_deg: f64, el_deg: f64) -> Self
pub fn from_degrees(epoch: DateTime<Utc>, az_deg: f64, el_deg: f64) -> Self
Create Az/El from degrees.
Sourcepub fn with_range(self, range: f64) -> Self
pub fn with_range(self, range: f64) -> Self
Set the range.
Sourcepub fn with_range_rate(self, range_rate: f64) -> Self
pub fn with_range_rate(self, range_rate: f64) -> Self
Set the range rate.
Sourcepub fn with_azimuth_rate(self, azimuth_rate: f64) -> Self
pub fn with_azimuth_rate(self, azimuth_rate: f64) -> Self
Set the azimuth rate.
Sourcepub fn with_elevation_rate(self, elevation_rate: f64) -> Self
pub fn with_elevation_rate(self, elevation_rate: f64) -> Self
Set the elevation rate.
Sourcepub fn azimuth_deg(&self) -> f64
pub fn azimuth_deg(&self) -> f64
Get azimuth in degrees.
Sourcepub fn elevation_deg(&self) -> f64
pub fn elevation_deg(&self) -> f64
Get elevation in degrees.
Sourcepub fn to_degrees(&self) -> (f64, f64)
pub fn to_degrees(&self) -> (f64, f64)
Convert to degrees, returning (azimuth_deg, elevation_deg).
Sourcepub fn above_horizon(&self) -> bool
pub fn above_horizon(&self) -> bool
Check if the target is above the horizon.
Sourcepub fn above_elevation(&self, min_elevation_deg: f64) -> bool
pub fn above_elevation(&self, min_elevation_deg: f64) -> bool
Check if the target is above a minimum elevation.
§Arguments
min_elevation_deg- Minimum elevation in degrees
Sourcepub fn compass_direction(&self) -> &'static str
pub fn compass_direction(&self) -> &'static str
Get compass direction from azimuth.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AzEl
impl RefUnwindSafe for AzEl
impl Send for AzEl
impl Sync for AzEl
impl Unpin for AzEl
impl UnwindSafe for AzEl
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