altoslib: Report GPS height when baro height is not available
authorKeith Packard <keithp@keithp.com>
Thu, 12 Jun 2014 06:04:11 +0000 (23:04 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 12 Jun 2014 06:04:11 +0000 (23:04 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosState.java

index 6926994c4292b7c6d19ef9e21ce98e32346f8767..256826a5d0da65185db38bb9826996f45546f38b 100644 (file)
@@ -481,7 +481,7 @@ public class AltosState implements Cloneable {
                double g = ground_altitude();
                if (a != AltosLib.MISSING && g != AltosLib.MISSING)
                        return a - g;
-               return AltosLib.MISSING;
+               return gps_height();
        }
 
        public double max_height() {