summaryrefslogtreecommitdiff
path: root/garmin.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-12-05 13:56:09 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-12-05 13:56:09 +0000
commit8f6f516d2c9534811a45b4d9da6f58408cf9673f (patch)
tree9435c34cb924316656d335ea3ca3a51884a8ac06 /garmin.c
parentbd82ac7fce25aef1ac8bac2127a6eab538044b1b (diff)
downloadgpsd-8f6f516d2c9534811a45b4d9da6f58408cf9673f.tar.gz
Correct bad comment arising from a misunderstanding.
Diffstat (limited to 'garmin.c')
-rw-r--r--garmin.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/garmin.c b/garmin.c
index bbbaf93a..545b48be 100644
--- a/garmin.c
+++ b/garmin.c
@@ -458,18 +458,15 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id
session->gpsdata.PRN[j] = (int)sats->svid;
session->gpsdata.azimuth[j] = (int)sats->azmth;
session->gpsdata.elevation[j] = (int)sats->elev;
-#if 0
- // This is what's in the Garmin product reference.
- session->gpsdata.ss[j] = 99 - (int)((100 *( unsigned long)sats->snr) >> 16);
-#else
- // This is what actually seems to work.
- // snr is in dB*100
- // known, but not seen satellites have a dB value of -1*100
+ // Garmin does not document this. snr is in dB*100
+ // Known, but not seen satellites have a dB value of -1*100
session->gpsdata.ss[j] = (int)round((float)sats->snr / 100);
-#endif
if (session->gpsdata.ss[j] < 0) {
session->gpsdata.ss[j] = 0;
}
+ // FIXME: Garmin documents this, but Daniel Dorau
+ // <daniel.dorau@gmx.de> says the behavior on his GPSMap60CSX
+ // doesn't match it.
if ( (uint8_t)0 != (sats->status & 4 ) ) {
// used in solution?
session->gpsdata.used[session->gpsdata.satellites_used++]