Struct sbp::messages::navigation::msg_vel_cog::MsgVelCog
source · [−]pub struct MsgVelCog {
pub sender_id: Option<u16>,
pub tow: u32,
pub cog: u32,
pub sog: u32,
pub v_up: i32,
pub cog_accuracy: u32,
pub sog_accuracy: u32,
pub v_up_accuracy: u32,
pub flags: u16,
}
Expand description
Velocity expressed as course over ground
This message reports the receiver course over ground (COG) and speed over ground (SOG) based on the horizontal (N-E) components of the NED velocity vector. It also includes the vertical velocity coordinate. A flag is provided to indicate whether the COG value has been frozen. When the flag is set to true, the COG field is set to its last valid value until the system exceeds a minimum velocity threshold. No other fields are affected by this flag. The NED coordinate system is defined as the local WGS84 tangent plane centered at the current position. The full GPS time is given by the preceding MSG_GPS_TIME with the matching time-of-week (tow). Note: course over ground represents the receiver’s direction of travel, but not necessarily the device heading.
Fields
sender_id: Option<u16>
The message sender_id
tow: u32
GPS Time of Week
cog: u32
Course over ground relative to north direction
sog: u32
Speed over ground (based on horizontal velocity)
v_up: i32
Vertical velocity component (positive up)
cog_accuracy: u32
Course over ground estimated standard deviation
sog_accuracy: u32
Speed over ground estimated standard deviation
v_up_accuracy: u32
Vertical velocity estimated standard deviation
flags: u16
Status flags
Implementations
sourceimpl MsgVelCog
impl MsgVelCog
sourcepub fn cog_frozen(&self) -> Result<CogFrozen, u8>
pub fn cog_frozen(&self) -> Result<CogFrozen, u8>
Gets the CogFrozen stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known CogFrozen
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 CogFrozen
were added.
sourcepub fn set_cog_frozen(&mut self, cog_frozen: CogFrozen)
pub fn set_cog_frozen(&mut self, cog_frozen: CogFrozen)
Set the bitrange corresponding to the CogFrozen of the flags
bitfield.
sourcepub fn vertical_velocity_validity(&self) -> Result<VerticalVelocityValidity, u8>
pub fn vertical_velocity_validity(&self) -> Result<VerticalVelocityValidity, u8>
Gets the VerticalVelocityValidity stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known VerticalVelocityValidity
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 VerticalVelocityValidity
were added.
sourcepub fn set_vertical_velocity_validity(
&mut self,
vertical_velocity_validity: VerticalVelocityValidity
)
pub fn set_vertical_velocity_validity(
&mut self,
vertical_velocity_validity: VerticalVelocityValidity
)
Set the bitrange corresponding to the VerticalVelocityValidity of the flags
bitfield.
sourcepub fn sog_validity(&self) -> Result<SogValidity, u8>
pub fn sog_validity(&self) -> Result<SogValidity, u8>
Gets the SogValidity stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known SogValidity
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 SogValidity
were added.
sourcepub fn set_sog_validity(&mut self, sog_validity: SogValidity)
pub fn set_sog_validity(&mut self, sog_validity: SogValidity)
Set the bitrange corresponding to the SogValidity of the flags
bitfield.
sourcepub fn cog_validity(&self) -> Result<CogValidity, u8>
pub fn cog_validity(&self) -> Result<CogValidity, u8>
Gets the CogValidity stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known CogValidity
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 CogValidity
were added.
sourcepub fn set_cog_validity(&mut self, cog_validity: CogValidity)
pub fn set_cog_validity(&mut self, cog_validity: CogValidity)
Set the bitrange corresponding to the CogValidity of the flags
bitfield.
sourcepub fn type_of_reported_tow(&self) -> Result<TypeOfReportedTow, u8>
pub fn type_of_reported_tow(&self) -> Result<TypeOfReportedTow, u8>
Gets the TypeOfReportedTow stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known TypeOfReportedTow
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 TypeOfReportedTow
were added.
sourcepub fn set_type_of_reported_tow(
&mut self,
type_of_reported_tow: TypeOfReportedTow
)
pub fn set_type_of_reported_tow(
&mut self,
type_of_reported_tow: TypeOfReportedTow
)
Set the bitrange corresponding to the TypeOfReportedTow of the flags
bitfield.
Gets the InsNavigationMode stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known InsNavigationMode
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 InsNavigationMode
were added.
Set the bitrange corresponding to the InsNavigationMode of the flags
bitfield.
sourcepub fn velocity_mode(&self) -> Result<VelocityMode, u8>
pub fn velocity_mode(&self) -> Result<VelocityMode, u8>
Gets the VelocityMode stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known VelocityMode
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 VelocityMode
were added.
sourcepub fn set_velocity_mode(&mut self, velocity_mode: VelocityMode)
pub fn set_velocity_mode(&mut self, velocity_mode: VelocityMode)
Set the bitrange corresponding to the VelocityMode of the flags
bitfield.
Trait Implementations
sourceimpl ConcreteMessage for MsgVelCog
impl ConcreteMessage for MsgVelCog
sourceconst MESSAGE_TYPE: u16 = 540u16
const MESSAGE_TYPE: u16 = 540u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_VEL_COG"
const MESSAGE_NAME: &'static str = "MSG_VEL_COG"
The message name.
sourceimpl SbpMessage for MsgVelCog
impl SbpMessage for MsgVelCog
sourcefn message_name(&self) -> &'static str
fn message_name(&self) -> &'static str
Get the message name.
sourcefn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type.
sourcefn set_sender_id(&mut self, new_id: u16)
fn set_sender_id(&mut self, new_id: u16)
Set the sender id.
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Number of bytes this message will take on the wire.
Auto Trait Implementations
impl RefUnwindSafe for MsgVelCog
impl Send for MsgVelCog
impl Sync for MsgVelCog
impl Unpin for MsgVelCog
impl UnwindSafe for MsgVelCog
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more