diff options
author | Michael Tatarinov <kukabu@gmail.com> | 2011-02-16 12:45:34 +0300 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-16 06:21:43 -0500 |
commit | ef52f05e311fb46b05c0a61f6637e0bf9659a699 (patch) | |
tree | 7281ad2792a691f58912607323ab936fab7c65cc /gpsd.c | |
parent | 77a37c27532d6a6747b2508c125f8b8d1b31c4fb (diff) | |
download | gpsd-ef52f05e311fb46b05c0a61f6637e0bf9659a699.tar.gz |
Generate NMEA GPALM in pseudo-NMEA when almanic information is available.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1288,14 +1288,24 @@ static void pseudonmea_report(struct subscriber_t *sub, gpsd_report(LOG_PROG, "data mask is %s\n", gpsd_maskdump(device->gpsdata.set)); + if ((changed & REPORT_IS) != 0) { nmea_tpv_dump(device, buf, sizeof(buf)); - gpsd_report(LOG_IO, "<= GPS (binary1) %s: %s\n", + gpsd_report(LOG_IO, "<= GPS (binary tpv) %s: %s\n", device->gpsdata.dev.path, buf); (void)throttled_write(sub, buf, strlen(buf)); - } else if ((changed & SATELLITE_IS) != 0) { + } + + if ((changed & SATELLITE_IS) != 0) { nmea_sky_dump(device, buf, sizeof(buf)); - gpsd_report(LOG_IO, "<= GPS (binary2) %s: %s\n", + gpsd_report(LOG_IO, "<= GPS (binary sky) %s: %s\n", + device->gpsdata.dev.path, buf); + (void)throttled_write(sub, buf, strlen(buf)); + } + + if ((changed & SUBFRAME_IS) != 0) { + nmea_subframe_dump(device, buf, sizeof(buf)); + gpsd_report(LOG_IO, "<= GPS (binary subframe) %s: %s\n", device->gpsdata.dev.path, buf); (void)throttled_write(sub, buf, strlen(buf)); } |