summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2011-02-16 12:45:34 +0300
committerEric S. Raymond <esr@thyrsus.com>2011-02-16 06:21:43 -0500
commitef52f05e311fb46b05c0a61f6637e0bf9659a699 (patch)
tree7281ad2792a691f58912607323ab936fab7c65cc /gpsd.c
parent77a37c27532d6a6747b2508c125f8b8d1b31c4fb (diff)
downloadgpsd-ef52f05e311fb46b05c0a61f6637e0bf9659a699.tar.gz
Generate NMEA GPALM in pseudo-NMEA when almanic information is available.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index ee66d6f3..3cc184cf 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -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));
}