diff options
author | Gary E. Miller <gem@rellim.com> | 2005-04-01 21:33:16 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2005-04-01 21:33:16 +0000 |
commit | b9c52f8b468d37640f47d0fb29e492db0a692b6d (patch) | |
tree | de1d49656a3695a6e2375b8e76ada634009fe13f /nmea_parse.c | |
parent | 1a5e47042c7fdd9f64109425914749c4a04b342f (diff) | |
download | gpsd-b9c52f8b468d37640f47d0fb29e492db0a692b6d.tar.gz |
More geoid tweaks.
Diffstat (limited to 'nmea_parse.c')
-rw-r--r-- | nmea_parse.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nmea_parse.c b/nmea_parse.c index dd1422b8..1d9322cf 100644 --- a/nmea_parse.c +++ b/nmea_parse.c @@ -224,6 +224,7 @@ static int processGPGGA(int c UNUSED, char *field[], struct gps_data_t *out) (empty field) DGPS station ID number (0000-1023) */ int mask; + double separation; /* MSL - WGS84) in meters */ out->status = atoi(field[6]); gpsd_report(3, "GPGGA sets status %d\n", out->status); @@ -257,6 +258,7 @@ static int processGPGGA(int c UNUSED, char *field[], struct gps_data_t *out) out->fix.altitude = atof(altitude); mask |= ALTITUDE_SET; + /* * Compute climb/sink in the simplest possible way. * This substitutes for the climb report provided by @@ -270,6 +272,16 @@ static int processGPGGA(int c UNUSED, char *field[], struct gps_data_t *out) } mask |= CLIMB_SET; } + if ( strlen( field[11] ) ) { + separation = atof(field[11] ); + } else { + separation = ALTITUDE_NOT_VALID; + } + gpsd_report(3, "Geoid Separation (MSL - WGS84): from NMEA %lf, calculated %lf\n" + , separation + , wgs84_separation(out->fix.latitude + , out->fix.longitude)); + } return mask; } |