pub use bounds_header::BoundsHeader;
pub use code_biases_content::CodeBiasesContent;
pub use code_phase_biases_sat_sig::CodePhaseBiasesSatSig;
pub use grid_definition_header_dep_a::GridDefinitionHeaderDepA;
pub use gridded_correction_header::GriddedCorrectionHeader;
pub use gridded_correction_header_dep_a::GriddedCorrectionHeaderDepA;
pub use msg_ssr_code_biases::MsgSsrCodeBiases;
pub use msg_ssr_code_phase_biases_bounds::MsgSsrCodePhaseBiasesBounds;
pub use msg_ssr_grid_definition_dep_a::MsgSsrGridDefinitionDepA;
pub use msg_ssr_gridded_correction::MsgSsrGriddedCorrection;
pub use msg_ssr_gridded_correction_bounds::MsgSsrGriddedCorrectionBounds;
pub use msg_ssr_gridded_correction_dep_a::MsgSsrGriddedCorrectionDepA;
pub use msg_ssr_gridded_correction_no_std_dep_a::MsgSsrGriddedCorrectionNoStdDepA;
pub use msg_ssr_orbit_clock::MsgSsrOrbitClock;
pub use msg_ssr_orbit_clock_bounds::MsgSsrOrbitClockBounds;
pub use msg_ssr_orbit_clock_bounds_degradation::MsgSsrOrbitClockBoundsDegradation;
pub use msg_ssr_orbit_clock_dep_a::MsgSsrOrbitClockDepA;
pub use msg_ssr_phase_biases::MsgSsrPhaseBiases;
pub use msg_ssr_satellite_apc::MsgSsrSatelliteApc;
pub use msg_ssr_satellite_apc_dep::MsgSsrSatelliteApcDep;
pub use msg_ssr_stec_correction::MsgSsrStecCorrection;
pub use msg_ssr_stec_correction_dep::MsgSsrStecCorrectionDep;
pub use msg_ssr_stec_correction_dep_a::MsgSsrStecCorrectionDepA;
pub use msg_ssr_tile_definition::MsgSsrTileDefinition;
pub use msg_ssr_tile_definition_dep_a::MsgSsrTileDefinitionDepA;
pub use msg_ssr_tile_definition_dep_b::MsgSsrTileDefinitionDepB;
pub use orbit_clock_bound::OrbitClockBound;
pub use orbit_clock_bound_degradation::OrbitClockBoundDegradation;
pub use phase_biases_content::PhaseBiasesContent;
pub use satellite_apc::SatelliteAPC;
pub use stec_header::STECHeader;
pub use stec_header_dep_a::STECHeaderDepA;
pub use stec_residual::STECResidual;
pub use stec_residual_no_std::STECResidualNoStd;
pub use stec_sat_element::STECSatElement;
pub use stec_sat_element_integrity::STECSatElementIntegrity;
pub use tropospheric_delay_correction::TroposphericDelayCorrection;
pub use tropospheric_delay_correction_no_std::TroposphericDelayCorrectionNoStd;
pub mod bounds_header {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct BoundsHeader {
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u8,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u8,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "sol_id"))]
pub sol_id: u8,
}
impl WireFormat for BoundsHeader {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.sol_id)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.sol_id, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
BoundsHeader {
time: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
sol_id: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod code_biases_content {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct CodeBiasesContent {
#[cfg_attr(feature = "serde", serde(rename = "code"))]
pub code: u8,
#[cfg_attr(feature = "serde", serde(rename = "value"))]
pub value: i16,
}
impl WireFormat for CodeBiasesContent {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN + <i16 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.code) + WireFormat::len(&self.value)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.code, buf);
WireFormat::write(&self.value, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
CodeBiasesContent {
code: WireFormat::parse_unchecked(buf),
value: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod code_phase_biases_sat_sig {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct CodePhaseBiasesSatSig {
#[cfg_attr(feature = "serde", serde(rename = "sat_id"))]
pub sat_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "signal_id"))]
pub signal_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "code_bias_bound_mu"))]
pub code_bias_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "code_bias_bound_sig"))]
pub code_bias_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "phase_bias_bound_mu"))]
pub phase_bias_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "phase_bias_bound_sig"))]
pub phase_bias_bound_sig: u8,
}
impl WireFormat for CodePhaseBiasesSatSig {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sat_id)
+ WireFormat::len(&self.signal_id)
+ WireFormat::len(&self.code_bias_bound_mu)
+ WireFormat::len(&self.code_bias_bound_sig)
+ WireFormat::len(&self.phase_bias_bound_mu)
+ WireFormat::len(&self.phase_bias_bound_sig)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sat_id, buf);
WireFormat::write(&self.signal_id, buf);
WireFormat::write(&self.code_bias_bound_mu, buf);
WireFormat::write(&self.code_bias_bound_sig, buf);
WireFormat::write(&self.phase_bias_bound_mu, buf);
WireFormat::write(&self.phase_bias_bound_sig, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
CodePhaseBiasesSatSig {
sat_id: WireFormat::parse_unchecked(buf),
signal_id: WireFormat::parse_unchecked(buf),
code_bias_bound_mu: WireFormat::parse_unchecked(buf),
code_bias_bound_sig: WireFormat::parse_unchecked(buf),
phase_bias_bound_mu: WireFormat::parse_unchecked(buf),
phase_bias_bound_sig: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod grid_definition_header_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct GridDefinitionHeaderDepA {
#[cfg_attr(feature = "serde", serde(rename = "region_size_inverse"))]
pub region_size_inverse: u8,
#[cfg_attr(feature = "serde", serde(rename = "area_width"))]
pub area_width: u16,
#[cfg_attr(feature = "serde", serde(rename = "lat_nw_corner_enc"))]
pub lat_nw_corner_enc: u16,
#[cfg_attr(feature = "serde", serde(rename = "lon_nw_corner_enc"))]
pub lon_nw_corner_enc: u16,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u8,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u8,
}
impl WireFormat for GridDefinitionHeaderDepA {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.region_size_inverse)
+ WireFormat::len(&self.area_width)
+ WireFormat::len(&self.lat_nw_corner_enc)
+ WireFormat::len(&self.lon_nw_corner_enc)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.region_size_inverse, buf);
WireFormat::write(&self.area_width, buf);
WireFormat::write(&self.lat_nw_corner_enc, buf);
WireFormat::write(&self.lon_nw_corner_enc, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
GridDefinitionHeaderDepA {
region_size_inverse: WireFormat::parse_unchecked(buf),
area_width: WireFormat::parse_unchecked(buf),
lat_nw_corner_enc: WireFormat::parse_unchecked(buf),
lon_nw_corner_enc: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod gridded_correction_header {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct GriddedCorrectionHeader {
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u16,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u16,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_atmo"))]
pub iod_atmo: u8,
#[cfg_attr(feature = "serde", serde(rename = "tropo_quality_indicator"))]
pub tropo_quality_indicator: u8,
}
impl WireFormat for GriddedCorrectionHeader {
const MIN_LEN: usize = <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <GpsTimeSec as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.time)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_atmo)
+ WireFormat::len(&self.tropo_quality_indicator)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.time, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_atmo, buf);
WireFormat::write(&self.tropo_quality_indicator, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
GriddedCorrectionHeader {
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
time: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_atmo: WireFormat::parse_unchecked(buf),
tropo_quality_indicator: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod gridded_correction_header_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct GriddedCorrectionHeaderDepA {
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u16,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u16,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_atmo"))]
pub iod_atmo: u8,
#[cfg_attr(feature = "serde", serde(rename = "tropo_quality_indicator"))]
pub tropo_quality_indicator: u8,
}
impl WireFormat for GriddedCorrectionHeaderDepA {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_atmo)
+ WireFormat::len(&self.tropo_quality_indicator)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_atmo, buf);
WireFormat::write(&self.tropo_quality_indicator, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
GriddedCorrectionHeaderDepA {
time: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_atmo: WireFormat::parse_unchecked(buf),
tropo_quality_indicator: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_code_biases {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrCodeBiases {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_ssr"))]
pub iod_ssr: u8,
#[cfg_attr(feature = "serde", serde(rename = "biases"))]
pub biases: Vec<CodeBiasesContent>,
}
impl ConcreteMessage for MsgSsrCodeBiases {
const MESSAGE_TYPE: u16 = 1505;
const MESSAGE_NAME: &'static str = "MSG_SSR_CODE_BIASES";
}
impl SbpMessage for MsgSsrCodeBiases {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrCodeBiases {
fn friendly_name() -> &'static str {
"SSR CODE BIASES"
}
}
impl TryFrom<Sbp> for MsgSsrCodeBiases {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrCodeBiases(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrCodeBiases {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<CodeBiasesContent> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_ssr)
+ WireFormat::len(&self.biases)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_ssr, buf);
WireFormat::write(&self.biases, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrCodeBiases {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_ssr: WireFormat::parse_unchecked(buf),
biases: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_code_phase_biases_bounds {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrCodePhaseBiasesBounds {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: BoundsHeader,
#[cfg_attr(feature = "serde", serde(rename = "ssr_iod"))]
pub ssr_iod: u8,
#[cfg_attr(feature = "serde", serde(rename = "const_id"))]
pub const_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "n_sats_signals"))]
pub n_sats_signals: u8,
#[cfg_attr(feature = "serde", serde(rename = "satellites_signals"))]
pub satellites_signals: Vec<CodePhaseBiasesSatSig>,
}
impl MsgSsrCodePhaseBiasesBounds {
pub fn const_id(&self) -> Result<ConstId, u8> {
get_bit_range!(self.const_id, u8, u8, 7, 0).try_into()
}
pub fn set_const_id(&mut self, const_id: ConstId) {
set_bit_range!(&mut self.const_id, const_id, u8, u8, 7, 0);
}
}
impl ConcreteMessage for MsgSsrCodePhaseBiasesBounds {
const MESSAGE_TYPE: u16 = 1516;
const MESSAGE_NAME: &'static str = "MSG_SSR_CODE_PHASE_BIASES_BOUNDS";
}
impl SbpMessage for MsgSsrCodePhaseBiasesBounds {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrCodePhaseBiasesBounds {
fn friendly_name() -> &'static str {
"SSR CODE PHASE BIASES BOUNDS"
}
}
impl TryFrom<Sbp> for MsgSsrCodePhaseBiasesBounds {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrCodePhaseBiasesBounds(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrCodePhaseBiasesBounds {
const MIN_LEN: usize = <BoundsHeader as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<CodePhaseBiasesSatSig> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.ssr_iod)
+ WireFormat::len(&self.const_id)
+ WireFormat::len(&self.n_sats_signals)
+ WireFormat::len(&self.satellites_signals)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.ssr_iod, buf);
WireFormat::write(&self.const_id, buf);
WireFormat::write(&self.n_sats_signals, buf);
WireFormat::write(&self.satellites_signals, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrCodePhaseBiasesBounds {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
ssr_iod: WireFormat::parse_unchecked(buf),
const_id: WireFormat::parse_unchecked(buf),
n_sats_signals: WireFormat::parse_unchecked(buf),
satellites_signals: WireFormat::parse_unchecked(buf),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConstId {
Gps = 0,
Bds = 3,
Gal = 5,
}
impl std::fmt::Display for ConstId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ConstId::Gps => f.write_str("GPS"),
ConstId::Bds => f.write_str("BDS"),
ConstId::Gal => f.write_str("GAL"),
}
}
}
impl TryFrom<u8> for ConstId {
type Error = u8;
fn try_from(i: u8) -> Result<Self, u8> {
match i {
0 => Ok(ConstId::Gps),
3 => Ok(ConstId::Bds),
5 => Ok(ConstId::Gal),
i => Err(i),
}
}
}
}
pub mod msg_ssr_gridded_correction {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrGriddedCorrection {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: GriddedCorrectionHeader,
#[cfg_attr(feature = "serde", serde(rename = "index"))]
pub index: u16,
#[cfg_attr(feature = "serde", serde(rename = "tropo_delay_correction"))]
pub tropo_delay_correction: TroposphericDelayCorrection,
#[cfg_attr(feature = "serde", serde(rename = "stec_residuals"))]
pub stec_residuals: Vec<STECResidual>,
}
impl ConcreteMessage for MsgSsrGriddedCorrection {
const MESSAGE_TYPE: u16 = 1532;
const MESSAGE_NAME: &'static str = "MSG_SSR_GRIDDED_CORRECTION";
}
impl SbpMessage for MsgSsrGriddedCorrection {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrGriddedCorrection {
fn friendly_name() -> &'static str {
"SSR GRIDDED CORRECTION"
}
}
impl TryFrom<Sbp> for MsgSsrGriddedCorrection {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrGriddedCorrection(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrGriddedCorrection {
const MIN_LEN: usize = <GriddedCorrectionHeader as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <TroposphericDelayCorrection as WireFormat>::MIN_LEN
+ <Vec<STECResidual> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.index)
+ WireFormat::len(&self.tropo_delay_correction)
+ WireFormat::len(&self.stec_residuals)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.index, buf);
WireFormat::write(&self.tropo_delay_correction, buf);
WireFormat::write(&self.stec_residuals, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrGriddedCorrection {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
index: WireFormat::parse_unchecked(buf),
tropo_delay_correction: WireFormat::parse_unchecked(buf),
stec_residuals: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_gridded_correction_bounds {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrGriddedCorrectionBounds {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: BoundsHeader,
#[cfg_attr(feature = "serde", serde(rename = "ssr_iod_atmo"))]
pub ssr_iod_atmo: u8,
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tropo_qi"))]
pub tropo_qi: u8,
#[cfg_attr(feature = "serde", serde(rename = "grid_point_id"))]
pub grid_point_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tropo_delay_correction"))]
pub tropo_delay_correction: TroposphericDelayCorrection,
#[cfg_attr(feature = "serde", serde(rename = "tropo_v_hydro_bound_mu"))]
pub tropo_v_hydro_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "tropo_v_hydro_bound_sig"))]
pub tropo_v_hydro_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "tropo_v_wet_bound_mu"))]
pub tropo_v_wet_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "tropo_v_wet_bound_sig"))]
pub tropo_v_wet_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "n_sats"))]
pub n_sats: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_sat_list"))]
pub stec_sat_list: Vec<STECSatElementIntegrity>,
}
impl ConcreteMessage for MsgSsrGriddedCorrectionBounds {
const MESSAGE_TYPE: u16 = 1534;
const MESSAGE_NAME: &'static str = "MSG_SSR_GRIDDED_CORRECTION_BOUNDS";
}
impl SbpMessage for MsgSsrGriddedCorrectionBounds {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrGriddedCorrectionBounds {
fn friendly_name() -> &'static str {
"SSR GRIDDED CORRECTION BOUNDS"
}
}
impl TryFrom<Sbp> for MsgSsrGriddedCorrectionBounds {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrGriddedCorrectionBounds(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrGriddedCorrectionBounds {
const MIN_LEN: usize = <BoundsHeader as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <TroposphericDelayCorrection as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<STECSatElementIntegrity> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.ssr_iod_atmo)
+ WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.tropo_qi)
+ WireFormat::len(&self.grid_point_id)
+ WireFormat::len(&self.tropo_delay_correction)
+ WireFormat::len(&self.tropo_v_hydro_bound_mu)
+ WireFormat::len(&self.tropo_v_hydro_bound_sig)
+ WireFormat::len(&self.tropo_v_wet_bound_mu)
+ WireFormat::len(&self.tropo_v_wet_bound_sig)
+ WireFormat::len(&self.n_sats)
+ WireFormat::len(&self.stec_sat_list)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.ssr_iod_atmo, buf);
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.tropo_qi, buf);
WireFormat::write(&self.grid_point_id, buf);
WireFormat::write(&self.tropo_delay_correction, buf);
WireFormat::write(&self.tropo_v_hydro_bound_mu, buf);
WireFormat::write(&self.tropo_v_hydro_bound_sig, buf);
WireFormat::write(&self.tropo_v_wet_bound_mu, buf);
WireFormat::write(&self.tropo_v_wet_bound_sig, buf);
WireFormat::write(&self.n_sats, buf);
WireFormat::write(&self.stec_sat_list, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrGriddedCorrectionBounds {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
ssr_iod_atmo: WireFormat::parse_unchecked(buf),
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
tropo_qi: WireFormat::parse_unchecked(buf),
grid_point_id: WireFormat::parse_unchecked(buf),
tropo_delay_correction: WireFormat::parse_unchecked(buf),
tropo_v_hydro_bound_mu: WireFormat::parse_unchecked(buf),
tropo_v_hydro_bound_sig: WireFormat::parse_unchecked(buf),
tropo_v_wet_bound_mu: WireFormat::parse_unchecked(buf),
tropo_v_wet_bound_sig: WireFormat::parse_unchecked(buf),
n_sats: WireFormat::parse_unchecked(buf),
stec_sat_list: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_gridded_correction_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrGriddedCorrectionDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: GriddedCorrectionHeaderDepA,
#[cfg_attr(feature = "serde", serde(rename = "index"))]
pub index: u16,
#[cfg_attr(feature = "serde", serde(rename = "tropo_delay_correction"))]
pub tropo_delay_correction: TroposphericDelayCorrection,
#[cfg_attr(feature = "serde", serde(rename = "stec_residuals"))]
pub stec_residuals: Vec<STECResidual>,
}
impl ConcreteMessage for MsgSsrGriddedCorrectionDepA {
const MESSAGE_TYPE: u16 = 1530;
const MESSAGE_NAME: &'static str = "MSG_SSR_GRIDDED_CORRECTION_DEP_A";
}
impl SbpMessage for MsgSsrGriddedCorrectionDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrGriddedCorrectionDepA {
fn friendly_name() -> &'static str {
"SSR GRIDDED CORRECTION DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrGriddedCorrectionDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrGriddedCorrectionDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrGriddedCorrectionDepA {
const MIN_LEN: usize = <GriddedCorrectionHeaderDepA as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <TroposphericDelayCorrection as WireFormat>::MIN_LEN
+ <Vec<STECResidual> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.index)
+ WireFormat::len(&self.tropo_delay_correction)
+ WireFormat::len(&self.stec_residuals)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.index, buf);
WireFormat::write(&self.tropo_delay_correction, buf);
WireFormat::write(&self.stec_residuals, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrGriddedCorrectionDepA {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
index: WireFormat::parse_unchecked(buf),
tropo_delay_correction: WireFormat::parse_unchecked(buf),
stec_residuals: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_gridded_correction_no_std_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrGriddedCorrectionNoStdDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: GriddedCorrectionHeaderDepA,
#[cfg_attr(feature = "serde", serde(rename = "index"))]
pub index: u16,
#[cfg_attr(feature = "serde", serde(rename = "tropo_delay_correction"))]
pub tropo_delay_correction: TroposphericDelayCorrectionNoStd,
#[cfg_attr(feature = "serde", serde(rename = "stec_residuals"))]
pub stec_residuals: Vec<STECResidualNoStd>,
}
impl ConcreteMessage for MsgSsrGriddedCorrectionNoStdDepA {
const MESSAGE_TYPE: u16 = 1520;
const MESSAGE_NAME: &'static str = "MSG_SSR_GRIDDED_CORRECTION_NO_STD_DEP_A";
}
impl SbpMessage for MsgSsrGriddedCorrectionNoStdDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrGriddedCorrectionNoStdDepA {
fn friendly_name() -> &'static str {
"SSR GRIDDED CORRECTION NO STD DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrGriddedCorrectionNoStdDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrGriddedCorrectionNoStdDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrGriddedCorrectionNoStdDepA {
const MIN_LEN: usize = <GriddedCorrectionHeaderDepA as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <TroposphericDelayCorrectionNoStd as WireFormat>::MIN_LEN
+ <Vec<STECResidualNoStd> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.index)
+ WireFormat::len(&self.tropo_delay_correction)
+ WireFormat::len(&self.stec_residuals)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.index, buf);
WireFormat::write(&self.tropo_delay_correction, buf);
WireFormat::write(&self.stec_residuals, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrGriddedCorrectionNoStdDepA {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
index: WireFormat::parse_unchecked(buf),
tropo_delay_correction: WireFormat::parse_unchecked(buf),
stec_residuals: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_grid_definition_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrGridDefinitionDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: GridDefinitionHeaderDepA,
#[cfg_attr(feature = "serde", serde(rename = "rle_list"))]
pub rle_list: Vec<u8>,
}
impl ConcreteMessage for MsgSsrGridDefinitionDepA {
const MESSAGE_TYPE: u16 = 1525;
const MESSAGE_NAME: &'static str = "MSG_SSR_GRID_DEFINITION_DEP_A";
}
impl SbpMessage for MsgSsrGridDefinitionDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrGridDefinitionDepA {
fn friendly_name() -> &'static str {
"SSR GRID DEFINITION DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrGridDefinitionDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrGridDefinitionDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrGridDefinitionDepA {
const MIN_LEN: usize =
<GridDefinitionHeaderDepA as WireFormat>::MIN_LEN + <Vec<u8> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header) + WireFormat::len(&self.rle_list)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.rle_list, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrGridDefinitionDepA {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
rle_list: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_orbit_clock {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrOrbitClock {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_ssr"))]
pub iod_ssr: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod"))]
pub iod: u32,
#[cfg_attr(feature = "serde", serde(rename = "radial"))]
pub radial: i32,
#[cfg_attr(feature = "serde", serde(rename = "along"))]
pub along: i32,
#[cfg_attr(feature = "serde", serde(rename = "cross"))]
pub cross: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_radial"))]
pub dot_radial: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_along"))]
pub dot_along: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_cross"))]
pub dot_cross: i32,
#[cfg_attr(feature = "serde", serde(rename = "c0"))]
pub c0: i32,
#[cfg_attr(feature = "serde", serde(rename = "c1"))]
pub c1: i32,
#[cfg_attr(feature = "serde", serde(rename = "c2"))]
pub c2: i32,
}
impl ConcreteMessage for MsgSsrOrbitClock {
const MESSAGE_TYPE: u16 = 1501;
const MESSAGE_NAME: &'static str = "MSG_SSR_ORBIT_CLOCK";
}
impl SbpMessage for MsgSsrOrbitClock {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrOrbitClock {
fn friendly_name() -> &'static str {
"SSR ORBIT CLOCK"
}
}
impl TryFrom<Sbp> for MsgSsrOrbitClock {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrOrbitClock(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrOrbitClock {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_ssr)
+ WireFormat::len(&self.iod)
+ WireFormat::len(&self.radial)
+ WireFormat::len(&self.along)
+ WireFormat::len(&self.cross)
+ WireFormat::len(&self.dot_radial)
+ WireFormat::len(&self.dot_along)
+ WireFormat::len(&self.dot_cross)
+ WireFormat::len(&self.c0)
+ WireFormat::len(&self.c1)
+ WireFormat::len(&self.c2)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_ssr, buf);
WireFormat::write(&self.iod, buf);
WireFormat::write(&self.radial, buf);
WireFormat::write(&self.along, buf);
WireFormat::write(&self.cross, buf);
WireFormat::write(&self.dot_radial, buf);
WireFormat::write(&self.dot_along, buf);
WireFormat::write(&self.dot_cross, buf);
WireFormat::write(&self.c0, buf);
WireFormat::write(&self.c1, buf);
WireFormat::write(&self.c2, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrOrbitClock {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_ssr: WireFormat::parse_unchecked(buf),
iod: WireFormat::parse_unchecked(buf),
radial: WireFormat::parse_unchecked(buf),
along: WireFormat::parse_unchecked(buf),
cross: WireFormat::parse_unchecked(buf),
dot_radial: WireFormat::parse_unchecked(buf),
dot_along: WireFormat::parse_unchecked(buf),
dot_cross: WireFormat::parse_unchecked(buf),
c0: WireFormat::parse_unchecked(buf),
c1: WireFormat::parse_unchecked(buf),
c2: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_orbit_clock_bounds {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrOrbitClockBounds {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: BoundsHeader,
#[cfg_attr(feature = "serde", serde(rename = "ssr_iod"))]
pub ssr_iod: u8,
#[cfg_attr(feature = "serde", serde(rename = "const_id"))]
pub const_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "n_sats"))]
pub n_sats: u8,
#[cfg_attr(feature = "serde", serde(rename = "orbit_clock_bounds"))]
pub orbit_clock_bounds: Vec<OrbitClockBound>,
}
impl MsgSsrOrbitClockBounds {
pub fn const_id(&self) -> Result<ConstId, u8> {
get_bit_range!(self.const_id, u8, u8, 7, 0).try_into()
}
pub fn set_const_id(&mut self, const_id: ConstId) {
set_bit_range!(&mut self.const_id, const_id, u8, u8, 7, 0);
}
}
impl ConcreteMessage for MsgSsrOrbitClockBounds {
const MESSAGE_TYPE: u16 = 1502;
const MESSAGE_NAME: &'static str = "MSG_SSR_ORBIT_CLOCK_BOUNDS";
}
impl SbpMessage for MsgSsrOrbitClockBounds {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrOrbitClockBounds {
fn friendly_name() -> &'static str {
"SSR ORBIT CLOCK BOUNDS"
}
}
impl TryFrom<Sbp> for MsgSsrOrbitClockBounds {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrOrbitClockBounds(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrOrbitClockBounds {
const MIN_LEN: usize = <BoundsHeader as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<OrbitClockBound> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.ssr_iod)
+ WireFormat::len(&self.const_id)
+ WireFormat::len(&self.n_sats)
+ WireFormat::len(&self.orbit_clock_bounds)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.ssr_iod, buf);
WireFormat::write(&self.const_id, buf);
WireFormat::write(&self.n_sats, buf);
WireFormat::write(&self.orbit_clock_bounds, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrOrbitClockBounds {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
ssr_iod: WireFormat::parse_unchecked(buf),
const_id: WireFormat::parse_unchecked(buf),
n_sats: WireFormat::parse_unchecked(buf),
orbit_clock_bounds: WireFormat::parse_unchecked(buf),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConstId {
Gps = 0,
Bds = 3,
Gal = 5,
}
impl std::fmt::Display for ConstId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ConstId::Gps => f.write_str("GPS"),
ConstId::Bds => f.write_str("BDS"),
ConstId::Gal => f.write_str("GAL"),
}
}
}
impl TryFrom<u8> for ConstId {
type Error = u8;
fn try_from(i: u8) -> Result<Self, u8> {
match i {
0 => Ok(ConstId::Gps),
3 => Ok(ConstId::Bds),
5 => Ok(ConstId::Gal),
i => Err(i),
}
}
}
}
pub mod msg_ssr_orbit_clock_bounds_degradation {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrOrbitClockBoundsDegradation {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: BoundsHeader,
#[cfg_attr(feature = "serde", serde(rename = "ssr_iod"))]
pub ssr_iod: u8,
#[cfg_attr(feature = "serde", serde(rename = "const_id"))]
pub const_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "sat_bitmask"))]
pub sat_bitmask: u64,
#[cfg_attr(feature = "serde", serde(rename = "orbit_clock_bounds_degradation"))]
pub orbit_clock_bounds_degradation: OrbitClockBoundDegradation,
}
impl MsgSsrOrbitClockBoundsDegradation {
pub fn const_id(&self) -> Result<ConstId, u8> {
get_bit_range!(self.const_id, u8, u8, 7, 0).try_into()
}
pub fn set_const_id(&mut self, const_id: ConstId) {
set_bit_range!(&mut self.const_id, const_id, u8, u8, 7, 0);
}
}
impl ConcreteMessage for MsgSsrOrbitClockBoundsDegradation {
const MESSAGE_TYPE: u16 = 1503;
const MESSAGE_NAME: &'static str = "MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION";
}
impl SbpMessage for MsgSsrOrbitClockBoundsDegradation {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrOrbitClockBoundsDegradation {
fn friendly_name() -> &'static str {
"SSR ORBIT CLOCK BOUNDS DEGRADATION"
}
}
impl TryFrom<Sbp> for MsgSsrOrbitClockBoundsDegradation {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrOrbitClockBoundsDegradation(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrOrbitClockBoundsDegradation {
const MIN_LEN: usize = <BoundsHeader as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u64 as WireFormat>::MIN_LEN
+ <OrbitClockBoundDegradation as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.ssr_iod)
+ WireFormat::len(&self.const_id)
+ WireFormat::len(&self.sat_bitmask)
+ WireFormat::len(&self.orbit_clock_bounds_degradation)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.ssr_iod, buf);
WireFormat::write(&self.const_id, buf);
WireFormat::write(&self.sat_bitmask, buf);
WireFormat::write(&self.orbit_clock_bounds_degradation, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrOrbitClockBoundsDegradation {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
ssr_iod: WireFormat::parse_unchecked(buf),
const_id: WireFormat::parse_unchecked(buf),
sat_bitmask: WireFormat::parse_unchecked(buf),
orbit_clock_bounds_degradation: WireFormat::parse_unchecked(buf),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConstId {
Gps = 0,
Bds = 3,
Gal = 5,
}
impl std::fmt::Display for ConstId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ConstId::Gps => f.write_str("GPS"),
ConstId::Bds => f.write_str("BDS"),
ConstId::Gal => f.write_str("GAL"),
}
}
}
impl TryFrom<u8> for ConstId {
type Error = u8;
fn try_from(i: u8) -> Result<Self, u8> {
match i {
0 => Ok(ConstId::Gps),
3 => Ok(ConstId::Bds),
5 => Ok(ConstId::Gal),
i => Err(i),
}
}
}
}
pub mod msg_ssr_orbit_clock_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrOrbitClockDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_ssr"))]
pub iod_ssr: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod"))]
pub iod: u8,
#[cfg_attr(feature = "serde", serde(rename = "radial"))]
pub radial: i32,
#[cfg_attr(feature = "serde", serde(rename = "along"))]
pub along: i32,
#[cfg_attr(feature = "serde", serde(rename = "cross"))]
pub cross: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_radial"))]
pub dot_radial: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_along"))]
pub dot_along: i32,
#[cfg_attr(feature = "serde", serde(rename = "dot_cross"))]
pub dot_cross: i32,
#[cfg_attr(feature = "serde", serde(rename = "c0"))]
pub c0: i32,
#[cfg_attr(feature = "serde", serde(rename = "c1"))]
pub c1: i32,
#[cfg_attr(feature = "serde", serde(rename = "c2"))]
pub c2: i32,
}
impl ConcreteMessage for MsgSsrOrbitClockDepA {
const MESSAGE_TYPE: u16 = 1500;
const MESSAGE_NAME: &'static str = "MSG_SSR_ORBIT_CLOCK_DEP_A";
}
impl SbpMessage for MsgSsrOrbitClockDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrOrbitClockDepA {
fn friendly_name() -> &'static str {
"SSR ORBIT CLOCK DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrOrbitClockDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrOrbitClockDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrOrbitClockDepA {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_ssr)
+ WireFormat::len(&self.iod)
+ WireFormat::len(&self.radial)
+ WireFormat::len(&self.along)
+ WireFormat::len(&self.cross)
+ WireFormat::len(&self.dot_radial)
+ WireFormat::len(&self.dot_along)
+ WireFormat::len(&self.dot_cross)
+ WireFormat::len(&self.c0)
+ WireFormat::len(&self.c1)
+ WireFormat::len(&self.c2)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_ssr, buf);
WireFormat::write(&self.iod, buf);
WireFormat::write(&self.radial, buf);
WireFormat::write(&self.along, buf);
WireFormat::write(&self.cross, buf);
WireFormat::write(&self.dot_radial, buf);
WireFormat::write(&self.dot_along, buf);
WireFormat::write(&self.dot_cross, buf);
WireFormat::write(&self.c0, buf);
WireFormat::write(&self.c1, buf);
WireFormat::write(&self.c2, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrOrbitClockDepA {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_ssr: WireFormat::parse_unchecked(buf),
iod: WireFormat::parse_unchecked(buf),
radial: WireFormat::parse_unchecked(buf),
along: WireFormat::parse_unchecked(buf),
cross: WireFormat::parse_unchecked(buf),
dot_radial: WireFormat::parse_unchecked(buf),
dot_along: WireFormat::parse_unchecked(buf),
dot_cross: WireFormat::parse_unchecked(buf),
c0: WireFormat::parse_unchecked(buf),
c1: WireFormat::parse_unchecked(buf),
c2: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_phase_biases {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrPhaseBiases {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_ssr"))]
pub iod_ssr: u8,
#[cfg_attr(feature = "serde", serde(rename = "dispersive_bias"))]
pub dispersive_bias: u8,
#[cfg_attr(feature = "serde", serde(rename = "mw_consistency"))]
pub mw_consistency: u8,
#[cfg_attr(feature = "serde", serde(rename = "yaw"))]
pub yaw: u16,
#[cfg_attr(feature = "serde", serde(rename = "yaw_rate"))]
pub yaw_rate: i8,
#[cfg_attr(feature = "serde", serde(rename = "biases"))]
pub biases: Vec<PhaseBiasesContent>,
}
impl ConcreteMessage for MsgSsrPhaseBiases {
const MESSAGE_TYPE: u16 = 1510;
const MESSAGE_NAME: &'static str = "MSG_SSR_PHASE_BIASES";
}
impl SbpMessage for MsgSsrPhaseBiases {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrPhaseBiases {
fn friendly_name() -> &'static str {
"SSR PHASE BIASES"
}
}
impl TryFrom<Sbp> for MsgSsrPhaseBiases {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrPhaseBiases(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrPhaseBiases {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <i8 as WireFormat>::MIN_LEN
+ <Vec<PhaseBiasesContent> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_ssr)
+ WireFormat::len(&self.dispersive_bias)
+ WireFormat::len(&self.mw_consistency)
+ WireFormat::len(&self.yaw)
+ WireFormat::len(&self.yaw_rate)
+ WireFormat::len(&self.biases)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_ssr, buf);
WireFormat::write(&self.dispersive_bias, buf);
WireFormat::write(&self.mw_consistency, buf);
WireFormat::write(&self.yaw, buf);
WireFormat::write(&self.yaw_rate, buf);
WireFormat::write(&self.biases, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrPhaseBiases {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_ssr: WireFormat::parse_unchecked(buf),
dispersive_bias: WireFormat::parse_unchecked(buf),
mw_consistency: WireFormat::parse_unchecked(buf),
yaw: WireFormat::parse_unchecked(buf),
yaw_rate: WireFormat::parse_unchecked(buf),
biases: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_satellite_apc {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrSatelliteApc {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "sol_id"))]
pub sol_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_ssr"))]
pub iod_ssr: u8,
#[cfg_attr(feature = "serde", serde(rename = "apc"))]
pub apc: Vec<SatelliteAPC>,
}
impl ConcreteMessage for MsgSsrSatelliteApc {
const MESSAGE_TYPE: u16 = 1541;
const MESSAGE_NAME: &'static str = "MSG_SSR_SATELLITE_APC";
}
impl SbpMessage for MsgSsrSatelliteApc {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrSatelliteApc {
fn friendly_name() -> &'static str {
"SSR SATELLITE APC"
}
}
impl TryFrom<Sbp> for MsgSsrSatelliteApc {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrSatelliteApc(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrSatelliteApc {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<SatelliteAPC> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.sol_id)
+ WireFormat::len(&self.iod_ssr)
+ WireFormat::len(&self.apc)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.sol_id, buf);
WireFormat::write(&self.iod_ssr, buf);
WireFormat::write(&self.apc, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrSatelliteApc {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
sol_id: WireFormat::parse_unchecked(buf),
iod_ssr: WireFormat::parse_unchecked(buf),
apc: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_satellite_apc_dep {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrSatelliteApcDep {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "apc"))]
pub apc: Vec<SatelliteAPC>,
}
impl ConcreteMessage for MsgSsrSatelliteApcDep {
const MESSAGE_TYPE: u16 = 1540;
const MESSAGE_NAME: &'static str = "MSG_SSR_SATELLITE_APC_DEP";
}
impl SbpMessage for MsgSsrSatelliteApcDep {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrSatelliteApcDep {
fn friendly_name() -> &'static str {
"SSR SATELLITE APC DEP"
}
}
impl TryFrom<Sbp> for MsgSsrSatelliteApcDep {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrSatelliteApcDep(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrSatelliteApcDep {
const MIN_LEN: usize = <Vec<SatelliteAPC> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.apc)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.apc, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrSatelliteApcDep {
sender_id: None,
apc: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_stec_correction {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrStecCorrection {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: BoundsHeader,
#[cfg_attr(feature = "serde", serde(rename = "ssr_iod_atmo"))]
pub ssr_iod_atmo: u8,
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "n_sats"))]
pub n_sats: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_sat_list"))]
pub stec_sat_list: Vec<STECSatElement>,
}
impl ConcreteMessage for MsgSsrStecCorrection {
const MESSAGE_TYPE: u16 = 1533;
const MESSAGE_NAME: &'static str = "MSG_SSR_STEC_CORRECTION";
}
impl SbpMessage for MsgSsrStecCorrection {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrStecCorrection {
fn friendly_name() -> &'static str {
"SSR STEC CORRECTION"
}
}
impl TryFrom<Sbp> for MsgSsrStecCorrection {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrStecCorrection(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrStecCorrection {
const MIN_LEN: usize = <BoundsHeader as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <Vec<STECSatElement> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header)
+ WireFormat::len(&self.ssr_iod_atmo)
+ WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.n_sats)
+ WireFormat::len(&self.stec_sat_list)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.ssr_iod_atmo, buf);
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.n_sats, buf);
WireFormat::write(&self.stec_sat_list, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrStecCorrection {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
ssr_iod_atmo: WireFormat::parse_unchecked(buf),
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
n_sats: WireFormat::parse_unchecked(buf),
stec_sat_list: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_stec_correction_dep {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrStecCorrectionDep {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: STECHeader,
#[cfg_attr(feature = "serde", serde(rename = "stec_sat_list"))]
pub stec_sat_list: Vec<STECSatElement>,
}
impl ConcreteMessage for MsgSsrStecCorrectionDep {
const MESSAGE_TYPE: u16 = 1531;
const MESSAGE_NAME: &'static str = "MSG_SSR_STEC_CORRECTION_DEP";
}
impl SbpMessage for MsgSsrStecCorrectionDep {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrStecCorrectionDep {
fn friendly_name() -> &'static str {
"SSR STEC CORRECTION DEP"
}
}
impl TryFrom<Sbp> for MsgSsrStecCorrectionDep {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrStecCorrectionDep(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrStecCorrectionDep {
const MIN_LEN: usize =
<STECHeader as WireFormat>::MIN_LEN + <Vec<STECSatElement> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header) + WireFormat::len(&self.stec_sat_list)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.stec_sat_list, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrStecCorrectionDep {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
stec_sat_list: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_stec_correction_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrStecCorrectionDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "header"))]
pub header: STECHeaderDepA,
#[cfg_attr(feature = "serde", serde(rename = "stec_sat_list"))]
pub stec_sat_list: Vec<STECSatElement>,
}
impl ConcreteMessage for MsgSsrStecCorrectionDepA {
const MESSAGE_TYPE: u16 = 1515;
const MESSAGE_NAME: &'static str = "MSG_SSR_STEC_CORRECTION_DEP_A";
}
impl SbpMessage for MsgSsrStecCorrectionDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrStecCorrectionDepA {
fn friendly_name() -> &'static str {
"SSR STEC CORRECTION DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrStecCorrectionDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrStecCorrectionDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrStecCorrectionDepA {
const MIN_LEN: usize =
<STECHeaderDepA as WireFormat>::MIN_LEN + <Vec<STECSatElement> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.header) + WireFormat::len(&self.stec_sat_list)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.header, buf);
WireFormat::write(&self.stec_sat_list, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrStecCorrectionDepA {
sender_id: None,
header: WireFormat::parse_unchecked(buf),
stec_sat_list: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_tile_definition {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrTileDefinition {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "sol_id"))]
pub sol_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_atmo"))]
pub iod_atmo: u8,
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lat"))]
pub corner_nw_lat: i16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lon"))]
pub corner_nw_lon: i16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lat"))]
pub spacing_lat: u16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lon"))]
pub spacing_lon: u16,
#[cfg_attr(feature = "serde", serde(rename = "rows"))]
pub rows: u16,
#[cfg_attr(feature = "serde", serde(rename = "cols"))]
pub cols: u16,
#[cfg_attr(feature = "serde", serde(rename = "bitmask"))]
pub bitmask: u64,
}
impl ConcreteMessage for MsgSsrTileDefinition {
const MESSAGE_TYPE: u16 = 1528;
const MESSAGE_NAME: &'static str = "MSG_SSR_TILE_DEFINITION";
}
impl SbpMessage for MsgSsrTileDefinition {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrTileDefinition {
fn friendly_name() -> &'static str {
"SSR TILE DEFINITION"
}
}
impl TryFrom<Sbp> for MsgSsrTileDefinition {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrTileDefinition(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrTileDefinition {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u64 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.sol_id)
+ WireFormat::len(&self.iod_atmo)
+ WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.corner_nw_lat)
+ WireFormat::len(&self.corner_nw_lon)
+ WireFormat::len(&self.spacing_lat)
+ WireFormat::len(&self.spacing_lon)
+ WireFormat::len(&self.rows)
+ WireFormat::len(&self.cols)
+ WireFormat::len(&self.bitmask)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.sol_id, buf);
WireFormat::write(&self.iod_atmo, buf);
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.corner_nw_lat, buf);
WireFormat::write(&self.corner_nw_lon, buf);
WireFormat::write(&self.spacing_lat, buf);
WireFormat::write(&self.spacing_lon, buf);
WireFormat::write(&self.rows, buf);
WireFormat::write(&self.cols, buf);
WireFormat::write(&self.bitmask, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrTileDefinition {
sender_id: None,
time: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
sol_id: WireFormat::parse_unchecked(buf),
iod_atmo: WireFormat::parse_unchecked(buf),
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
corner_nw_lat: WireFormat::parse_unchecked(buf),
corner_nw_lon: WireFormat::parse_unchecked(buf),
spacing_lat: WireFormat::parse_unchecked(buf),
spacing_lon: WireFormat::parse_unchecked(buf),
rows: WireFormat::parse_unchecked(buf),
cols: WireFormat::parse_unchecked(buf),
bitmask: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_tile_definition_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrTileDefinitionDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lat"))]
pub corner_nw_lat: i16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lon"))]
pub corner_nw_lon: i16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lat"))]
pub spacing_lat: u16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lon"))]
pub spacing_lon: u16,
#[cfg_attr(feature = "serde", serde(rename = "rows"))]
pub rows: u16,
#[cfg_attr(feature = "serde", serde(rename = "cols"))]
pub cols: u16,
#[cfg_attr(feature = "serde", serde(rename = "bitmask"))]
pub bitmask: u64,
}
impl ConcreteMessage for MsgSsrTileDefinitionDepA {
const MESSAGE_TYPE: u16 = 1526;
const MESSAGE_NAME: &'static str = "MSG_SSR_TILE_DEFINITION_DEP_A";
}
impl SbpMessage for MsgSsrTileDefinitionDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrTileDefinitionDepA {
fn friendly_name() -> &'static str {
"SSR TILE DEFINITION DEP A"
}
}
impl TryFrom<Sbp> for MsgSsrTileDefinitionDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrTileDefinitionDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrTileDefinitionDepA {
const MIN_LEN: usize = <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u64 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.corner_nw_lat)
+ WireFormat::len(&self.corner_nw_lon)
+ WireFormat::len(&self.spacing_lat)
+ WireFormat::len(&self.spacing_lon)
+ WireFormat::len(&self.rows)
+ WireFormat::len(&self.cols)
+ WireFormat::len(&self.bitmask)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.corner_nw_lat, buf);
WireFormat::write(&self.corner_nw_lon, buf);
WireFormat::write(&self.spacing_lat, buf);
WireFormat::write(&self.spacing_lon, buf);
WireFormat::write(&self.rows, buf);
WireFormat::write(&self.cols, buf);
WireFormat::write(&self.bitmask, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrTileDefinitionDepA {
sender_id: None,
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
corner_nw_lat: WireFormat::parse_unchecked(buf),
corner_nw_lon: WireFormat::parse_unchecked(buf),
spacing_lat: WireFormat::parse_unchecked(buf),
spacing_lon: WireFormat::parse_unchecked(buf),
rows: WireFormat::parse_unchecked(buf),
cols: WireFormat::parse_unchecked(buf),
bitmask: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_ssr_tile_definition_dep_b {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgSsrTileDefinitionDepB {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "ssr_sol_id"))]
pub ssr_sol_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lat"))]
pub corner_nw_lat: i16,
#[cfg_attr(feature = "serde", serde(rename = "corner_nw_lon"))]
pub corner_nw_lon: i16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lat"))]
pub spacing_lat: u16,
#[cfg_attr(feature = "serde", serde(rename = "spacing_lon"))]
pub spacing_lon: u16,
#[cfg_attr(feature = "serde", serde(rename = "rows"))]
pub rows: u16,
#[cfg_attr(feature = "serde", serde(rename = "cols"))]
pub cols: u16,
#[cfg_attr(feature = "serde", serde(rename = "bitmask"))]
pub bitmask: u64,
}
impl ConcreteMessage for MsgSsrTileDefinitionDepB {
const MESSAGE_TYPE: u16 = 1527;
const MESSAGE_NAME: &'static str = "MSG_SSR_TILE_DEFINITION_DEP_B";
}
impl SbpMessage for MsgSsrTileDefinitionDepB {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgSsrTileDefinitionDepB {
fn friendly_name() -> &'static str {
"SSR TILE DEFINITION DEP B"
}
}
impl TryFrom<Sbp> for MsgSsrTileDefinitionDepB {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgSsrTileDefinitionDepB(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgSsrTileDefinitionDepB {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u64 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.ssr_sol_id)
+ WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.corner_nw_lat)
+ WireFormat::len(&self.corner_nw_lon)
+ WireFormat::len(&self.spacing_lat)
+ WireFormat::len(&self.spacing_lon)
+ WireFormat::len(&self.rows)
+ WireFormat::len(&self.cols)
+ WireFormat::len(&self.bitmask)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.ssr_sol_id, buf);
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.corner_nw_lat, buf);
WireFormat::write(&self.corner_nw_lon, buf);
WireFormat::write(&self.spacing_lat, buf);
WireFormat::write(&self.spacing_lon, buf);
WireFormat::write(&self.rows, buf);
WireFormat::write(&self.cols, buf);
WireFormat::write(&self.bitmask, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgSsrTileDefinitionDepB {
sender_id: None,
ssr_sol_id: WireFormat::parse_unchecked(buf),
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
corner_nw_lat: WireFormat::parse_unchecked(buf),
corner_nw_lon: WireFormat::parse_unchecked(buf),
spacing_lat: WireFormat::parse_unchecked(buf),
spacing_lon: WireFormat::parse_unchecked(buf),
rows: WireFormat::parse_unchecked(buf),
cols: WireFormat::parse_unchecked(buf),
bitmask: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod orbit_clock_bound {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct OrbitClockBound {
#[cfg_attr(feature = "serde", serde(rename = "sat_id"))]
pub sat_id: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_radial_bound_mu"))]
pub orb_radial_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_along_bound_mu"))]
pub orb_along_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_cross_bound_mu"))]
pub orb_cross_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_radial_bound_sig"))]
pub orb_radial_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_along_bound_sig"))]
pub orb_along_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_cross_bound_sig"))]
pub orb_cross_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "clock_bound_mu"))]
pub clock_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "clock_bound_sig"))]
pub clock_bound_sig: u8,
}
impl WireFormat for OrbitClockBound {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sat_id)
+ WireFormat::len(&self.orb_radial_bound_mu)
+ WireFormat::len(&self.orb_along_bound_mu)
+ WireFormat::len(&self.orb_cross_bound_mu)
+ WireFormat::len(&self.orb_radial_bound_sig)
+ WireFormat::len(&self.orb_along_bound_sig)
+ WireFormat::len(&self.orb_cross_bound_sig)
+ WireFormat::len(&self.clock_bound_mu)
+ WireFormat::len(&self.clock_bound_sig)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sat_id, buf);
WireFormat::write(&self.orb_radial_bound_mu, buf);
WireFormat::write(&self.orb_along_bound_mu, buf);
WireFormat::write(&self.orb_cross_bound_mu, buf);
WireFormat::write(&self.orb_radial_bound_sig, buf);
WireFormat::write(&self.orb_along_bound_sig, buf);
WireFormat::write(&self.orb_cross_bound_sig, buf);
WireFormat::write(&self.clock_bound_mu, buf);
WireFormat::write(&self.clock_bound_sig, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
OrbitClockBound {
sat_id: WireFormat::parse_unchecked(buf),
orb_radial_bound_mu: WireFormat::parse_unchecked(buf),
orb_along_bound_mu: WireFormat::parse_unchecked(buf),
orb_cross_bound_mu: WireFormat::parse_unchecked(buf),
orb_radial_bound_sig: WireFormat::parse_unchecked(buf),
orb_along_bound_sig: WireFormat::parse_unchecked(buf),
orb_cross_bound_sig: WireFormat::parse_unchecked(buf),
clock_bound_mu: WireFormat::parse_unchecked(buf),
clock_bound_sig: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod orbit_clock_bound_degradation {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct OrbitClockBoundDegradation {
#[cfg_attr(feature = "serde", serde(rename = "orb_radial_bound_mu_dot"))]
pub orb_radial_bound_mu_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_along_bound_mu_dot"))]
pub orb_along_bound_mu_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_cross_bound_mu_dot"))]
pub orb_cross_bound_mu_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_radial_bound_sig_dot"))]
pub orb_radial_bound_sig_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_along_bound_sig_dot"))]
pub orb_along_bound_sig_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "orb_cross_bound_sig_dot"))]
pub orb_cross_bound_sig_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "clock_bound_mu_dot"))]
pub clock_bound_mu_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "clock_bound_sig_dot"))]
pub clock_bound_sig_dot: u8,
}
impl WireFormat for OrbitClockBoundDegradation {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.orb_radial_bound_mu_dot)
+ WireFormat::len(&self.orb_along_bound_mu_dot)
+ WireFormat::len(&self.orb_cross_bound_mu_dot)
+ WireFormat::len(&self.orb_radial_bound_sig_dot)
+ WireFormat::len(&self.orb_along_bound_sig_dot)
+ WireFormat::len(&self.orb_cross_bound_sig_dot)
+ WireFormat::len(&self.clock_bound_mu_dot)
+ WireFormat::len(&self.clock_bound_sig_dot)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.orb_radial_bound_mu_dot, buf);
WireFormat::write(&self.orb_along_bound_mu_dot, buf);
WireFormat::write(&self.orb_cross_bound_mu_dot, buf);
WireFormat::write(&self.orb_radial_bound_sig_dot, buf);
WireFormat::write(&self.orb_along_bound_sig_dot, buf);
WireFormat::write(&self.orb_cross_bound_sig_dot, buf);
WireFormat::write(&self.clock_bound_mu_dot, buf);
WireFormat::write(&self.clock_bound_sig_dot, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
OrbitClockBoundDegradation {
orb_radial_bound_mu_dot: WireFormat::parse_unchecked(buf),
orb_along_bound_mu_dot: WireFormat::parse_unchecked(buf),
orb_cross_bound_mu_dot: WireFormat::parse_unchecked(buf),
orb_radial_bound_sig_dot: WireFormat::parse_unchecked(buf),
orb_along_bound_sig_dot: WireFormat::parse_unchecked(buf),
orb_cross_bound_sig_dot: WireFormat::parse_unchecked(buf),
clock_bound_mu_dot: WireFormat::parse_unchecked(buf),
clock_bound_sig_dot: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod phase_biases_content {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct PhaseBiasesContent {
#[cfg_attr(feature = "serde", serde(rename = "code"))]
pub code: u8,
#[cfg_attr(feature = "serde", serde(rename = "integer_indicator"))]
pub integer_indicator: u8,
#[cfg_attr(feature = "serde", serde(rename = "widelane_integer_indicator"))]
pub widelane_integer_indicator: u8,
#[cfg_attr(feature = "serde", serde(rename = "discontinuity_counter"))]
pub discontinuity_counter: u8,
#[cfg_attr(feature = "serde", serde(rename = "bias"))]
pub bias: i32,
}
impl WireFormat for PhaseBiasesContent {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.code)
+ WireFormat::len(&self.integer_indicator)
+ WireFormat::len(&self.widelane_integer_indicator)
+ WireFormat::len(&self.discontinuity_counter)
+ WireFormat::len(&self.bias)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.code, buf);
WireFormat::write(&self.integer_indicator, buf);
WireFormat::write(&self.widelane_integer_indicator, buf);
WireFormat::write(&self.discontinuity_counter, buf);
WireFormat::write(&self.bias, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
PhaseBiasesContent {
code: WireFormat::parse_unchecked(buf),
integer_indicator: WireFormat::parse_unchecked(buf),
widelane_integer_indicator: WireFormat::parse_unchecked(buf),
discontinuity_counter: WireFormat::parse_unchecked(buf),
bias: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_header {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECHeader {
#[cfg_attr(feature = "serde", serde(rename = "tile_set_id"))]
pub tile_set_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "tile_id"))]
pub tile_id: u16,
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u8,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u8,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_atmo"))]
pub iod_atmo: u8,
}
impl WireFormat for STECHeader {
const MIN_LEN: usize = <u16 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <GpsTimeSec as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.tile_set_id)
+ WireFormat::len(&self.tile_id)
+ WireFormat::len(&self.time)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_atmo)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.tile_set_id, buf);
WireFormat::write(&self.tile_id, buf);
WireFormat::write(&self.time, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_atmo, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECHeader {
tile_set_id: WireFormat::parse_unchecked(buf),
tile_id: WireFormat::parse_unchecked(buf),
time: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_atmo: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_header_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECHeaderDepA {
#[cfg_attr(feature = "serde", serde(rename = "time"))]
pub time: GpsTimeSec,
#[cfg_attr(feature = "serde", serde(rename = "num_msgs"))]
pub num_msgs: u8,
#[cfg_attr(feature = "serde", serde(rename = "seq_num"))]
pub seq_num: u8,
#[cfg_attr(feature = "serde", serde(rename = "update_interval"))]
pub update_interval: u8,
#[cfg_attr(feature = "serde", serde(rename = "iod_atmo"))]
pub iod_atmo: u8,
}
impl WireFormat for STECHeaderDepA {
const MIN_LEN: usize = <GpsTimeSec as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.time)
+ WireFormat::len(&self.num_msgs)
+ WireFormat::len(&self.seq_num)
+ WireFormat::len(&self.update_interval)
+ WireFormat::len(&self.iod_atmo)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.time, buf);
WireFormat::write(&self.num_msgs, buf);
WireFormat::write(&self.seq_num, buf);
WireFormat::write(&self.update_interval, buf);
WireFormat::write(&self.iod_atmo, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECHeaderDepA {
time: WireFormat::parse_unchecked(buf),
num_msgs: WireFormat::parse_unchecked(buf),
seq_num: WireFormat::parse_unchecked(buf),
update_interval: WireFormat::parse_unchecked(buf),
iod_atmo: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_residual {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECResidual {
#[cfg_attr(feature = "serde", serde(rename = "sv_id"))]
pub sv_id: SvId,
#[cfg_attr(feature = "serde", serde(rename = "residual"))]
pub residual: i16,
#[cfg_attr(feature = "serde", serde(rename = "stddev"))]
pub stddev: u8,
}
impl WireFormat for STECResidual {
const MIN_LEN: usize = <SvId as WireFormat>::MIN_LEN
+ <i16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sv_id)
+ WireFormat::len(&self.residual)
+ WireFormat::len(&self.stddev)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sv_id, buf);
WireFormat::write(&self.residual, buf);
WireFormat::write(&self.stddev, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECResidual {
sv_id: WireFormat::parse_unchecked(buf),
residual: WireFormat::parse_unchecked(buf),
stddev: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_residual_no_std {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECResidualNoStd {
#[cfg_attr(feature = "serde", serde(rename = "sv_id"))]
pub sv_id: SvId,
#[cfg_attr(feature = "serde", serde(rename = "residual"))]
pub residual: i16,
}
impl WireFormat for STECResidualNoStd {
const MIN_LEN: usize = <SvId as WireFormat>::MIN_LEN + <i16 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sv_id) + WireFormat::len(&self.residual)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sv_id, buf);
WireFormat::write(&self.residual, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECResidualNoStd {
sv_id: WireFormat::parse_unchecked(buf),
residual: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_sat_element {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECSatElement {
#[cfg_attr(feature = "serde", serde(rename = "sv_id"))]
pub sv_id: SvId,
#[cfg_attr(feature = "serde", serde(rename = "stec_quality_indicator"))]
pub stec_quality_indicator: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_coeff"))]
pub stec_coeff: [i16; 4],
}
impl WireFormat for STECSatElement {
const MIN_LEN: usize = <SvId as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <[i16; 4] as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sv_id)
+ WireFormat::len(&self.stec_quality_indicator)
+ WireFormat::len(&self.stec_coeff)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sv_id, buf);
WireFormat::write(&self.stec_quality_indicator, buf);
WireFormat::write(&self.stec_coeff, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECSatElement {
sv_id: WireFormat::parse_unchecked(buf),
stec_quality_indicator: WireFormat::parse_unchecked(buf),
stec_coeff: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod stec_sat_element_integrity {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct STECSatElementIntegrity {
#[cfg_attr(feature = "serde", serde(rename = "stec_residual"))]
pub stec_residual: STECResidual,
#[cfg_attr(feature = "serde", serde(rename = "stec_bound_mu"))]
pub stec_bound_mu: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_bound_sig"))]
pub stec_bound_sig: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_bound_mu_dot"))]
pub stec_bound_mu_dot: u8,
#[cfg_attr(feature = "serde", serde(rename = "stec_bound_sig_dot"))]
pub stec_bound_sig_dot: u8,
}
impl WireFormat for STECSatElementIntegrity {
const MIN_LEN: usize = <STECResidual as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.stec_residual)
+ WireFormat::len(&self.stec_bound_mu)
+ WireFormat::len(&self.stec_bound_sig)
+ WireFormat::len(&self.stec_bound_mu_dot)
+ WireFormat::len(&self.stec_bound_sig_dot)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.stec_residual, buf);
WireFormat::write(&self.stec_bound_mu, buf);
WireFormat::write(&self.stec_bound_sig, buf);
WireFormat::write(&self.stec_bound_mu_dot, buf);
WireFormat::write(&self.stec_bound_sig_dot, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
STECSatElementIntegrity {
stec_residual: WireFormat::parse_unchecked(buf),
stec_bound_mu: WireFormat::parse_unchecked(buf),
stec_bound_sig: WireFormat::parse_unchecked(buf),
stec_bound_mu_dot: WireFormat::parse_unchecked(buf),
stec_bound_sig_dot: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod satellite_apc {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct SatelliteAPC {
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "sat_info"))]
pub sat_info: u8,
#[cfg_attr(feature = "serde", serde(rename = "svn"))]
pub svn: u16,
#[cfg_attr(feature = "serde", serde(rename = "pco"))]
pub pco: [i16; 3],
#[cfg_attr(feature = "serde", serde(rename = "pcv"))]
pub pcv: [i8; 21],
}
impl SatelliteAPC {
pub fn satellite_type(&self) -> Result<SatelliteType, u8> {
get_bit_range!(self.sat_info, u8, u8, 4, 0).try_into()
}
pub fn set_satellite_type(&mut self, satellite_type: SatelliteType) {
set_bit_range!(&mut self.sat_info, satellite_type, u8, u8, 4, 0);
}
}
impl WireFormat for SatelliteAPC {
const MIN_LEN: usize = <GnssSignal as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <[i16; 3] as WireFormat>::MIN_LEN
+ <[i8; 21] as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.sid)
+ WireFormat::len(&self.sat_info)
+ WireFormat::len(&self.svn)
+ WireFormat::len(&self.pco)
+ WireFormat::len(&self.pcv)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.sat_info, buf);
WireFormat::write(&self.svn, buf);
WireFormat::write(&self.pco, buf);
WireFormat::write(&self.pcv, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
SatelliteAPC {
sid: WireFormat::parse_unchecked(buf),
sat_info: WireFormat::parse_unchecked(buf),
svn: WireFormat::parse_unchecked(buf),
pco: WireFormat::parse_unchecked(buf),
pcv: WireFormat::parse_unchecked(buf),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum SatelliteType {
UnknownType = 0,
GpsI = 1,
GpsIi = 2,
GpsIia = 3,
GpsIir = 4,
GpsIif = 5,
GpsIii = 6,
Glonass = 7,
GlonassM = 8,
GlonassK1 = 9,
Galileo = 10,
Beidou2G = 11,
Beidou2I = 12,
Beidou2M = 13,
Beidou3MSecm = 14,
Beidou3GSecm = 15,
Beidou3MCast = 16,
Beidou3GCast = 17,
Beidou3ICast = 18,
Qzss = 19,
Beidou3I = 20,
Beidou3SmCast = 21,
Beidou3SiCast = 22,
Beidou3SmSecm = 23,
Beidou3SiSecm = 24,
}
impl std::fmt::Display for SatelliteType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
SatelliteType::UnknownType => f.write_str("Unknown Type"),
SatelliteType::GpsI => f.write_str("GPS I"),
SatelliteType::GpsIi => f.write_str("GPS II"),
SatelliteType::GpsIia => f.write_str("GPS IIA"),
SatelliteType::GpsIir => f.write_str("GPS IIR"),
SatelliteType::GpsIif => f.write_str("GPS IIF"),
SatelliteType::GpsIii => f.write_str("GPS III"),
SatelliteType::Glonass => f.write_str("GLONASS"),
SatelliteType::GlonassM => f.write_str("GLONASS M"),
SatelliteType::GlonassK1 => f.write_str("GLONASS K1"),
SatelliteType::Galileo => f.write_str("GALILEO"),
SatelliteType::Beidou2G => f.write_str("BEIDOU 2G"),
SatelliteType::Beidou2I => f.write_str("BEIDOU 2I"),
SatelliteType::Beidou2M => f.write_str("BEIDOU 2M"),
SatelliteType::Beidou3MSecm => f.write_str("BEIDOU 3M, SECM"),
SatelliteType::Beidou3GSecm => f.write_str("BEIDOU 3G, SECM"),
SatelliteType::Beidou3MCast => f.write_str("BEIDOU 3M, CAST"),
SatelliteType::Beidou3GCast => f.write_str("BEIDOU 3G, CAST"),
SatelliteType::Beidou3ICast => f.write_str("BEIDOU 3I, CAST"),
SatelliteType::Qzss => f.write_str("QZSS"),
SatelliteType::Beidou3I => f.write_str("BEIDOU 3I"),
SatelliteType::Beidou3SmCast => f.write_str("BEIDOU 3SM, CAST"),
SatelliteType::Beidou3SiCast => f.write_str("BEIDOU 3SI, CAST"),
SatelliteType::Beidou3SmSecm => f.write_str("BEIDOU 3SM, SECM"),
SatelliteType::Beidou3SiSecm => f.write_str("BEIDOU 3SI, SECM"),
}
}
}
impl TryFrom<u8> for SatelliteType {
type Error = u8;
fn try_from(i: u8) -> Result<Self, u8> {
match i {
0 => Ok(SatelliteType::UnknownType),
1 => Ok(SatelliteType::GpsI),
2 => Ok(SatelliteType::GpsIi),
3 => Ok(SatelliteType::GpsIia),
4 => Ok(SatelliteType::GpsIir),
5 => Ok(SatelliteType::GpsIif),
6 => Ok(SatelliteType::GpsIii),
7 => Ok(SatelliteType::Glonass),
8 => Ok(SatelliteType::GlonassM),
9 => Ok(SatelliteType::GlonassK1),
10 => Ok(SatelliteType::Galileo),
11 => Ok(SatelliteType::Beidou2G),
12 => Ok(SatelliteType::Beidou2I),
13 => Ok(SatelliteType::Beidou2M),
14 => Ok(SatelliteType::Beidou3MSecm),
15 => Ok(SatelliteType::Beidou3GSecm),
16 => Ok(SatelliteType::Beidou3MCast),
17 => Ok(SatelliteType::Beidou3GCast),
18 => Ok(SatelliteType::Beidou3ICast),
19 => Ok(SatelliteType::Qzss),
20 => Ok(SatelliteType::Beidou3I),
21 => Ok(SatelliteType::Beidou3SmCast),
22 => Ok(SatelliteType::Beidou3SiCast),
23 => Ok(SatelliteType::Beidou3SmSecm),
24 => Ok(SatelliteType::Beidou3SiSecm),
i => Err(i),
}
}
}
}
pub mod tropospheric_delay_correction {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct TroposphericDelayCorrection {
#[cfg_attr(feature = "serde", serde(rename = "hydro"))]
pub hydro: i16,
#[cfg_attr(feature = "serde", serde(rename = "wet"))]
pub wet: i8,
#[cfg_attr(feature = "serde", serde(rename = "stddev"))]
pub stddev: u8,
}
impl WireFormat for TroposphericDelayCorrection {
const MIN_LEN: usize = <i16 as WireFormat>::MIN_LEN
+ <i8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.hydro)
+ WireFormat::len(&self.wet)
+ WireFormat::len(&self.stddev)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.hydro, buf);
WireFormat::write(&self.wet, buf);
WireFormat::write(&self.stddev, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
TroposphericDelayCorrection {
hydro: WireFormat::parse_unchecked(buf),
wet: WireFormat::parse_unchecked(buf),
stddev: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod tropospheric_delay_correction_no_std {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct TroposphericDelayCorrectionNoStd {
#[cfg_attr(feature = "serde", serde(rename = "hydro"))]
pub hydro: i16,
#[cfg_attr(feature = "serde", serde(rename = "wet"))]
pub wet: i8,
}
impl WireFormat for TroposphericDelayCorrectionNoStd {
const MIN_LEN: usize = <i16 as WireFormat>::MIN_LEN + <i8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.hydro) + WireFormat::len(&self.wet)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.hydro, buf);
WireFormat::write(&self.wet, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
TroposphericDelayCorrectionNoStd {
hydro: WireFormat::parse_unchecked(buf),
wet: WireFormat::parse_unchecked(buf),
}
}
}
}