summaryrefslogtreecommitdiff
path: root/nmea_parse.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-06-15 13:02:30 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-06-15 13:02:30 +0000
commitaa63d4702526eb16b635ef291660d65b77e7fc38 (patch)
tree815f9e8779de57b18da1c89fcb3fc3e2a8db815f /nmea_parse.c
parent536bcf03dad098502298ae447999198e86b6c615 (diff)
downloadgpsd-aa63d4702526eb16b635ef291660d65b77e7fc38.tar.gz
Use NAN consistently for out-of-bound values of double type.
Diffstat (limited to 'nmea_parse.c')
-rw-r--r--nmea_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nmea_parse.c b/nmea_parse.c
index 35c4a933..8310b2dc 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -270,7 +270,7 @@ static gps_mask_t processGPGGA(int c UNUSED, char *field[], struct gps_data_t *o
* SiRF and Garmin chips, which might have some smoothing
* going on.
*/
- if (oldaltitude == ALTITUDE_NOT_VALID || out->fix.time==oldfixtime)
+ if (!isnan(oldaltitude) || out->fix.time==oldfixtime)
out->fix.climb = 0;
else {
out->fix.climb = (out->fix.altitude-oldaltitude)/(out->fix.time-oldfixtime);