Skip to main content

Projection

Struct Projection 

Source
pub struct Projection { /* private fields */ }
Expand description

Projects satellite grid positions to geographic coordinates and vice versa.

Implementations§

Source§

impl Projection

Source

pub fn new(shell: Shell) -> Self

Creates a new projection from a constellation shell.

Source

pub fn nadir(&self, point: Point) -> LatLon

Computes the nadir (ground-track) position of a satellite.

For a Walker Delta constellation:

  • RAAN of plane x: x * 360/N degrees
  • True anomaly of satellite y: y * 360/M degrees
  • Latitude: arcsin(sin(i) * sin(ν))
  • Longitude: Ω + atan2(cos(i) * sin(ν), cos(ν))
Source

pub fn satellites_in_geo_aoi<const N: usize>( &self, geo_aoi: &GeoAoi, ) -> Vec<Point, N>

Returns all satellites whose nadir falls within the geographic AOI.

Source

pub fn satellite_ecef(&self, point: Point, time_s: f32) -> Ecef

Computes the ECEF position of a satellite at a given time.

time_s is seconds since epoch (t=0 corresponds to the constellation snapshot from nadir()). Accounts for both orbital motion and Earth rotation.

Source

pub fn find_gateway( &self, station: LatLon, time_s: f32, min_elevation_deg: f32, ) -> Option<Point>

Finds the satellite with the highest elevation angle above min_elevation_deg from a ground station.

Returns None if no satellite has line-of-sight.

Source

pub fn geo_to_grid_aoi(&self, geo_aoi: &GeoAoi) -> Option<Aoi>

Converts a geographic AOI to a grid AOI by finding the bounding box of all satellites whose nadir falls within the geographic region.

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> Same for T

Source§

type Output = T

Should always be Self
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.