From: Keith Packard Date: Thu, 5 May 2022 00:06:36 +0000 (-0700) Subject: ao-tools/ao-eeprom: Dump converted info for F packets X-Git-Tag: 1.9.11~1^2~7 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=6edf62c6a1f41fa5cd698067d2327b4847708cc8 ao-tools/ao-eeprom: Dump converted info for F packets Signed-off-by: Keith Packard --- diff --git a/ao-tools/ao-eeprom/ao-eeprom.c b/ao-tools/ao-eeprom/ao-eeprom.c index 90055d78..e249af9e 100644 --- a/ao-tools/ao-eeprom/ao-eeprom.c +++ b/ao-tools/ao-eeprom/ao-eeprom.c @@ -412,11 +412,14 @@ main (int argc, char **argv) log_mega = (struct ao_log_mega *) &eeprom->data[pos]; switch (log_mega->type) { case AO_LOG_FLIGHT: - printf(" serial %5u flight %5u ground_accel %6d ground_pres %9u", + printf(" serial %5u flight %5u ground_accel %6d ground_pres %9u kPa %7.1f %7.1f m", eeprom->serial_number, log_mega->u.flight.flight, log_mega->u.flight.ground_accel, - log_mega->u.flight.ground_pres); + log_mega->u.flight.ground_pres, + log_mega->u.flight.ground_pres / 1000.0, + ao_pressure_to_altitude(log_mega->u.flight.ground_pres)); + printf(" along %6d aross %6d through %6d", log_mega->u.flight.ground_accel_along, log_mega->u.flight.ground_accel_across, @@ -513,10 +516,12 @@ main (int argc, char **argv) log_mini = (struct ao_log_mini *) &eeprom->data[pos]; switch (log_mini->type) { case AO_LOG_FLIGHT: - printf(" serial %5u flight %5u ground_pres %9u", + printf(" serial %5u flight %5u ground_pres %9u kPa %7.1f %7.1f m", eeprom->serial_number, log_mini->u.flight.flight, - log_mini->u.flight.ground_pres); + log_mini->u.flight.ground_pres, + log_mini->u.flight.ground_pres / 1000.0, + ao_pressure_to_altitude(log_mini->u.flight.ground_pres)); break; case AO_LOG_STATE: ao_state(log_mini->u.state.state, @@ -542,11 +547,13 @@ main (int argc, char **argv) log_metrum = (struct ao_log_metrum *) &eeprom->data[pos]; switch (log_metrum->type) { case AO_LOG_FLIGHT: - printf(" serial %5u flight %5u ground_accel %6d ground_pres %9u ground_temp %9u", + printf(" serial %5u flight %5u ground_accel %6d ground_pres %9u kPa %7.1f %7.1f m ground_temp %9u", eeprom->serial_number, log_metrum->u.flight.flight, log_metrum->u.flight.ground_accel, log_metrum->u.flight.ground_pres, + log_metrum->u.flight.ground_pres / 1000.0, + ao_pressure_to_altitude(log_metrum->u.flight.ground_pres), log_metrum->u.flight.ground_temp); break; case AO_LOG_SENSOR: