- static final int MIN_PAD_SAMPLES = 10;
-
- public void show(AltosState state) {
- flightStatusModel.set(state);
-
- info_reset();
- if (state.npad >= MIN_PAD_SAMPLES)
- info_add_row(0, "Ground state", "%s", "ready");
- else
- info_add_row(0, "Ground state", "waiting for gps (%d)",
- MIN_PAD_SAMPLES - state.npad);
- info_add_row(0, "Rocket state", "%s", state.data.state);
- info_add_row(0, "Callsign", "%s", state.data.callsign);
- info_add_row(0, "Rocket serial", "%d", state.data.serial);
- info_add_row(0, "Rocket flight", "%d", state.data.flight);
-
- info_add_row(0, "RSSI", "%6ddBm", state.data.rssi);
- info_add_row(0, "Height", "%6.0fm", state.height);
- info_add_row(0, "Max height", "%6.0fm", state.max_height);
- info_add_row(0, "Acceleration", "%7.1fm/s²", state.acceleration);
- info_add_row(0, "Max acceleration", "%7.1fm/s²", state.max_acceleration);
- info_add_row(0, "Speed", "%7.1fm/s", state.ascent ? state.speed : state.baro_speed);
- info_add_row(0, "Max Speed", "%7.1fm/s", state.max_speed);
- info_add_row(0, "Temperature", "%6.2f°C", state.temperature);
- info_add_row(0, "Battery", "%5.2fV", state.battery);
- info_add_row(0, "Drogue", "%5.2fV", state.drogue_sense);
- info_add_row(0, "Main", "%5.2fV", state.main_sense);
- info_add_row(0, "Pad altitude", "%6.0fm", state.ground_altitude);
- if (state.gps != null)
- info_add_row(1, "Satellites", "%d", state.gps.nsat);
- else
- info_add_row(1, "Satellites", "%d", 0);
- if (state.gps != null && state.gps.gps_locked) {
- info_add_row(1, "GPS", "locked");
- } else if (state.gps != null && state.gps.gps_connected) {
- info_add_row(1, "GPS", "unlocked");
- } else {
- info_add_row(1, "GPS", "not available");