+static struct nav_pvt {
+ uint16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t min;
+ uint8_t sec;
+ uint8_t valid;
+ int32_t nano;
+ uint8_t flags;
+ uint8_t num_sv;
+ int32_t lat;
+ int32_t lon;
+ int32_t alt_msl;
+ int32_t vel_d;
+ int32_t g_speed;
+ int32_t heading;
+} nav_pvt;
+
+static const struct ublox_packet_parse nav_pvt_packet[] = {
+ { UBLOX_DISCARD, 4 }, /* 0 iTOW */
+ { UBLOX_U16, offsetof(struct nav_pvt, year) }, /* 4 year */
+ { UBLOX_U8, offsetof(struct nav_pvt, month) }, /* 6 month */
+ { UBLOX_U8, offsetof(struct nav_pvt, day) }, /* 7 day */
+ { UBLOX_U8, offsetof(struct nav_pvt, hour) }, /* 8 hour */
+ { UBLOX_U8, offsetof(struct nav_pvt, min) }, /* 9 min */
+ { UBLOX_U8, offsetof(struct nav_pvt, sec) }, /* 10 sec */
+ { UBLOX_U8, offsetof(struct nav_pvt, valid) }, /* 11 valid */
+ { UBLOX_DISCARD, 4 }, /* 12 tAcc */
+ { UBLOX_U32, offsetof(struct nav_pvt, nano) }, /* 16 nano */
+ { UBLOX_DISCARD, 1 }, /* 20 fixType */
+ { UBLOX_U8, offsetof(struct nav_pvt, flags) }, /* 21 gpsFix */
+ { UBLOX_DISCARD, 1 }, /* 22 flags2 */
+ { UBLOX_U8, offsetof(struct nav_pvt, num_sv) }, /* 23 numSV */
+ { UBLOX_U32, offsetof(struct nav_pvt, lon) }, /* 24 Longitude */
+ { UBLOX_U32, offsetof(struct nav_pvt, lat) }, /* 28 Latitude */
+ { UBLOX_DISCARD, 4 }, /* 32 height above ellipsoid */
+ { UBLOX_U32, offsetof(struct nav_pvt, alt_msl) }, /* 36 Height above mean sea level */
+ { UBLOX_DISCARD, 16 }, /* 40 hAcc, vAcc, velN, velE */
+ { UBLOX_U32, offsetof(struct nav_pvt, vel_d) }, /* 56 velD */
+ { UBLOX_U32, offsetof(struct nav_pvt, g_speed) }, /* 60 gSpeed */
+ { UBLOX_U32, offsetof(struct nav_pvt, heading) }, /* 64 headMot */
+ { UBLOX_DISCARD, 92 - 68 }, /* 68 sAcc .. magAcc */
+ { UBLOX_END, 0 }
+};
+
+#define NAV_PVT_VALID_DATE 0
+#define NAV_PVT_VALID_TIME 1
+#define NAV_PVT_VALID_FULLY_RESOLVED 2
+#define NAV_PVT_VALID_MAG 3
+
+#define NAV_PVT_FLAGS_GNSSFIXOK 0
+#define NAV_PVT_FLAGS_DIFFSOLN 1
+#define NAV_PVT_FLAGS_PSM_STATE 2
+#define NAV_PVT_FLAGS_HEAD_VEH_VALID 5
+#define NAV_PVT_FLAGS_CARR_SOLN 6
+