From a911515decb50ce13ea7c64c2633caebe277e1e6 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Thu, 28 Oct 2021 11:58:08 +0000 Subject: [PATCH] clean up old data during fix transition --- src/gps/UBloxGPS.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gps/UBloxGPS.cpp b/src/gps/UBloxGPS.cpp index a9d88f9bb..70fc91ecd 100644 --- a/src/gps/UBloxGPS.cpp +++ b/src/gps/UBloxGPS.cpp @@ -268,6 +268,8 @@ bool UBloxGPS::lookForLocation() #ifdef GPS_EXTRAVERBOSE DEBUG_MSG("no altitude data (fixType=%d)\n", fixType); #endif + // clean up old values in case it's a 3d-2d fix transition + p.altitude = p.altitude_hae = p.alt_geoid_sep = 0; } p.pos_timestamp = tmp_ts; p.PDOP = tmp_dop;