Skip to content

Commit

Permalink
Merge pull request #31 from gwbres/gwbr/mon_gnss
Browse files Browse the repository at this point in the history
ubx_packets: introduce MonGnss
  • Loading branch information
lkolbly authored Sep 11, 2022
2 parents 0850736 + cf2d264 commit 8578d28
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions ublox/src/ubx_packets/packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,45 @@ pub enum AntennaStatus {
Open = 4,
}

/// GNSS status monitoring,
/// gives currently selected constellations
#[ubx_packet_recv]
#[ubx(class = 0x0a, id = 0x28, fixed_payload_len = 8)]
struct MonGnss {
/// Message version: 0x00
version: u8,
/// Supported major constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
supported: u8,
/// Default major GNSS constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
default: u8,
/// Currently enabled major constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
enabled: u8,
/// Maximum number of concurent Major GNSS
/// that can be supported by this receiver
simultaneous: u8,
reserved1: [u8; 3],
}

#[ubx_extend_bitflags]
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
/// Selected / available Constellation Mask
#[derive(Default)]
pub struct MonGnssConstellMask: u8 {
/// GPS constellation
const GPS = 0x01;
/// GLO constellation
const GLO = 0x02;
/// BDC constellation
const BDC = 0x04;
/// GAL constellation
const GAL = 0x08;
}
}

#[ubx_extend]
#[ubx(from, rest_reserved)]
#[repr(u8)]
Expand Down Expand Up @@ -2690,6 +2729,7 @@ define_recv_packets!(
TimTp,
TimTm2,
MonVer,
MonGnss,
MonHw,
RxmRtcm
}
Expand Down

0 comments on commit 8578d28

Please sign in to comment.