summaryrefslogtreecommitdiff
path: root/driver_rtcm3.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-12 16:40:50 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-12 16:40:50 -0400
commit6753c2ec6223d5473fe674858caafbd32c13ebd6 (patch)
tree3185dc2fc7f210f0a26165d588d75514ab6e2acf /driver_rtcm3.c
parent11f2e83285d3bd99b12f45a42e22ae62273da376 (diff)
downloadgpsd-6753c2ec6223d5473fe674858caafbd32c13ebd6.tar.gz
RTCM3 1008 decodes correctly.
Diffstat (limited to 'driver_rtcm3.c')
-rw-r--r--driver_rtcm3.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver_rtcm3.c b/driver_rtcm3.c
index ec9da0fd..cbff3fcf 100644
--- a/driver_rtcm3.c
+++ b/driver_rtcm3.c
@@ -22,7 +22,8 @@ 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, 1012, 1013, 1029.
+Decodes of the following types have been verified: 1004, 1005, 1008,
+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.
@@ -231,12 +232,12 @@ void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf)
case 1008: /* Antenna Descriptor & Serial Number */
rtcm->rtcmtypes.rtcm3_1008.station_id = (unsigned short)ugrab(12);
n = (unsigned long)ugrab(8);
- (void)memcpy(rtcm->rtcmtypes.rtcm3_1008.descriptor, buf + 4, n);
+ (void)memcpy(rtcm->rtcmtypes.rtcm3_1008.descriptor, buf + 7, n);
rtcm->rtcmtypes.rtcm3_1008.descriptor[n] = '\0';
bitcount += 8 * n;
rtcm->rtcmtypes.rtcm3_1008.setup_id = ugrab(8);
n2 = (unsigned long)ugrab(8);
- (void)memcpy(rtcm->rtcmtypes.rtcm3_1008.serial, buf + 6 + n, n2);
+ (void)memcpy(rtcm->rtcmtypes.rtcm3_1008.serial, buf + 9 + n, n2);
rtcm->rtcmtypes.rtcm3_1008.serial[n2] = '\0';
bitcount += 8 * n2;
break;