
Cross-Validate ArduPilot Telemetry Using MAVLink Inspector
Key Takeaway
Use the MAVLink Inspector to validate ArduPilot telemetry effectively.
TL;DR: To diagnose issues related to RTL in ArduPilot, check the telemetry logs for MODE Rsn=1 through MODE Rsn=5. Specifically, MODE Rsn=2 indicates a radio failsafe, while MODE Rsn=4 shows a GCS command, and MODE Rsn=5 indicates an EKF failsafe. Ensure FS_BATT_ENABLE is set to 1 for RTL on battery failsafe.
What is MAVLink Inspector in the Log?
The MAVLink Inspector is a useful tool within the QGroundControl and Mission Planner environments that allows users to inspect MAVLink message traffic and validate telemetry data. It provides critical insights into the performance and state of your ArduPilot-controlled drone. Here are some key fields relevant to MAVLink messages:
MAVLink Inspector
Message ID
Timestamp
Sender ID
Target ID
Payload
Message ID: Identifies the type of message being sent.Timestamp: Records the time the message was sent.Sender ID: Indicates which component sent the message.Target ID: Shows the intended recipient of the message.Payload: Contains the actual data being transmitted.
Key Takeaway: The MAVLink Inspector is essential for analyzing MAVLink messages and ensuring telemetry accuracy in your ArduPilot system.
How to Set Up MAVLink Inspector
Setting up the MAVLink Inspector is straightforward. First, ensure you have either Mission Planner or QGroundControl installed on your computer. To access the MAVLink Inspector in each application, follow these steps:
- Mission Planner: Go to
Initial Setup → Optional Hardware → MAVLink Inspector. - QGroundControl: Click on the
Widgetsmenu and selectMAVLink Inspector.
Key Takeaway: Accessing MAVLink Inspector is easy through Mission Planner or QGroundControl, enabling quick validation of telemetry data.
Validating System Time Synchronization
Time synchronization is crucial for accurate telemetry data analysis. Discrepancies in timestamps can lead to misleading interpretations of flight data. To check system time synchronization using MAVLink Inspector, follow these steps:
- Open MAVLink Inspector from your selected application.
- Look for the
Timestampfield in the MAVLink messages. - Compare the timestamps of different messages to ensure they are consistent.
Key Takeaway: Validating system time synchronization is vital for accurate telemetry analysis using MAVLink Inspector.
Analyzing MAVLink Messages
Understanding MAVLink message IDs and their components is essential for real-time monitoring of telemetry data. Each message ID corresponds to specific information about the drone's performance. Using the MAVLink Inspector, you can monitor various telemetry messages and evaluate the health of your drone. Here’s a common command example:
MAV> graph SYS_STATUS.HEARTBEAT GPS.STATUS
This command allows you to visualize the heartbeat status and GPS status of the drone in real time. Monitoring these fields can help identify potential issues such as communication failures or GPS glitches.
Key Takeaway: Analyzing MAVLink messages in real-time helps in identifying critical telemetry issues and overall drone health.
Why Telemetry Issues Happen — Ranked by Frequency
- GPS Glitches: Often indicated by a
GPS.Statusvalue above2.0. This can lead to loss of positional data and unreliable flight behavior. - Barometer Glitches: Detected when
ERR Subsys=18 ECode=2is logged, signaling issues with altitude readings. - Radio Failures: Signified by
MODE Rsn=2, which indicates that the drone has entered a radio failsafe mode due to communication loss. - Battery Failures: Indicated by
MODE Rsn=3, signaling that the drone is operating under a battery failsafe condition, which might not always lead to RTL. - EKF Failsafes: Noted when
MODE Rsn=5appears, which indicates a failsafe triggered by the EKF. This condition does not automatically cause RTL.
Key Takeaway: Understanding the common causes of telemetry issues can help in troubleshooting flight anomalies effectively.
Fixing Telemetry Issues
- For GPS issues, ensure
GPS_HDOP_GOOD is set below1.4for acceptable accuracy. - Address barometer glitches by checking the
BAROsensor health; replace or recalibrate if necessary. - Set
FS_BATT_ENABLE = 1to ensure RTL is activated during battery failsafe events. - Adjust
FS_THR_ENABLEto control throttle-related failsafe actions; ensure it is set appropriately to trigger RTL. - Review and modify
EK3_POS_I_GATEsettings to enhance EKF performance under noisy conditions.
Key Takeaway: Implementing specific fixes based on telemetry messages can effectively resolve issues and improve flight reliability.
When This Isn't Actually a Telemetry Issue
- Telemetry data discrepancies can occur due to improper configuration of the MAVLink settings.
- Loss of the drone's connection to the ground station does not always indicate a telemetry issue; it could be an external interference.
- GPS issues might arise from environmental factors rather than internal telemetry faults.
- Battery issues may appear as telemetry problems but can often relate to physical battery health.
Key Takeaway: Distinguishing between actual telemetry issues and external factors is crucial for effective troubleshooting.
When LogHat Helps — and When It Doesn't
LogHat excels in analyzing telemetry data over time and identifying patterns that indicate systemic issues. It can provide insights based on historical logs to help diagnose current issues. However, LogHat does not provide real-time analysis or immediate alerting for telemetry discrepancies, making tools like MAVLink Inspector complementary for live monitoring.
Key Takeaway: While LogHat offers valuable historical insights, it should be used alongside MAVLink Inspector for real-time telemetry validation.
What is MAVLink Inspector used for?
MAVLink Inspector is used to analyze MAVLink message traffic and validate telemetry data in ArduPilot.
Can I use MAVLink Inspector on my mobile device?
No, MAVLink Inspector is only supported on desktop builds of QGroundControl and Mission Planner.
How does MAVLink Inspector help diagnose telemetry issues?
It allows for real-time monitoring of MAVLink messages, helping identify issues in telemetry data.
What types of messages can I analyze with MAVLink Inspector?
You can analyze various message types, including GPS, battery status, and system status messages.
Is MAVLink Inspector available in all versions of QGroundControl?
Yes, MAVLink Inspector is a standard feature in all current versions of QGroundControl.
If you want to gain deeper insights into your ArduPilot telemetry and improve your drone's performance, consider trying LogHat for a more comprehensive log analysis experience.
About the author
LogHat Engineering Team
The LogHat engineering team — drone-systems engineers who build and operate the LogHat flight analytics platform. Posts in this byline are written and reviewed by team members working on the parsers, analysis engine, and Vector AI that the post describes.
Tagged
Try LogHat
Analyze your flight logs in seconds
Upload a .bin, .tlog, .log, or .ulg file. Get AI crash analysis, 3D replay, and forensic PDF reports instantly.
Try LogHat Free