ublox/ubx_packets/packets/nav_pvt/
proto14.rs1#[cfg(feature = "serde")]
2use super::super::SerializeUbxPacketFields;
3#[cfg(feature = "serde")]
4use crate::serde::ser::SerializeMap;
5
6use super::common::*;
7use crate::{error::ParserError, GnssFixType, UbxPacketMeta};
8use ublox_derive::ubx_packet_recv;
9
10#[ubx_packet_recv]
12#[ubx(class = 1, id = 0x07, fixed_payload_len = 84)]
13struct NavPvt {
14 itow: u32,
23
24 year: u16,
26 month: u8,
28 day: u8,
30 hour: u8,
32 min: u8,
34 sec: u8,
36
37 #[ubx(map_type = NavPvtValidFlags)]
39 valid: u8,
40
41 time_accuracy: u32,
43
44 nanosec: i32,
46
47 #[ubx(map_type = GnssFixType)]
49 fix_type: u8,
50
51 #[ubx(map_type = NavPvtFlags)]
53 flags: u8,
54
55 reserved1: u8,
56
57 num_satellites: u8,
59
60 #[ubx(map_type = f64, scale = 1e-7, alias = longitude)]
62 lon: i32,
63
64 #[ubx(map_type = f64, scale = 1e-7, alias = latitude)]
66 lat: i32,
67
68 #[ubx(map_type = f64, scale = 1e-3, alias = height_above_ellipsoid)]
70 height: i32,
71
72 #[ubx(map_type = f64, scale = 1e-3)]
74 height_msl: i32,
75
76 #[ubx(map_type = f64, scale = 1e-3, alias = horizontal_accuracy )]
78 h_acc: u32,
79
80 #[ubx(map_type = f64, scale = 1e-3, alias = vertical_accuracy )]
82 v_acc: u32,
83
84 #[ubx(map_type = f64, scale = 1e-3)]
86 vel_north: i32,
87
88 #[ubx(map_type = f64, scale = 1e-3)]
90 vel_east: i32,
91
92 #[ubx(map_type = f64, scale = 1e-3)]
94 vel_down: i32,
95
96 #[ubx(map_type = f64, scale = 1e-3, alias = ground_speed_2d)]
98 g_speed: i32,
99
100 #[ubx(map_type = f64, scale = 1e-5, alias = heading_motion)]
102 head_motion: i32,
103
104 #[ubx(map_type = f64, scale = 1e-3, alias = speed_accuracy)]
106 s_acc: u32,
107
108 #[ubx(map_type = f64, scale = 1e-5, alias = heading_accuracy)]
110 head_acc: u32,
111
112 #[ubx(map_type = f64, scale = 1e-2)]
114 pdop: u16,
115
116 reserved2: [u8; 2],
117 reserved3: [u8; 4],
118}