summaryrefslogtreecommitdiff
path: root/nmea_parse.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-04-30 06:06:27 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-04-30 06:06:27 +0000
commit7d650b3ddbffea203587155dcd47ee3179ff8296 (patch)
tree6155414c83c3bdff47d4355fb810f442811ba45a /nmea_parse.c
parentbe167e091473961081e6694e17104f62fcc08eba (diff)
downloadgpsd-7d650b3ddbffea203587155dcd47ee3179ff8296.tar.gz
Compute WGS84 separation if an NMEA GPS doesn't supply it.
Diffstat (limited to 'nmea_parse.c')
-rw-r--r--nmea_parse.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/nmea_parse.c b/nmea_parse.c
index 6cb4cff6..3514dbce 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -283,15 +283,10 @@ static int processGPGGA(int c UNUSED, char *field[], struct gps_data_t *out)
mask |= CLIMB_SET;
}
if ( strlen( field[11] ) ) {
- separation = atof(field[11] );
+ separation = atof(field[11]);
} else {
- separation = ALTITUDE_NOT_VALID;
+ separation = wgs84_separation(out->fix.latitude,out->fix.longitude);
}
- gpsd_report(3, "Geoid Separation (MSL - WGS84): from NMEA %lf, calculated %lf\n"
- , separation
- , wgs84_separation(out->fix.latitude
- , out->fix.longitude));
-
}
return mask;
}