Skip to main content

TypeBConversion

Struct TypeBConversion 

Source
pub struct TypeBConversion;
Expand description

Type B photometric coordinate conversion utilities

Implementations§

Source§

impl TypeBConversion

Source

pub fn type_c_to_type_b(c_deg: f64, gamma_deg: f64) -> (f64, f64)

Convert Type C (C-plane, gamma) coordinates to Type B (H, V) coordinates.

§Arguments
  • c_deg - C-plane angle in degrees
  • gamma_deg - Gamma angle in degrees (from nadir)
§Returns

(h_deg, v_deg) - Horizontal and vertical angles in degrees

Source

pub fn type_b_to_type_c(h_deg: f64, v_deg: f64) -> (f64, f64)

Convert Type B (H, V) coordinates to Type C (C-plane, gamma) coordinates.

§Arguments
  • h_deg - Horizontal angle in degrees
  • v_deg - Vertical angle in degrees
§Returns

(c_deg, gamma_deg) - C-plane angle and gamma angle in degrees

Source

pub fn intensity_at_type_b(ldt: &Eulumdat, h_deg: f64, v_deg: f64) -> f64

Get intensity at Type B coordinates by converting to Type C and sampling.

§Arguments
  • ldt - The Eulumdat data
  • h_deg - Horizontal angle in degrees
  • v_deg - Vertical angle in degrees
§Returns

Intensity in cd/klm at the given Type B coordinates

Auto Trait Implementations§

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> 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, 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.