Diagnosing RTL Issues in ArduPilot: A Technical Guide
ArduPilotdrone engineeringRTL issuestroubleshooting

Diagnosing RTL Issues in ArduPilot: A Technical Guide

LogHat Engineering TeamJune 11, 20265 min read

Key Takeaway

Diagnosing RTL issues in ArduPilot involves analyzing MODE log messages for effective solutions.

TL;DR: To diagnose RTL issues in ArduPilot, check your log for MODE Rsn=0 to MODE Rsn=4 values, ensuring that MODE Rsn=5 is not misinterpreted as triggering RTL. Common fixes involve correcting failsafe configurations and ensuring sufficient GPS lock.

What is RTL Functionality in ArduPilot?

Return-to-Launch (RTL) is a critical feature in ArduPilot that allows the drone to autonomously return to its launch point during failsafe conditions. Understanding how RTL is designed to operate helps in diagnosing issues when it fails to trigger as expected. Typically, RTL is engaged under specific conditions, such as loss of signal or battery failsafe, making it essential for flight safety.

MODE Rsn  STATUS
0      UNKNOWN
1      RC_COMMAND
2      GCS_COMMAND
3      RADIO_FAILSAFE
4      BATTERY_FAILSAFE
5      GCS_FAILSAFE
  • MODE Rsn=0: Unknown mode — no action taken.
  • MODE Rsn=1: Mode commanded via RC — not necessarily an RTL.
  • MODE Rsn=2: Commanded by Ground Control Station (GCS); confirm it was intentional.
  • MODE Rsn=3: Engaged due to radio failsafe; check if FS_THR_ENABLE is set.
  • MODE Rsn=4: Triggered by battery failsafe; confirm if FS_BATT_ENABLE is active.
  • MODE Rsn=5: EKF failsafe — does not directly trigger RTL unless configured.
Key Takeaway: RTL is designed to enhance safety by returning the drone to its launch point during critical situations. Understanding the specific MODE Rsn values is key to diagnosing issues.

How to Confirm RTL Settings in Mission Planner?

To confirm your RTL settings and examine relevant log messages in Mission Planner, follow these steps:

  • Open Mission Planner and connect to your drone.
  • Select the Flight Data tab.
  • Access the DataFlash Logs section.
  • Click on Review a Log to load your latest flight log.

Look for the MODE and ERR messages, plotting the following fields together for analysis:

  • MODE Rsn
  • ERR Subsys
  • GPS.Status
Key Takeaway: Use Mission Planner to effectively visualize and analyze logs, focusing on MODE Rsn and error subsystems to identify RTL issues.

How to Analyze RTL Issues in MAVExplorer?

MAVExplorer is a powerful tool for analyzing ArduPilot logs. To examine RTL issues, you can use specific commands to visualize the relevant data:

MAV> graph MODE Rsn ERR.Subsys GPS.Status

This command allows you to plot the mode, error subsystem, and GPS status together, providing insights into the conditions leading to RTL activation or failure. Look for patterns where MODE Rsn indicates a failsafe state alongside potential errors in the ERR messages.

Key Takeaway: MAVExplorer enables detailed analysis of flight logs, helping you visualize critical parameters related to RTL triggers and errors.

Why RTL Issues Happen — Ranked by What We See Most Often

  1. Insufficient GPS Lock: If the drone has fewer than 6 satellites, it may not achieve a 3D lock needed for RTL. Ensure you have at least 8-10 satellites for reliable navigation.
  2. Failsafe Configuration Errors: Incorrect settings for FS_THR_ENABLE or FS_BATT_ENABLE can prevent RTL from engaging. Check your configuration in Mission Planner.
  3. Unintentional GCS Commands: A MODE Rsn=2 command may mistakenly trigger RTL if not properly configured. Verify that commands sent through GCS are intentional.
  4. Battery Voltage Issues: If the drone's battery voltage drops below the configured threshold, it may trigger an RTL. Monitor BAT messages for voltage readings.
  5. Signal Loss: A radio failsafe triggered by MODE Rsn=3 may not engage RTL if FS_THR_ENABLE is disabled. Ensure that failsafe settings are correctly set up.
Key Takeaway: Recognizing the common causes of RTL issues enables effective troubleshooting, allowing for timely adjustments to ensure reliable operation.

What Are the Fixes for RTL Issues?

  1. Ensure the GPS_HDOP_GOOD parameter is set to below 1.0 for optimal GPS performance.
  2. Check FS_THR_ENABLE and set it to 1 to ensure that radio failsafes trigger RTL properly.
  3. Set FS_BATT_ENABLE to 1 to activate battery failsafe triggering for RTL.
  4. Verify that your drone consistently maintains a minimum of 6 satellites during operation; aim for 8-10 satellites.
  5. Review and adjust your configuration in Mission Planner, focusing on the Failsafe tab.
Key Takeaway: Implementing specific parameter adjustments can resolve common RTL issues, enhancing the drone's reliability in critical situations.

When This Isn't Actually an RTL Issue

  • Low battery voltage without triggering RTL may indicate incorrect failsafe settings rather than a genuine RTL malfunction.
  • Receiving a MODE Rsn=5 does not indicate a direct cause of RTL failure; it reflects an EKF failsafe condition.
  • Logs showing ERR Subsys=18 indicate an EKF primary change, which is unrelated to RTL issues.
  • Inconsistent satellite lock may cause erratic behavior but isn't always linked to RTL triggers.
Key Takeaway: Understanding the false signals can prevent misdiagnosing issues, ensuring a focused approach to troubleshooting RTL-related problems.

When LogHat Helps — and When It Doesn't

LogHat aids engineers by providing detailed flight log analysis, highlighting critical areas such as MODE Rsn and fail-safes relevant to diagnosing RTL issues. However, it cannot replace the need for thorough configuration checks in Mission Planner or MAVExplorer, as hardware-related problems may require physical inspection or adjustments.

Key Takeaway: While LogHat streamlines log analysis, it must be used in conjunction with proper configuration and checks to fully resolve RTL issues.
What should I do if my RTL is not triggering?

Check your channel configuration and analyze the flight logs for warning messages.

How can I analyze MODE log messages effectively?

Use LogHat to visualize and interpret your ArduPilot flight logs for better insights.

What is the minimum GPS requirement for RTL functionality?

Ensure a minimum of 6 satellites for a 3D lock; 8-10 are recommended for reliable flight.

How do I check my failsafe settings in Mission Planner?

Navigate to the Failsafe tab in Mission Planner and review the settings for FS_THR_ENABLE and FS_BATT_ENABLE.

What are common causes for RTL failures in ArduPilot?

Common causes include insufficient GPS lock, incorrect failsafe configurations, unintentional commands from GCS, and battery voltage issues.

How can I monitor battery health to prevent RTL issues?

Regularly check BAT messages for voltage and health indicators to ensure battery reliability.

If you’re facing RTL issues, ensure to leverage LogHat's capabilities for in-depth log analysis, and don’t hesitate to reach out for tailored support. Understanding and addressing these issues can significantly enhance your operational safety and efficiency.

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 engineeringRTL issuestroubleshooting

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