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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
From 9c84fb9f0ceda3575f322a7da8021b1a30613906 Mon Sep 17 00:00:00 2001
From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
Date: Tue, 8 Dec 2020 16:23:30 +0200
Subject: [PATCH] add missing leap seconds parts
---
SConstruct | 1 +
driver_ubx.c | 21 ++++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/SConstruct b/SConstruct
index 33e0ff3..cd1a063 100644
--- a/SConstruct
+++ b/SConstruct
@@ -192,6 +192,7 @@ boolopts = (
("tripmate", True, "DeLorme TripMate support"),
("tsip", True, "Trimble TSIP support"),
("ublox", True, "u-blox Protocol support"),
+ ("ubloxtimels", False, "u-blox UBX-NAV-TIMELS support (leap second)"),
# Non-GPS protocols
("aivdm", True, "AIVDM support"),
("gpsclock", True, "GPSClock support"),
diff --git a/driver_ubx.c b/driver_ubx.c
index c2965ee..57cff58 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -886,6 +886,7 @@ static void ubx_msg_nav_timels(struct gps_device_t *session,
}
}
+
/**
* Geodetic position solution message
* UBX-NAV-POSLLH, Class 1, ID 2
@@ -1932,7 +1933,10 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
mask = ubx_msg_nav_timegps(session, &buf[UBX_PREFIX_LEN], data_len);
break;
case UBX_NAV_TIMELS:
- ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN], data_len);
+ GPSD_LOG(LOG_PROG, &session->context->errout, "UBX_NAV_TIMELS\n");
+#ifdef UBLOXTIMELS_ENABLE
+ ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN],data_len);
+#endif // UBLOXTIMELS_ENABLE
break;
case UBX_NAV_TIMEUTC:
GPSD_LOG(LOG_DATA, &session->context->errout, "UBX-NAV-TIMEUTC\n");
@@ -1977,6 +1981,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
GPSD_LOG(LOG_DATA, &session->context->errout, "UBX-RXM-RTCM\n");
break;
case UBX_RXM_SFRB:
+ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX_RXM_SFRB\n");
mask = ubx_rxm_sfrb(session, &buf[UBX_PREFIX_LEN], data_len);
break;
case UBX_RXM_SFRBX:
@@ -2322,6 +2327,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
msg[2] = 0x00; /* rate */
(void)ubx_write(session, 0x06u, 0x01, msg, 3);
+#ifdef UBLOXTIMELS_ENABLE
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
+ msg[2] = 0xff; /* rate */
+#endif /* UBLOXTIMELS_ENABLE */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
/* NAV-SVINFO became NAV-SAT */
msg[0] = 0x01; /* class */
msg[1] = 0x30; /* msg id = NAV-SVINFO */
@@ -2431,6 +2443,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
msg[2] = 0x01; /* rate */
(void)ubx_write(session, 0x06u, 0x01, msg, 3);
+#ifdef UBLOXTIMELS_ENABLE
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
+ msg[2] = 0xff; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+#endif /* UBLOXTIMELS_ENABLE */
+
/* UBX-NAV-SVINFO deprecated in u-blox 8, gone in u-blox 9.
* Use UBX-NAV-SAT after u-blox 7 */
if (10 > session->driver.ubx.protver) {
--
2.7.4
|