During replay, AltosState may not see a new GPS value as soon as it
lands in the state field as additional records with the same timestamp
may come in after the GPS record.
Instead of resetting the new_gps indication when the new record is
created, wait until the new_gps indication is seen by the AltosState
update code and have that clear the new_gps indication.
Signed-off-by: Keith Packard <keithp@keithp.com>
speed = old.speed;
height = old.height;
gps = new AltosGPS(old.gps);
- new_gps = false;
+ new_gps = old.new_gps;
companion = old.companion;
}
} else
pad_alt = ground_altitude;
+ data.new_gps = false;
+
gps_waiting = MIN_PAD_SAMPLES - npad;
if (gps_waiting < 0)
gps_waiting = 0;