diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-02 05:59:37 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-02 05:59:37 -0500 |
commit | 12a0298402410c51d1356e31a33f4d473dae2af9 (patch) | |
tree | 81b6a53f46033d3f385d1443e8b0acf55c9dcbd5 /test_packet.c | |
parent | ad0f05a8d641decd6da671c968a39ee0adae662e (diff) | |
download | gpsd-12a0298402410c51d1356e31a33f4d473dae2af9.tar.gz |
Bug fixes for RTCM3 decoding. All regression tests pass.
And the first actually successful decode of a known-good RTCM3 packet,
a type 1029.
Diffstat (limited to 'test_packet.c')
-rw-r--r-- | test_packet.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test_packet.c b/test_packet.c index b2e98197..274ecc33 100644 --- a/test_packet.c +++ b/test_packet.c @@ -205,6 +205,7 @@ static struct map singletests[] = { .type = EVERMORE_PACKET, }, { + /* from page 4-3 of the RTCM3.0 standard */ .legend = "RTCM104V3 type 1005 packet", /* * Reference Station Id = 2003 @@ -235,6 +236,21 @@ static struct map singletests[] = { .garbage_offset = 0, .type = BAD_PACKET, }, + { + /* from page 3-71 of the RTCM3.0 standard */ + .legend = "RTCM104V3 type 1029 packet", + .test = { + 0xD3, 0x00, 0x27, 0x40, 0x50, 0x17, 0x00, 0x84, + 0x73, 0x6E, 0x15, 0x1E, 0x55, 0x54, 0x46, 0x2D, + 0x38, 0x20, 0xD0, 0xBF, 0xD1, 0x80, 0xD0, 0xBE, + 0xD0, 0xB2, 0xD0, 0xB5, 0xD1, 0x80, 0xD0, 0xBA, + 0xD0, 0xB0, 0x20, 0x77, 0xC3, 0xB6, 0x72, 0x74, + 0x65, 0x72, 0xED, 0xA3, 0x3B + }, + .testlen = 45, + .garbage_offset = 0, + .type = RTCM3_PACKET, + }, }; /*@ +initallelements -charint +usedef @*/ /* *INDENT-ON* */ @@ -310,7 +326,7 @@ static void runon_test(struct map *mp) (void)fputs(mp->test, stdout); do { st = packet_get(nullfd, &packet); - printf("packet_parse() returned %zd\n", st); + //printf("packet_parse() returned %zd\n", st); } while (st > 0); /*@ +compdef +uniondef +usedef +formatcode @*/ } |