From cb805686daf191505ebcbfe2ee721ddc403093eb Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 4 Dec 2006 05:31:59 +0000 Subject: No demand for Magnavox output yet, so we'll condition out that code... ...after having made sure it compiles with the current version of the ISGP layer. --- TODO | 4 ++-- isgps.c | 17 ++++++++--------- rtcm.c | 2 ++ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index 497dac2d..32f90817 100644 --- a/TODO +++ b/TODO @@ -212,10 +212,10 @@ RTCM packets to port 2101. Here's the plan for the rest of it: passthrough mode to test that pack() and repack() are inverse. We should have an undumping torture test. -4) What about rtcm_output_mag() anyway? Should that be made +4) What about rtcm_output_magnavox() anyway? Should that be made available as an output mode of rtcmdecode and documented? -5) Python libraries must grok RTCM dump format. +4) Python libraries must grok RTCM dump format. 6) Extend the test framework so we can verify RTCM service. diff --git a/isgps.c b/isgps.c index 92537c1f..aa6af0a4 100644 --- a/isgps.c +++ b/isgps.c @@ -306,16 +306,11 @@ enum isgpsstat_t isgps_decode(struct gps_packet_t *session, } /*@ +usereleased +compdef @*/ -/* - * ISGPS data words are 30-bit words. We will lay them into memory into - * 30-bit (low-end justified) chunks. To write them out we will write - * 5 Magnavox-format bytes where the low 6-bits of the byte are 6-bits - * of the 30-word msg. - */ +#ifdef __UNUSED__ void isgps_output_magnavox(isgps30bits_t *ip, unsigned int len, FILE *fp) -/* ship an RTCM message to standard output in Magnavox format */ +/* ship an IS-GPS-200 message to standard output in Magnavox format */ { - static isgps30bits_t w = 0; + isgps30bits_t w = 0; while (len-- > 0) { w <<= 30; @@ -327,7 +322,10 @@ void isgps_output_magnavox(isgps30bits_t *ip, unsigned int len, FILE *fp) if (w & P_30_MASK) w ^= W_DATA_MASK; - /* msb first */ + /* + * Write each 30-bit IS-GPS-200 data word as 5 Magnavox-format bytes + * with data in the low 6-bits of the byte. MSB first. + */ /*@ -type @*/ (void)fputc(MAG_TAG_DATA | reverse_bits[(w >> 24) & 0x3f], fp); (void)fputc(MAG_TAG_DATA | reverse_bits[(w >> 18) & 0x3f], fp); @@ -337,3 +335,4 @@ void isgps_output_magnavox(isgps30bits_t *ip, unsigned int len, FILE *fp) /*@ +type @*/ } } +#endif /* __UNUSED__ */ diff --git a/rtcm.c b/rtcm.c index 9b1ae9a9..1ee43431 100644 --- a/rtcm.c +++ b/rtcm.c @@ -713,6 +713,7 @@ int rtcm_undump(/*@out@*/struct rtcm_t *rtcmp, char *buf) /*@ +usedef @*/ } +#ifdef __UNUSED__ void rtcm_output_magnavox(isgps30bits_t *ip, FILE *fp) /* ship an RTCM message in the format emitted by Magnavox DGPS receivers */ { @@ -723,5 +724,6 @@ void rtcm_output_magnavox(isgps30bits_t *ip, FILE *fp) isgps_output_magnavox(ip, ((struct rtcm_msg_t *) ip)->w2.frmlen + 2, fp); } +#endif /* __UNUSED__ */ #endif /* RTCM104_ENABLE */ -- cgit v1.2.1