Skip to content

tools: add --health flag to mavsummarize.py#1190

Open
Aryan95614 wants to merge 1 commit into
ArduPilot:masterfrom
Aryan95614:add-mavsummarize-health
Open

tools: add --health flag to mavsummarize.py#1190
Aryan95614 wants to merge 1 commit into
ArduPilot:masterfrom
Aryan95614:add-mavsummarize-health

Conversation

@Aryan95614

Copy link
Copy Markdown

Adds a --health flag to mavsummarize.py that prints a quick-look flight health report after the normal summary. Covers:

  • Vibration — peak VibeX/Y/Z from VIBE messages, total accelerometer clipping count
  • EKF — peak innovation test ratios (SV, SP, SH) with auto-detection of EKF3 (XKF4) vs EKF2 (NKF4), OR-union of fault status bits, and a status assessment (OK / MARGINAL / WARNING)
  • Battery — first, last, and minimum voltage from BAT messages
  • GPS — worst HDop and minimum satellite count from GPS messages
  • Errors — deduplicated ERR subsystem codes with human-readable names

Sample output:

=== Flight Health ===
Vibration:  max X=12.3 Y=15.1 Z=22.4 m/s² | Clips: 0
EKF:        max SV=0.45 SP=0.32 SH=0.21 (XKF4) | Faults: 0 | OK
Battery:    12.6V → 11.2V (min 11.0V)
GPS:        worst HDop=1.8 | min sats=9
Errors:     none

When --health is not passed, behavior is unchanged. The flag expands the recv_match type filter to include VIBE, XKF4, NKF4, BAT, GPS, and ERR in the same single-pass read.

Also fixes a minor pre-existing bug where PrintSummary() referenced the loop variable filename instead of the function parameter logfile.

Adds a flight health summary covering vibration (VIBE), EKF state
estimation (XKF4 for EKF3 and NKF4 for EKF2), battery voltage (BAT),
GPS quality (GPS), and decoded error events (ERR).

Also fixes a minor bug where PrintSummary() referenced the loop
variable `filename` instead of the function parameter `logfile`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant