+
+ has_flight_state = false;
+ has_basic = false;
+ has_battery = false;
+ has_advanced = false;
+ has_gps = false;
+ has_gps_sat = false;
+ has_companion = false;
+ for (AltosState state : states) {
+ if (state.state != AltosLib.ao_flight_stateless && state.state != AltosLib.ao_flight_invalid && state.state != AltosLib.ao_flight_startup)
+ has_flight_state = true;
+ if (state.acceleration() != AltosLib.MISSING || state.pressure() != AltosLib.MISSING)
+ has_basic = true;
+ if (state.battery_voltage != AltosLib.MISSING)
+ has_battery = true;
+ if (state.imu != null || state.mag != null)
+ has_advanced = true;
+ if (state.gps != null) {
+ has_gps = true;
+ if (state.gps.cc_gps_sat != null)
+ has_gps_sat = true;
+ }
+ if (state.companion != null)
+ has_companion = true;
+ }