Struct sbp::messages::solution_meta::odo_input_type::OdoInputType
source · pub struct OdoInputType {
pub flags: u8,
}
Expand description
Provides detail about the Odometry sensor, its timestamping mode, and its quality for input to the fuzed solution
Metadata around the Odometry sensors involved in the fuzed solution. Accessible through sol_in[N].flags in a MSG_SOLN_META.
Fields§
§flags: u8
Instrument ODO rate, grade, and quality.
Implementations§
source§impl OdoInputType
impl OdoInputType
sourcepub fn rate(&self) -> Result<Rate, u8>
pub fn rate(&self) -> Result<Rate, u8>
Gets the Rate stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known Rate
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 Rate
were added.
sourcepub fn set_rate(&mut self, rate: Rate)
pub fn set_rate(&mut self, rate: Rate)
Set the bitrange corresponding to the Rate of the flags
bitfield.
sourcepub fn odometer_grade(&self) -> Result<OdometerGrade, u8>
pub fn odometer_grade(&self) -> Result<OdometerGrade, u8>
Gets the OdometerGrade stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known OdometerGrade
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 OdometerGrade
were added.
sourcepub fn set_odometer_grade(&mut self, odometer_grade: OdometerGrade)
pub fn set_odometer_grade(&mut self, odometer_grade: OdometerGrade)
Set the bitrange corresponding to the OdometerGrade of the flags
bitfield.
sourcepub fn odometer_class(&self) -> Result<OdometerClass, u8>
pub fn odometer_class(&self) -> Result<OdometerClass, u8>
Gets the OdometerClass stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known OdometerClass
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 OdometerClass
were added.
sourcepub fn set_odometer_class(&mut self, odometer_class: OdometerClass)
pub fn set_odometer_class(&mut self, odometer_class: OdometerClass)
Set the bitrange corresponding to the OdometerClass of the flags
bitfield.
Trait Implementations§
source§impl Clone for OdoInputType
impl Clone for OdoInputType
source§fn clone(&self) -> OdoInputType
fn clone(&self) -> OdoInputType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OdoInputType
impl Debug for OdoInputType
source§impl<'de> Deserialize<'de> for OdoInputType
impl<'de> Deserialize<'de> for OdoInputType
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 OdoInputType
impl PartialEq for OdoInputType
source§fn eq(&self, other: &OdoInputType) -> bool
fn eq(&self, other: &OdoInputType) -> bool
self
and other
values to be equal, and is used
by ==
.