summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_rtcm3.c2
-rw-r--r--gps.h9
-rw-r--r--gpsd_json.c6
3 files changed, 10 insertions, 7 deletions
diff --git a/driver_rtcm3.c b/driver_rtcm3.c
index 1c817278..f74d3f05 100644
--- a/driver_rtcm3.c
+++ b/driver_rtcm3.c
@@ -22,7 +22,7 @@ passing RTCM corrections to a GPS, which normally should just be
passed an entire correction packet for processing by their internal
firmware.
-Decodes of the following types have been verified: 1004, 1005, 1029
+Decodes of the following types have been verified: 1004, 1005, 1012, 1013, 1029.
This file is Copyright (c) 2010 by the GPSD project
BSD terms apply: see the file COPYING in the distribution root for details.
diff --git a/gps.h b/gps.h
index c838ac67..3402c560 100644
--- a/gps.h
+++ b/gps.h
@@ -399,9 +399,9 @@ struct rtcm3_t {
unsigned char leapsecs; /* Leap Seconds, GPS-UTC */
unsigned char ncount; /* Count of announcements to follow */
struct {
- unsigned short id;
+ unsigned short id; /* message type ID */
bool sync;
- unsigned short interval;
+ unsigned short interval; /* interval in 0.1sec units */
} announcements[RTCM3_MAX_ANNOUNCEMENTS];
} rtcm3_1013;
/* 1014-1017 were added in the 3.1 version */
@@ -509,6 +509,11 @@ struct rtcm3_t {
} rtcmtypes;
};
+/* RTCM3 scaling constants */
+#define GPS_AMBIGUITY_MODULUS 299792.458 /* 1004, DF014*/
+#define GLONASS_AMBIGUITY_MODULUS 599584.916 /* 1012, DF044 */
+#define MESSAGE_INTERVAL_UNITS 0.1 /* 1013, DF047 */
+
/*
* Raw IS_GPS subframe data
*/
diff --git a/gpsd_json.c b/gpsd_json.c
index 0d5cef14..27bb4a58 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -1015,7 +1015,7 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
"\"amb\":%u,\"CNR\":%.2f}"
"\"L2\":{\"ind\":%u,\"prange\":%8.2f,"
"\"delta\":%6.4f,\"lockt\":%u,"
- "\"amb\":%u,\"CNR\":%.2f}"
+ "\"CNR\":%.2f}"
"},",
R1004.ident,
CODE(R1004.L1.indicator),
@@ -1028,7 +1028,6 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
R1004.L2.pseudorange,
R1004.L2.rangediff,
INT(R1004.L2.locktime),
- INT(R1004.L2.ambiguity),
R1004.L2.CNR);
#undef R1004
}
@@ -1217,7 +1216,7 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
"\"delta\":%6.4f,\"lockt\":%u,\"amb\":%u,"
"\"CNR\":%.2f},"
"\"L2\":{\"ind\":%u,\"prange\":%8.2f,"
- "\"delta\":%6.4f,\"lockt\":%u,\"amb\":%u,"
+ "\"delta\":%6.4f,\"lockt\":%u,"
"\"CNR\":%.2f},"
"},",
R1012.ident,
@@ -1232,7 +1231,6 @@ void json_rtcm3_dump(const struct rtcm3_t *rtcm,
R1012.L2.pseudorange,
R1012.L2.rangediff,
INT(R1012.L2.locktime),
- INT(R1012.L2.ambiguity),
R1012.L2.CNR);
#undef R1012
}