Diagnosing RTL Issues in ArduPilot Using MODE Log Messages
ArduPilotdrone safetyRTL troubleshootinglog analysis

Diagnosing RTL Issues in ArduPilot Using MODE Log Messages

LogHat Engineering TeamMarch 27, 20266 min read

Key Takeaway

Diagnosing RTL issues ArduPilot can be done using MODE log messages for effective troubleshooting.

TL;DR: To diagnose RTL issues in ArduPilot, check MODE Rsn=1 for GCS commands, which should be intentional to trigger RTL; MODE Rsn=2 for radio failsafe, MODE Rsn=3 for battery failsafe, and note that MODE Rsn=5 indicates an EKF failsafe. Ensure the parameters and configurations are correctly set to avoid unintended mode changes.

How to Diagnose RTL Issues in ArduPilot Using MODE Log Messages?

In ArduPilot, MODE log messages provide critical insights into the operational state of the drone, particularly regarding mode transitions such as Return-to-Launch (RTL). These messages indicate how the vehicle is responding to commands and environmental conditions. Understanding these messages is vital for diagnosing RTL issues effectively. This article details how to interpret these logs and resolve common RTL issues in ArduPilot.

MODE ModeNum Rsn RsnNum
  • ModeNum: The current flight mode number, where 6 indicates RTL.
  • Rsn: Reason for mode change, indicating the trigger for the current mode.
  • RsnNum: Specific reason code detailing the nature of the command or trigger.
Key Takeaway: Understanding MODE log messages is essential for diagnosing RTL issues effectively.

How to Confirm RTL Functionality in Mission Planner

To confirm RTL functionality using Mission Planner, follow these steps:

  • Open Mission Planner and go to Flight Data.
  • Navigate to the DataFlash Logs tab.
  • Select Review a Log and load your log file.
  • In the log review interface, plot MODE.ModeNum, MODE.Rsn, and ERR messages.

These fields provide a clear view of the mode transitions and any errors that may have occurred during the flight. It is essential to ensure that the drone is configured correctly before flying to avoid unintended behavior. Remember that MODE Rsn=1 indicates a GCS command but does not automatically trigger RTL unless specifically commanded.

Key Takeaway: Utilizing Mission Planner allows for straightforward visualization of MODE log messages to identify potential issues.

How to Analyze RTL Issues in MAVExplorer

MAVExplorer is another powerful tool for analyzing your drone's logs. Use the following command to extract relevant data:

MAV> graph MODE.Rsn MODE.ModeNum

This command will help visualize any transitions to RTL and the reasons behind those transitions. By reviewing the plotted data, you can identify whether the RTL mode was triggered as expected and the cause of any issues. This approach is beneficial for identifying patterns and anomalies over multiple flights.

Key Takeaway: MAVExplorer provides a detailed graphical representation of mode transitions, aiding in the diagnosis of RTL issues.

Why RTL Issues Happen — Ranked by Frequency

  1. GPS Signal Loss: A common cause for RTL issues. If the drone loses GPS signal, it may not initiate RTL correctly. Symptoms often show GPS.Status=0, indicating no GPS lock. It’s crucial to ensure that the GPS unit is functioning properly and has a clear line of sight to the sky. Consider using a GPS signal booster if necessary.
  2. Failed Radio Connection: If the radio fails, the drone may trigger RTL. Look for MODE Rsn=2 in the logs, indicating a radio failsafe. This issue can often be attributed to interference or low battery levels in the transmitter. Regularly check your radio equipment for optimal performance.
  3. Batteries Running Low: A battery failsafe can also trigger RTL. This is indicated by MODE Rsn=3 if the BATT_FS_LOW_ACT parameter is enabled. Monitoring battery levels is critical to prevent premature RTL activation. Using a smart battery monitor can help keep track of voltage levels.
  4. GCS Commands: Commands from Ground Control Station (GCS) can trigger an unintentional RTL. Check for MODE Rsn=1 to assess if this was the case. Confirming that the commands were intentional is essential to avoid confusion. Review command logs regularly to ensure accurate operation.
  5. EKF Failsafe: An EKF failsafe situation can force the drone into RTL. Logs will show MODE Rsn=5 for this condition. Understanding the EKF settings and the conditions that trigger failsafe scenarios can help prevent unwanted RTL activation. Adjusting the EKF settings based on flight conditions may reduce failsafe occurrences.
Key Takeaway: Understanding the most common causes of RTL issues helps in effectively diagnosing and troubleshooting problems.

What Are the Solutions to Common RTL Issues?

  1. Ensure a consistent GPS signal by checking the GPS.Status. Adjust the drone's position or antenna to improve reception when necessary. Using a high-quality GPS module can enhance reliability and accuracy.
  2. Inspect the radio settings to ensure reliability. Ensure that FS_THR_ENABLE is set to 1 to allow RTL upon radio failsafe. Regularly check your transmitter battery and connection stability to avoid issues. Consider using a dual receiver setup for redundancy.
  3. Check battery levels and settings, particularly BATT_LOW_VOLT and BATT_FS_LOW_ACT, to prevent premature RTL activation due to low voltage. Calibrating battery voltage readings can help maintain accurate monitoring. Establishing a routine maintenance schedule for batteries can prolong their lifespan.
  4. Verify GCS command configurations to ensure that unintended commands are not sent. This includes checking the MODE Rsn=1 logs for any unintentional triggers. Implementing command confirmation protocols can mitigate accidental commands.
  5. Review EKF settings and assess the FS_EKF_ACTION. Ensure appropriate actions are defined for EKF conditions to prevent unexpected behavior during flight. Using simulation software to test various scenarios can help fine-tune these settings.
Key Takeaway: Applying targeted solutions based on log analysis can resolve RTL issues effectively.

When This Isn't Actually RTL Troubleshooting

  • Confusion between MODE Rsn=2 (radio failsafe) and MODE Rsn=1 (GCS command) can lead to misdiagnosis, resulting in unnecessary troubleshooting efforts. Always cross-reference logs to confirm the cause.
  • Assuming GPS signal loss is the only cause of RTL issues without considering battery or radio factors can overlook critical issues that need addressing. Conduct a comprehensive check of all systems prior to flight.
  • Misinterpreting MODE Rsn=5 as indicative of a barometer glitch rather than an EKF failsafe can lead to incorrect conclusions about the flight performance. Understanding the distinctions between various error codes is essential for accurate diagnosis.
Key Takeaway: Recognizing these common misinterpretations can prevent unnecessary troubleshooting efforts.

When LogHat Helps — and When It Doesn't

LogHat excels in providing detailed log analysis and insights into the specific causes of RTL issues based on historical data across multiple flights. It identifies patterns and anomalies effectively. However, it cannot directly fix hardware issues or guarantee that external factors such as environmental conditions will not influence flight behavior. Understanding the limitations of LogHat allows users to focus on actionable items that can improve flight reliability, while also recognizing the importance of hands-on troubleshooting when necessary.

Key Takeaway: While LogHat offers valuable insights, some external factors may still require hands-on troubleshooting.
What is RTL in drone operation?

RTL stands for Return-to-Launch, a mode that allows drones to autonomously return to their launch point.

How can I troubleshoot RTL issues?

Analyze MODE log messages for errors, assess GPS signals, and check RC configurations.

What does MODE Rsn=1 indicate?

MODE Rsn=1 indicates a GCS command, which can trigger RTL if configured to do so, but does not automatically initiate it without a specific command.

What should I check if my drone does not initiate RTL?

Ensure GPS signal quality, check radio settings, and verify battery levels.

How do I confirm RTL functionality in MAVExplorer?

Use the command 'MAV> graph MODE.Rsn MODE.ModeNum' to visualize mode transitions.

What is the significance of MODE Rsn=5?

MODE Rsn=5 indicates an EKF failsafe, which may lead to an RTL if configured appropriately.

How can I improve GPS signal for better RTL performance?

Adjust the drone's position or antenna and ensure it is free from obstructions.

For further assistance with diagnosing and troubleshooting RTL issues, consider utilizing LogHat for in-depth log analysis and monitoring. Our platform can provide insights that lead to more effective flight operations.

About the author

LE

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

ArduPilotdrone safetyRTL troubleshootinglog analysis

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