*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
public int hour, minute, second;
public double lat, lon;
public double pad_lat, pad_lon;
public int hour, minute, second;
public double lat, lon;
public double pad_lat, pad_lon;
- public boolean has_other_adc;
+ public boolean has_gps_sats;
+ public boolean has_gps_detail;
+ public boolean has_flight_adc;
+ public boolean has_battery;
hour = minute = second = AltosLib.MISSING;
serial = flight = AltosLib.MISSING;
lat = lon = AltosLib.MISSING;
hour = minute = second = AltosLib.MISSING;
serial = flight = AltosLib.MISSING;
lat = lon = AltosLib.MISSING;
for (AltosState state : states) {
if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING)
serial = state.serial;
if (flight == AltosLib.MISSING && state.flight != AltosLib.MISSING)
flight = state.flight;
if (state.battery_voltage != AltosLib.MISSING)
for (AltosState state : states) {
if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING)
serial = state.serial;
if (flight == AltosLib.MISSING && state.flight != AltosLib.MISSING)
flight = state.flight;
if (state.battery_voltage != AltosLib.MISSING)
- int state_id = state.state;
- if (state.time >= boost_time && state_id < AltosLib.ao_flight_boost)
+ if (state.pressure() != AltosLib.MISSING)
+ has_flight_data = true;
+
+ int state_id = state.state();
+ if (boost_time != AltosLib.MISSING && state.time >= boost_time && state_id < AltosLib.ao_flight_boost) {
if (0 <= state_id && state_id < AltosLib.ao_flight_invalid) {
double acceleration = state.acceleration();
double speed = state.speed();
if (0 <= state_id && state_id < AltosLib.ao_flight_invalid) {
double acceleration = state.acceleration();
double speed = state.speed();
state_start[state_id] = state.time;
if (state_end[state_id] < state.time)
state_end[state_id] = state.time;
state_start[state_id] = state.time;
if (state_end[state_id] < state.time)
state_end[state_id] = state.time;
- max_height = state.max_height();
- max_speed = state.max_speed();
- max_acceleration = state.max_acceleration();
- max_gps_height = state.max_gps_height();
+ }
+ if (state.pad_lat != AltosLib.MISSING) {
+ pad_lat = state.pad_lat;
+ pad_lon = state.pad_lon;
if (state_count[s] > 0) {
state_speed[s] /= state_count[s];
state_accel[s] /= state_count[s];
if (state_count[s] > 0) {
state_speed[s] /= state_count[s];
state_accel[s] /= state_count[s];