
Diagnosing RTL Issues in ArduPilot with MODE Log Messages
Key Takeaway
You can diagnose RTL issues in ArduPilot by analyzing MODE log messages for insights.
TL;DR: To effectively diagnose RTL issues in ArduPilot, check the MODE Rsn values in your flight logs: MODE Rsn=0 (manual), MODE Rsn=1 (GCS command), MODE Rsn=2 (radio failsafe), MODE Rsn=3 (battery failsafe), MODE Rsn=4 (GCS failsafe), and note that MODE Rsn=5 indicates EKF failsafe, which does not trigger RTL unless configured to do so.
Diagnosing RTL issues in ArduPilot is essential for maintaining safe and reliable drone operations. Understanding the causes behind RTL activation can help prevent unexpected behavior during flights. This article outlines how to diagnose RTL issues effectively and troubleshoot common problems.
What Are MODE Log Messages in ArduPilot?
MODE log messages are crucial for understanding flight mode transitions in ArduPilot. These logs capture the state of the vehicle and the reasons for switching modes, especially when we need to diagnose RTL issues in ArduPilot. The data helps in identifying the specific conditions that lead to an RTL activation or failure.
MODE TimeUS ModeNum Rsn
TimeUS: Timestamp of the log entry.ModeNum: The current flight mode number, indicating what mode the vehicle is in (e.g., 0 for STABILIZE, 6 for RTL).Rsn: The reason for the mode change, providing insight into why RTL might have been triggered.
Key Takeaway: Analyzing MODE log messages is essential for diagnosing RTL issues, as they reveal the flight mode transitions and the reasons behind them.
How to Confirm MODE Log Messages in Mission Planner?
To analyze MODE log messages in Mission Planner, follow these steps:
- Open Mission Planner and connect to your vehicle.
- Navigate to Flight Data → DataFlash Logs → Review a Log.
- Select the appropriate log file to examine.
Once the log is loaded, plot the following fields together:
MODE.ModeNumMODE.RsnCTUN.DAlt(desired altitude)CTUN.Alt(actual altitude)
Key Takeaway: Use Mission Planner to visualize MODE log messages alongside altitude data for better insights into RTL functionality.
How to Confirm MODE Log Messages in MAVExplorer?
In MAVExplorer, you can extract and visualize MODE information effectively. Run the following command:
MAV> graph MODE.Rsn MODE.ModeNum
This command will plot the reason and mode number, helping you identify transitions and their causes during flight.
Key Takeaway: Using MAVExplorer allows for quick visualization of MODE transitions, aiding in the diagnosis of RTL-related issues.
What Are Common RTL Issues in ArduPilot?
Common RTL issues generally stem from a few key problems:
- Inadequate GPS Signal: A poor GPS signal can prevent the drone from achieving a reliable position lock. Ensure you have a minimum of 6 satellites for a 3D lock, with 8-10+ being optimal.
- Improper Configuration: Misconfigured settings in the RTL parameters can hinder proper execution. Ensure parameters like
FS_BATT_ENABLEandFS_THR_ENABLEare set correctly, as GCS failsafe does not trigger RTL unless configured to do so. - Flight Mode Management: Incorrect mode transitions can occur if the pilot accidentally switches modes. Monitor
MODE.Rsnto determine if mode switches are intentional or accidental.
Key Takeaway: Common RTL issues often arise from GPS signal quality, configuration errors, or unintended mode changes.
What Steps Should You Take to Diagnose RTL Issues?
To effectively diagnose RTL issues in ArduPilot, follow these structured steps:
- Review Flight Logs: Examine the
MODE.Rsnvalues to identify how the vehicle transitioned into RTL mode. For example, if you seeMODE Rsn=2, check ifFS_THR_ENABLEwas set to trigger RTL. - Check GPS Data: Ensure the GPS status is adequate during RTL events. Plot
GPS.StatusandGPS.NSatsto confirm that you have a valid lock. Look for HDOP values below 1.0 for reliable positioning. - Verify Parameter Settings: Check relevant failsafe parameters like
FS_BATT_ENABLEandFS_THR_ENABLEto ensure they are properly configured for your flight. For instance, ifMODE Rsn=3appears, ensureFS_BATT_ENABLE=1is set.
Key Takeaway: Systematically reviewing flight logs, GPS data, and parameters helps pinpoint the cause of RTL issues.
When This Isn't Actually an RTL Issue?
- GPS Glitch: An
ERR Subsys=11 ECode=2indicates a GPS glitch but isn’t directly tied to an RTL issue. - Battery Failsafe: An event logged as
MODE Rsn=3indicates a battery failsafe but does not necessarily result in RTL unless configured to do so. - Radio Failsafe: A
MODE Rsn=2indicates a radio failsafe, which requires the correct configuration to trigger an RTL.
Key Takeaway: Not all logged events indicate RTL failures; understanding the nuances is critical for accurate diagnosis.
When LogHat Helps — and When It Doesn't
LogHat excels at analyzing flight logs to identify and visualize MODE transitions and associated issues. However, it cannot directly resolve configuration errors or provide real-time feedback on GPS signal quality during flight. LogHat's analysis is retrospective and reliant on the data available in the logs.
Key Takeaway: While LogHat provides valuable insights into flight logs, it cannot replace real-time monitoring or direct configuration adjustments.
What are common causes of RTL not triggering?
A: Issues with RC signal, GPS errors, or improper configuration can prevent RTL from triggering.How can I interpret MODE log messages effectively?
A: Focus on changes in flight modes and any warnings related to RTL. Pay attention toMODE Rsn values to determine the cause of transitions, such as a GCS command or failsafe event.
What should I check first if RTL fails?
A: Start by reviewing GPS data andMODE.Rsn values in the logs to identify any anomalies, such as insufficient satellites or high HDOP values.
How many satellites are required for 3D GPS lock?
A: A minimum of 6 satellites is required, with 8-10+ recommended for reliable flight.What is the significance of MODE Rsn=4?
A: MODE Rsn=4 indicates a GCS failsafe, which can trigger RTL if configured correctly.
How does battery failsafe affect RTL?
A: Battery failsafe (MODE Rsn=3) does not trigger RTL unless FS_BATT_ENABLE is set to 1, indicating the feature is active.
How does GCS command influence RTL?
A: AMODE Rsn=1 indicates a GCS command but does not guarantee that RTL is triggered; it must be verified in the log data.
What does MODE Rsn=5 signify?
A: MODE Rsn=5 indicates an EKF failsafe, which is valid but does not directly trigger RTL unless configured to do so.If you encounter challenges diagnosing RTL issues, consider leveraging LogHat for comprehensive flight log analysis. Our platform provides the insights necessary to refine your ArduPilot configurations.
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