Leave the existing GPS pad altitude value in place after boost by
checking to see if it was ever computed before resetting it to the
barometric pad altitude. This makes GPS height values relative to the pad.
Signed-off-by: Keith Packard <keithp@keithp.com>
}
ngps++;
}
- } else
- pad_alt = ground_altitude;
-
- data.new_gps = false;
+ } else {
+ if (ngps == 0)
+ pad_alt = ground_altitude;
+ }
gps_waiting = MIN_PAD_SAMPLES - npad;
if (gps_waiting < 0)