AzEl

Struct AzEl 

Source
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: f64

Azimuth in radians [0, 2π), measured clockwise from North

§elevation: f64

Elevation 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

Source

pub fn new(epoch: DateTime<Utc>, azimuth: f64, elevation: f64) -> Self

Create a new Az/El observation.

§Arguments
  • epoch - UTC epoch of the observation
  • azimuth - Azimuth in radians [0, 2π), measured clockwise from North
  • elevation - Elevation in radians [-π/2, +π/2], measured above horizon
Source

pub fn from_degrees(epoch: DateTime<Utc>, az_deg: f64, el_deg: f64) -> Self

Create Az/El from degrees.

Source

pub fn with_range(self, range: f64) -> Self

Set the range.

Source

pub fn with_range_rate(self, range_rate: f64) -> Self

Set the range rate.

Source

pub fn with_azimuth_rate(self, azimuth_rate: f64) -> Self

Set the azimuth rate.

Source

pub fn with_elevation_rate(self, elevation_rate: f64) -> Self

Set the elevation rate.

Source

pub fn azimuth_deg(&self) -> f64

Get azimuth in degrees.

Source

pub fn elevation_deg(&self) -> f64

Get elevation in degrees.

Source

pub fn to_degrees(&self) -> (f64, f64)

Convert to degrees, returning (azimuth_deg, elevation_deg).

Source

pub fn above_horizon(&self) -> bool

Check if the target is above the horizon.

Source

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
Source

pub fn compass_direction(&self) -> &'static str

Get compass direction from azimuth.

Source

pub fn to_string(&self) -> String

Format as a human-readable string.

Trait Implementations§

Source§

impl Clone for AzEl

Source§

fn clone(&self) -> AzEl

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AzEl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for AzEl

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.