pub struct GnssSignal { /* private fields */ }Expand description
GNSS Signal identifier
Implementations§
Source§impl GnssSignal
impl GnssSignal
Sourcepub fn new(sat: u16, code: Code) -> Result<GnssSignal, InvalidSatellite>
pub fn new(sat: u16, code: Code) -> Result<GnssSignal, InvalidSatellite>
Make a GnssSignal from its constituent parts, check for a valid satellite PRN
§Errors
An error is returned if the satellite PRN is not valid for the corresponding constellation.
Sourcepub fn to_constellation(self) -> Constellation
pub fn to_constellation(self) -> Constellation
Get the Constellation of the signal
Sourcepub fn get_carrier_frequency(&self) -> f64
pub fn get_carrier_frequency(&self) -> f64
Get the carrier frequency of the signal
§Note
GLONASS FDMA codes return the center frequency. To get the channel
frequency use GnssSignal::get_glo_channel_frequency() instead
Sourcepub fn get_glo_channel_frequency(&self, slot: i16) -> f64
pub fn get_glo_channel_frequency(&self, slot: i16) -> f64
Get the channel frequency for the given GLONASS FDMA code and channel slot
The code must be either GLO L1OF or L2OF. The slot number must be between -7 and +6
§Panics
This function will panic if the code is not a GLONASS FDMA code, or if the channel slot is invalid.
Trait Implementations§
Source§impl Clone for GnssSignal
impl Clone for GnssSignal
Source§fn clone(&self) -> GnssSignal
fn clone(&self) -> GnssSignal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GnssSignal
impl Debug for GnssSignal
Source§impl Display for GnssSignal
impl Display for GnssSignal
Source§impl Hash for GnssSignal
impl Hash for GnssSignal
Source§impl Ord for GnssSignal
impl Ord for GnssSignal
Source§fn cmp(&self, other: &GnssSignal) -> Ordering
fn cmp(&self, other: &GnssSignal) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GnssSignal
impl PartialEq for GnssSignal
Source§impl PartialOrd for GnssSignal
impl PartialOrd for GnssSignal
impl Copy for GnssSignal
impl Eq for GnssSignal
impl StructuralPartialEq for GnssSignal
Auto Trait Implementations§
impl Freeze for GnssSignal
impl RefUnwindSafe for GnssSignal
impl Send for GnssSignal
impl Sync for GnssSignal
impl Unpin for GnssSignal
impl UnwindSafe for GnssSignal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.