summaryrefslogtreecommitdiff
path: root/altosui/AltosFlightStats.java
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2014-01-22 20:55:41 -0700
committerBdale Garbee <bdale@gag.com>2014-01-22 20:55:41 -0700
commit9884ca1449167a06bd2cebc7d28353eeac592493 (patch)
tree9fde328b3a5971c67954e669c1ba27042821fd8c /altosui/AltosFlightStats.java
parent8e669694a60d34e2ea0f8f6b189e0bc3605d94d7 (diff)
parent0ef0c50536e5eb6ad3455b5828983307edbab828 (diff)
Merge branch 'branch-1.3' into debian
Diffstat (limited to 'altosui/AltosFlightStats.java')
-rw-r--r--altosui/AltosFlightStats.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java
index 552210c3..bf5644c3 100644
--- a/altosui/AltosFlightStats.java
+++ b/altosui/AltosFlightStats.java
@@ -18,7 +18,7 @@
package altosui;
import java.io.*;
-import org.altusmetrum.altoslib_2.*;
+import org.altusmetrum.altoslib_3.*;
public class AltosFlightStats {
double max_height;
@@ -38,6 +38,9 @@ public class AltosFlightStats {
boolean has_gps;
boolean has_other_adc;
boolean has_rssi;
+ boolean has_imu;
+ boolean has_mag;
+ boolean has_orient;
double landed_time(AltosStateIterable states) {
AltosState state = null;
@@ -108,6 +111,9 @@ public class AltosFlightStats {
has_gps = false;
has_other_adc = false;
has_rssi = false;
+ has_imu = false;
+ has_mag = false;
+ has_orient = false;
for (AltosState state : states) {
if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING)
serial = state.serial;
@@ -157,6 +163,12 @@ public class AltosFlightStats {
lon = state.gps.lon;
has_gps = true;
}
+ if (state.imu != null)
+ has_imu = true;
+ if (state.mag != null)
+ has_mag = true;
+ if (state.orient() != AltosLib.MISSING)
+ has_orient = true;
}
for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) {
if (state_count[s] > 0) {