diff options
author | Gary E. Miller <gem@rellim.com> | 2016-03-30 15:48:37 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-03-30 15:48:37 -0700 |
commit | f0c3bf6e250a054df502947ea1f5b8ba612a7b28 (patch) | |
tree | 94a061058978f29f86867e5ef2c4d5bd601259a8 /driver_skytraq.c | |
parent | 2f6648b5fe094d4add353a77044a26705faa9441 (diff) | |
download | gpsd-f0c3bf6e250a054df502947ea1f5b8ba612a7b28.tar.gz |
Skytraq 50bps data now decoded and the JSON output looks right.
gpsd_interpret_subframe() does almost all the work, so the
decode is probably correct.
Diffstat (limited to 'driver_skytraq.c')
-rw-r--r-- | driver_skytraq.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/driver_skytraq.c b/driver_skytraq.c index 73920b69..b773fef4 100644 --- a/driver_skytraq.c +++ b/driver_skytraq.c @@ -167,7 +167,8 @@ static gps_mask_t sky_msg_E0(struct gps_device_t *session, { unsigned int prn; /* GPS sat PRN */ unsigned int subf; /* subframe 1-5 */ - unsigned int words[10]; /* subframe 1-5 */ + /* the words are preprocessed, not raw, just the 24bits of data */ + uint32_t words[10]; /* subframe 1-5 */ if ( 33 != len) return 0; @@ -175,13 +176,17 @@ static gps_mask_t sky_msg_E0(struct gps_device_t *session, prn = (unsigned int)getub(buf, 1); subf = (unsigned int)getub(buf, 2); for ( int i = 0; i < 10; i++ ) { - words[i] = getbeu24(buf, 4 + (i * 3)); + words[i] = (uint32_t)getbeu24(buf, 3 + (i * 3)); } gpsd_log(&session->context->errout, 1, /* LOG_DATA, */ - "Skytraq: MID 0xE0: prn=%u, subf=%u\n", - prn, subf); - return 0; + "Skytraq: 50B MID 0xE0: prn=%u, subf=%u," + "%06x %06x %06x %06x %06x %06x %06x %06x %06x %06x\n", + prn, subf, + words[0], words[1], words[2], words[3], words[4], + words[5], words[6], words[7], words[8], words[9]); + + return gpsd_interpret_subframe(session, prn, words); } |