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:
Chris LaFlash 2024-04-20 09:57:08 -07:00 committed by Anas Nashif
parent 5a9ae4547f
commit 9c492f4a9b
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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)