diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-03-13 22:03:36 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-03-13 22:03:36 +0000 |
commit | c57afcb5ac89f8c0ab811853de5fba036e492d68 (patch) | |
tree | 5a066127ff668860e6e55d9dbd31839c12237ab7 /gpsdecode.c | |
parent | 228dedbca3b79728d7d88d456af3880b87f62efe (diff) | |
download | gpsd-c57afcb5ac89f8c0ab811853de5fba036e492d68.tar.gz |
Pass comments through.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r-- | gpsdecode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index 5329fea3..6c88cda2 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -60,9 +60,9 @@ static void aivdm_dump(struct ais_t *ais, FILE *fp) }; if (labeled) - (void)fprintf(fp, "type=%d:ri=%d:MMSI=%09d:", ais->id, ais->ri, ais->mmsi); + (void)fprintf(fp, "type=%d,ri=%d,MMSI=%09d,", ais->id, ais->ri, ais->mmsi); else - (void)fprintf(fp, "%d:%d:%09d:", ais->id, ais->ri, ais->mmsi); + (void)fprintf(fp, "%d,%d,%09d,", ais->id, ais->ri, ais->mmsi); switch (ais->id) { case 1: /* Position Report */ case 2: @@ -227,6 +227,7 @@ static void aivdm_dump(struct ais_t *ais, FILE *fp) #undef TYPE5_SCALED_LABELED break; default: + (void)fprintf(fp,"?\n"); gpsd_report(LOG_ERROR, "Unparsed AIVDM message type %u.\n",ais->id); break; } @@ -266,7 +267,9 @@ static void decode(FILE *fpin, FILE *fpout) gpsd_report(LOG_ERROR,"Error during packet fetch.\n"); break; } - if (session.packet.type == RTCM2_PACKET) { + if (session.packet.type == COMMENT_PACKET) + (void)fputs((char *)session.packet.outbuffer, fpout); + else if (session.packet.type == RTCM2_PACKET) { rtcm2_unpack(&rtcm2, (char *)session.packet.isgps.buf); rtcm2_dump(&rtcm2, buf, sizeof(buf)); (void)fputs(buf, fpout); |