diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-07-26 17:30:16 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-07-26 17:30:16 +0000 |
commit | 36cde1b1078ba2df24ad20f305259b9daca67833 (patch) | |
tree | b3a63b2bc4c152fb848079271864032968b972ff /isgps.c | |
parent | 47690cb6367a55832e6d7afc357ceae217be8a88 (diff) | |
download | gpsd-36cde1b1078ba2df24ad20f305259b9daca67833.tar.gz |
A large step towards automatically syncing with RTCM streams.
It partly works now! All GPS regression tests pass.
Diffstat (limited to 'isgps.c')
-rw-r--r-- | isgps.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -186,11 +186,13 @@ enum isgpsstat_t isgps_decode(struct gps_device_t *session, { enum isgpsstat_t res; + /* ASCII characters 64-127, @ through DEL */ if ((c & MAG_TAG_MASK) != MAG_TAG_DATA) { gpsd_report(RTCM_ERRLEVEL_BASE+1, "word tag not correct, skipping\n"); return ISGPS_SKIP; } + c = reverse_bits[c & 0x3f]; /*@ -shiftnegative @*/ @@ -199,13 +201,13 @@ enum isgpsstat_t isgps_decode(struct gps_device_t *session, session->isgps.bufindex = 0; while (session->isgps.curr_offset <= 0) { - gpsd_report(RTCM_ERRLEVEL_BASE+2, "syncing\n"); session->isgps.curr_word <<= 1; if (session->isgps.curr_offset > 0) { session->isgps.curr_word |= c << session->isgps.curr_offset; } else { session->isgps.curr_word |= c >> -(session->isgps.curr_offset); } + gpsd_report(RTCM_ERRLEVEL_BASE+2, "syncing at byte %d: %0x%08x\n", session->counter, session->isgps.curr_word); if (preamble_match(&session->isgps.curr_word)) { if (isgpsparityok(session->isgps.curr_word)) { |