pub struct PackedObsContent {
    pub p: u32,
    pub l: CarrierPhase,
    pub d: Doppler,
    pub cn0: u8,
    pub lock: u8,
    pub flags: u8,
    pub sid: GnssSignal,
}
Expand description

GNSS observations for a particular satellite signal

Pseudorange and carrier phase observation for a satellite being tracked. The observations are interoperable with 3rd party receivers and conform with typical RTCM 3.1 message GPS/GLO observations.

Carrier phase observations are not guaranteed to be aligned to the RINEX 3 or RTCM 3.3 MSM reference signal and no 1/4 cycle adjustments are currently performed.

Fields§

§p: u32

Pseudorange observation

§l: CarrierPhase

Carrier phase observation with typical sign convention.

§d: Doppler

Doppler observation with typical sign convention.

§cn0: u8

Carrier-to-Noise density. Zero implies invalid cn0.

§lock: u8

Lock timer. This value gives an indication of the time for which a signal has maintained continuous phase lock. Whenever a signal has lost and regained lock, this value is reset to zero. It is encoded according to DF402 from the RTCM 10403.2 Amendment 2 specification. Valid values range from 0 to 15 and the most significant nibble is reserved for future use.

§flags: u8

Measurement status flags. A bit field of flags providing the status of this observation. If this field is 0 it means only the Cn0 estimate for the signal is valid.

§sid: GnssSignal

GNSS signal identifier (16 bit)

Implementations§

source§

impl PackedObsContent

source

pub fn raim_exclusion(&self) -> Result<RaimExclusion, u8>

Gets the RaimExclusion stored in the flags bitfield.

Returns Ok if the bitrange contains a known RaimExclusion variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of RaimExclusion were added.

source

pub fn set_raim_exclusion(&mut self, raim_exclusion: RaimExclusion)

Set the bitrange corresponding to the RaimExclusion of the flags bitfield.

source

pub fn doppler_valid(&self) -> Result<DopplerValid, u8>

Gets the DopplerValid stored in the flags bitfield.

Returns Ok if the bitrange contains a known DopplerValid variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of DopplerValid were added.

source

pub fn set_doppler_valid(&mut self, doppler_valid: DopplerValid)

Set the bitrange corresponding to the DopplerValid of the flags bitfield.

source

pub fn halfcycle_ambiguity(&self) -> Result<HalfCycleAmbiguity, u8>

Gets the HalfCycleAmbiguity stored in the flags bitfield.

Returns Ok if the bitrange contains a known HalfCycleAmbiguity variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of HalfCycleAmbiguity were added.

source

pub fn set_halfcycle_ambiguity( &mut self, halfcycle_ambiguity: HalfCycleAmbiguity )

Set the bitrange corresponding to the HalfCycleAmbiguity of the flags bitfield.

source

pub fn carrier_phase_valid(&self) -> Result<CarrierPhaseValid, u8>

Gets the CarrierPhaseValid stored in the flags bitfield.

Returns Ok if the bitrange contains a known CarrierPhaseValid variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of CarrierPhaseValid were added.

source

pub fn set_carrier_phase_valid( &mut self, carrier_phase_valid: CarrierPhaseValid )

Set the bitrange corresponding to the CarrierPhaseValid of the flags bitfield.

source

pub fn pseudorange_valid(&self) -> Result<PseudorangeValid, u8>

Gets the PseudorangeValid stored in the flags bitfield.

Returns Ok if the bitrange contains a known PseudorangeValid variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of PseudorangeValid were added.

source

pub fn set_pseudorange_valid(&mut self, pseudorange_valid: PseudorangeValid)

Set the bitrange corresponding to the PseudorangeValid of the flags bitfield.

Trait Implementations§

source§

impl Clone for PackedObsContent

source§

fn clone(&self) -> PackedObsContent

Returns a copy 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 PackedObsContent

source§

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

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

impl<'de> Deserialize<'de> for PackedObsContent

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for PackedObsContent

source§

fn eq(&self, other: &PackedObsContent) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PackedObsContent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<PackedObsContent> for NavigationMeasurement

§

type Error = InvalidGnssSignal

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

fn try_from( observation: PackedObsContent ) -> Result<NavigationMeasurement, InvalidGnssSignal>

Performs the conversion.
source§

impl StructuralPartialEq for PackedObsContent

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> ToOwned for T
where T: Clone,

§

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

§

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

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,