Use the current device altitude as the 'ground' altitude for height
computations. This should make the height data far more useful as it
won't be using some early GPS data from the device.
Signed-off-by: Keith Packard <keithp@keithp.com>
if (location != null && state.gps != null && state.gps.locked) {
double altitude = 0;
- if (location.hasAltitude())
+ if (location.hasAltitude()) {
altitude = location.getAltitude();
+ state.set_gps_ground_altitude(altitude);
+ }
from_receiver = new AltosGreatCircle(location.getLatitude(),
location.getLongitude(),
altitude,