1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#[cfg(feature = "serde")]
use super::SerializeUbxPacketFields;
#[cfg(feature = "serde")]
use crate::serde::ser::SerializeMap;
use crate::{
error::ParserError, ubx_checksum, ubx_packets::packets::ScaleBack, MemWriter, MemWriterError,
UbxPacketCreator, UbxPacketMeta,
};
use ublox_derive::ubx_packet_recv_send;
/// UBX-MGA-BDS UTC frame.
#[ubx_packet_recv_send]
#[ubx(class = 0x13, id = 0x03, fixed_payload_len = 20)]
struct MgaBdsUtc {
/// Message type. 0x01 for this type.
msg_type: u8,
/// Message version.
version: u8,
/// Reserved
reserved1: [u8; 2],
/// BDT-UTC (in seconds)
#[ubx(map_type = f64, scale = 2e-30)]
utc_a0: i32,
/// BDT-UTC rate of change (in s/second)
#[ubx(map_type = f64, scale = 2e-50)]
utc_a1: i32,
/// Delta time due leap seconds before the new leap second
/// is effective
dt_ls: i8,
/// Reserved
reserved2: u8,
/// BeiDou week number of reception of this
/// UTC parameter set (8-bit truncated)
wn_rec: u8,
/// Week number of the new leap second
wn_lsf: u8,
/// Day number of the new leap second
dn: u8,
/// Delta time due to leap seconds after the new
/// leap second is effective
dt_lsf: i8,
/// Reserved
reserved3: [u8; 2],
}