drivers: gnss: Use correct GGA Elevation field
Switching from using Geoid seperation to Elevation MSL field. Signed-off-by: Chris LaFlash <chris-github@laflash.com>
This commit is contained in:
parent
5a9ae4547f
commit
9c492f4a9b
|
@ -538,7 +538,7 @@ int gnss_nmea0183_parse_gga(const char **argv, uint16_t argc, struct gnss_data *
|
|||
data->info.hdop = (uint16_t)tmp64;
|
||||
|
||||
/* Parse altitude */
|
||||
if ((gnss_parse_dec_to_milli(argv[11], &tmp64) < 0) ||
|
||||
if ((gnss_parse_dec_to_milli(argv[9], &tmp64) < 0) ||
|
||||
(tmp64 > INT32_MAX) ||
|
||||
(tmp64 < INT32_MIN)) {
|
||||
return -EINVAL;
|
||||
|
|
|
@ -330,7 +330,7 @@ ZTEST(gnss_nmea0183, test_parse_gga_fix)
|
|||
"Incorrectly parsed number of satelites");
|
||||
|
||||
zassert_equal(data.info.hdop, 1410, "Incorrectly parsed HDOP");
|
||||
zassert_equal(data.nav_data.altitude, 42371, "Incorrectly parsed altitude");
|
||||
zassert_equal(data.nav_data.altitude, 15234, "Incorrectly parsed altitude");
|
||||
}
|
||||
|
||||
ZTEST(gnss_nmea0183, test_snprintk)
|
||||
|
|
Loading…
Reference in New Issue