diff options
Diffstat (limited to 'rtcm3.c')
-rw-r--r-- | rtcm3.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -449,20 +449,16 @@ void rtcm3_unpack(/*@out@*/struct rtcm3_t *tp, char *buf) assert(msg->preamble == 0xD3); assert(msg->version == 0x00); + tp->length = getbeuw(buf, 1) & ~0xCF00; + tp->type = getbeuw(buf, 3) >> 4; - // FIXME: bitfield extraction of the type field seems to fail. - (void)printf("%s: type=%d length=%d, computed length %d, computed type %d\n", - gpsd_hexdump(buf, 6), - msg->type, msg->length, - getbeuw(buf, 1), getbeuw(buf, 3) >> 4); - - // FIXME: Decoding of packet content goes here + // FIXME: More decoding of packet content goes here } void rtcm3_dump(struct rtcm3_t *rtcm, /*@out@*/char buf[], size_t buflen) /* dump the contents of a parsed RTCM104 message */ { - // (void)snprintf(buf, buflen, "%u (%u):\n", rtcm->type, rtcm->length); + (void)snprintf(buf, buflen, "%u (%u):\n", rtcm->type, rtcm->length); // FIXME: More dumping of packet contents goes here */ } |