summaryrefslogtreecommitdiff
path: root/micropeak/MicroData.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-01-10 21:37:18 -0800
committerKeith Packard <keithp@keithp.com>2013-01-10 21:48:31 -0800
commit505ef49a041740fe7cbb5c537b68d22e5fb6c0be (patch)
tree16a34f77229899b477c7d9cb294e0c5939ac367e /micropeak/MicroData.java
parente94f9547a566c74c30b6321bc073b8bdcb071604 (diff)
micropeak: Report recorded apogee instead of searching flight data
This makes sure we report the true apogee value instead of looking for the maximum height value in the flight data, in case the flight recording ended before the apogee was reached. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'micropeak/MicroData.java')
-rw-r--r--micropeak/MicroData.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/micropeak/MicroData.java b/micropeak/MicroData.java
index f1204e11..71919ddb 100644
--- a/micropeak/MicroData.java
+++ b/micropeak/MicroData.java
@@ -229,6 +229,18 @@ public class MicroData {
return altitude(i) - ground_altitude;
}
+ public double apogee_pressure() {
+ return min_pressure;
+ }
+
+ public double apogee_altitude() {
+ return AltosConvert.pressure_to_altitude(apogee_pressure());
+ }
+
+ public double apogee_height() {
+ return apogee_altitude() - ground_altitude;
+ }
+
static final int speed_avg = 3;
static final int accel_avg = 5;