+
+ for (int s = AltosLib.ao_flight_startup; s <= AltosLib.ao_flight_landed; s++) {
+ state_count[s] = 0;
+ state_speed[s] = 0.0;
+ state_accel[s] = 0.0;
+ }
+
+ serial = cal_data.serial;
+ flight = cal_data.flight;
+
+ has_battery = series.battery_voltage_series != null;
+ has_flight_adc = series.main_voltage_series != null;
+ has_rssi = series.rssi_series != null;
+ has_flight_data = series.pressure_series != null;
+
+ if (series.gps_series != null) {
+ AltosGPS gps = series.gps_series.get(0).gps;
+
+ year = gps.year;
+ month = gps.month;
+ day = gps.day;
+ hour = gps.hour;
+ minute = gps.minute;
+ second = gps.second;
+ }
+
+ max_height = AltosLib.MISSING;
+ if (series.height_series != null)
+ max_height = series.height_series.max();
+ max_speed = AltosLib.MISSING;
+ if (series.speed_series != null)
+ max_speed = series.speed_series.max();
+ else
+ System.out.printf("missing speed series\n");
+ max_acceleration = AltosLib.MISSING;
+ if (series.accel_series != null)
+ max_acceleration = series.accel_series.max();
+ max_gps_height = AltosLib.MISSING;
+ if (series.gps_height != null)
+ max_gps_height = series.gps_height.max();
+
+/*