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
sourceimpl 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
sourceimpl Clone for PackedObsContent
impl Clone for PackedObsContent
sourcefn clone(&self) -> PackedObsContent
fn clone(&self) -> PackedObsContent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for PackedObsContent
impl Send for PackedObsContent
impl Sync for PackedObsContent
impl Unpin for PackedObsContent
impl UnwindSafe for PackedObsContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more