
Diagnosing RTL Issues in ArduPilot: Effective Use of MODE Logs
Key Takeaway
Use MODE logs to diagnose RTL issues ArduPilot effectively.
TL;DR: If you're encountering RTL issues in ArduPilot, look for MODE Rsn=3 indicating a radio failsafe event or MODE Rsn=5 for a GCS command. To address these issues, check your FS_THR_ENABLE parameter and ensure it's set to 1 to enable throttle failsafe.
What RTL Actually Is in the Log
RTL, or Return to Launch, is a critical flight mode in ArduPilot that allows a drone to automatically return to its launch point under specific conditions. The primary log message that records RTL events is the MODE message, which indicates changes in flight mode and the reasons for those changes. Here's how the MODE log message is structured:
MODE TimeUS ModeNum Rsn
TimeUS: Timestamp of the log entry in microseconds.ModeNum: Numeric representation of the flight mode (e.g., 6 for RTL).Rsn: Reason for entering this mode, providing context for the mode change.
Understanding the MODE message is essential for diagnosing RTL issues effectively.
Confirming It in Mission Planner
To analyze RTL-related logs in Mission Planner, follow these steps:
- Open Mission Planner and connect to your drone.
- Navigate to Flight Data → DataFlash Logs → Review a Log.
- Load the relevant log file.
- Go to the Log Data tab and select the
MODEmessage.
While reviewing the MODE logs, focus on plotting the following fields together:
ModeNumto identify the flight mode.Rsnto understand the reason for mode switches.TimeUSto correlate events with timestamps for better analysis.
Plotting these fields together can reveal the triggers for RTL mode activation.
Confirming It in MAVExplorer
Using MAVExplorer provides a detailed analysis of your logs. To check for RTL issues, you can use the following command:
MAV> graph MODE.Rsn MODE.ModeNum
This command will allow you to visualize the relationship between the mode changes and their reasons. If you see frequent transitions to RTL mode, it may indicate underlying issues with your drone's communication or sensor data.
Visualizing MODE messages can help pinpoint the causes of RTL activation.
Why RTL Issues Happen — Ranked by What We See Most Often
- Radio Failures: Logs showing
MODE Rsn=3indicate the drone switched to RTL mode due to a radio failsafe. This often results from signal loss or interference. - Battery Failsafe: While not a direct trigger, if the battery voltage drops below 3.3V, it can indicate a potential issue. Look for
ERR Subsys=6 ECode=1in the logs as this indicates a battery failsafe event. - GPS Glitches: Insufficient satellite lock (less than 6) can lead to unexpected RTL activation. Check for
GPS.Statusvalues below 6. - GCS Commands: If
MODE Rsn=5appears, it indicates that the operator commanded RTL through Mission Planner or QGC. - Thrust Loss: If the drone experiences thrust loss, indicated by
ERR Subsys=25 ECode=1, it may trigger RTL as a failsafe response.
Identifying the root cause of RTL issues requires careful analysis of log messages and their contexts.
Fixes for RTL Issues
- Set
FS_THR_ENABLE = 1to enable throttle failsafe, ensuring the drone activates RTL when the throttle signal is lost. - Verify the
BATT_LOW_VOLTparameter is set appropriately for the specific battery used; consider raising this threshold if battery issues are frequent. - Ensure
GPS_HDOP_GOOD = 1.0or lower to guarantee good positional accuracy. - Check radio signal strength and antenna connections to prevent
MODE Rsn=3events. - Monitor battery voltage during flights to avoid
ERR Subsys=6events, ensuring voltage remains above 3.3V.
Implementing these fixes can significantly reduce the occurrence of RTL issues in your drone.
When This Isn't Actually RTL Issues
- If
MODE Rsn=0is logged, it indicates an unknown mode change rather than a specific RTL trigger. - Logs showing
MODE Rsn=8indicate mission end, which is not related to RTL but rather the completion of a task. - Unexpected landings due to
MODE Rsn=4may be due to battery failsafe, not directly related to RTL behavior.
Understanding these distinctions helps avoid misdiagnosis of RTL-related issues.
When LogHat Helps — and When It Doesn't
LogHat excels in analyzing complex flight logs, quickly identifying patterns related to RTL issues. By parsing through MODE messages and correlating them with other log data, it provides insights that can lead to effective troubleshooting. However, LogHat cannot directly fix hardware issues such as a faulty radio or GPS receiver; these require physical inspection and repairs.
While LogHat provides valuable insights, it cannot substitute for hands-on troubleshooting of hardware components.
What is RTL in drone operations?
RTL stands for Return to Launch, a safety feature that automatically returns the drone to its launch point.How can I troubleshoot RTL issues?
Analyzing MODE log messages can help identify the root cause of RTL issues for effective troubleshooting.What should I check if my drone activates RTL unexpectedly?
Check for radio signal strength, GPS lock status, and battery voltage.What does MODE Rsn=3 indicate?
MODE Rsn=3 indicates a radio failsafe event, prompting the drone to activate RTL.How can I confirm GPS lock status in the logs?
Look for GPS.Status values; a value of 6 or higher indicates a 3D lock.What does ERR Subsys=6 ECode=1 mean?
This indicates a battery failsafe event, which may lead to an RTL activation.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