Struct sbp::messages::observation::packed_obs_content::PackedObsContent
source · 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
impl PackedObsContent
sourcepub fn raim_exclusion(&self) -> Result<RaimExclusion, u8>
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.
sourcepub fn set_raim_exclusion(&mut self, raim_exclusion: RaimExclusion)
pub fn set_raim_exclusion(&mut self, raim_exclusion: RaimExclusion)
Set the bitrange corresponding to the RaimExclusion of the flags
bitfield.
sourcepub fn doppler_valid(&self) -> Result<DopplerValid, u8>
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.
sourcepub fn set_doppler_valid(&mut self, doppler_valid: DopplerValid)
pub fn set_doppler_valid(&mut self, doppler_valid: DopplerValid)
Set the bitrange corresponding to the DopplerValid of the flags
bitfield.
sourcepub fn halfcycle_ambiguity(&self) -> Result<HalfCycleAmbiguity, u8>
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.
sourcepub fn set_halfcycle_ambiguity(
&mut self,
halfcycle_ambiguity: HalfCycleAmbiguity
)
pub fn set_halfcycle_ambiguity( &mut self, halfcycle_ambiguity: HalfCycleAmbiguity )
Set the bitrange corresponding to the HalfCycleAmbiguity of the flags
bitfield.
sourcepub fn carrier_phase_valid(&self) -> Result<CarrierPhaseValid, u8>
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.
sourcepub fn set_carrier_phase_valid(
&mut self,
carrier_phase_valid: CarrierPhaseValid
)
pub fn set_carrier_phase_valid( &mut self, carrier_phase_valid: CarrierPhaseValid )
Set the bitrange corresponding to the CarrierPhaseValid of the flags
bitfield.
sourcepub fn pseudorange_valid(&self) -> Result<PseudorangeValid, u8>
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.
sourcepub fn set_pseudorange_valid(&mut self, pseudorange_valid: PseudorangeValid)
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
impl Clone for PackedObsContent
source§fn clone(&self) -> PackedObsContent
fn clone(&self) -> PackedObsContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PackedObsContent
impl Debug for PackedObsContent
source§impl<'de> Deserialize<'de> for PackedObsContent
impl<'de> Deserialize<'de> for PackedObsContent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for PackedObsContent
impl PartialEq for PackedObsContent
source§fn eq(&self, other: &PackedObsContent) -> bool
fn eq(&self, other: &PackedObsContent) -> bool
self
and other
values to be equal, and is used
by ==
.