+ coord(0, gps, alt);
+ prev = gps;
+ }
+
+ public void write_point(AltosTimeValue tv, boolean is_gps) {
+ int state = (int) tv.value;
+ String style_prefix = is_gps ? "gps-" : "baro-";
+ String state_name = AltosLib.state_name(state);
+ String state_label = AltosLib.state_name_capital(state);
+ String style_name = style_prefix + state_name;
+ String folder_name = is_gps ? "GPS" : "Baro";
+ String full_name = state_label + " (" + folder_name + ")";
+ AltosGPS gps = series.gps_before(tv.time);
+ double altitude = is_gps ? gps.alt : baro_altitude(series, tv.time);
+
+ point_style_start(style_name, state_color(state));
+ out.printf("%s\n", full_name);
+ switch (state) {
+ case AltosLib.ao_flight_boost:
+ out.printf("Max accel %s\n", AltosConvert.accel.show(6, stats.max_acceleration));
+ out.printf("Max speed %s\n", AltosConvert.speed.show(6, stats.max_speed));
+ break;
+ case AltosLib.ao_flight_coast:
+ case AltosLib.ao_flight_fast:
+ out.printf("Entry speed %s\n", AltosConvert.speed.show(6, stats.state_enter_speed[state]));
+ out.printf("Entry height %s\n", AltosConvert.height.show(6, altitude - cal_data.gps_pad_altitude));
+ break;
+ case AltosLib.ao_flight_drogue:
+ out.printf("Max height %s\n", AltosConvert.height.show(6, is_gps ? stats.max_gps_height : stats.max_height));
+ out.printf("Average descent rate %s\n", AltosConvert.speed.show(6, -stats.state_speed[state]));
+ break;
+ case AltosLib.ao_flight_main:
+ out.printf("Entry speed %s\n", AltosConvert.speed.show(6, -stats.state_enter_speed[state]));
+ out.printf("Entry height %s\n", AltosConvert.height.show(6, altitude - cal_data.gps_pad_altitude));
+ out.printf("Average descent rate %s\n", AltosConvert.speed.show(6, -stats.state_speed[state]));
+ break;
+ case AltosLib.ao_flight_landed:
+ out.printf("Landing speed %s\n", AltosConvert.speed.show(6, -stats.state_enter_speed[state]));
+ break;