libsbf 0.17.0

A no_std rust crate to parse Septentrio SBF Messages.
use crate::binrw_util;
use binrw::binrw;

// GEORawL1 Block 4020
#[binrw]
#[derive(Clone, Debug)]
pub struct GEORawL1 {
    #[br(map = binrw_util::map_u4)]
    #[bw(map = binrw_util::unmap_u4)]
    pub tow: Option<u32>,
    #[br(map = binrw_util::map_u2)]
    #[bw(map = binrw_util::unmap_u2)]
    pub wnc: Option<u16>,
    pub svid: u8,
    pub crc_passed: u8,
    pub viterbi_cnt: u8,
    pub source: u8,
    pub freq_nr: u8,
    pub rx_channel: u8,
    // 250 bits stored in 8 u32s (256 bits total, last 6 bits unused)
    pub nav_bits: [u32; 8],
}

impl GEORawL1 {
    // CRC status constants
    pub const CRC_FAILED: u8 = 0;
    pub const CRC_PASSED: u8 = 1;
}