clean up old data during fix transition

This commit is contained in:
a-f-G-U-C 2021-10-28 11:58:08 +00:00 committed by GitHub
parent 7ecb36dbe7
commit a911515dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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