Diagnosing BARO Glitch Events with ArduPilot .bin Logs
ArduPilotdrone engineeringbarometer diagnosisflight logs

Diagnosing BARO Glitch Events with ArduPilot .bin Logs

LogHat Engineering TeamJune 14, 20265 min read

Key Takeaway

You can diagnose BARO glitch events by analyzing ArduPilot .bin logs for barometer issues.

TL;DR: To diagnose BARO glitch events in ArduPilot logs, look for ERR Subsys=18 and ECode=2 for barometer glitches. Implement foam covers and improve sensor placement as a fix.

What BARO Glitches Actually Are in the Log

BARO glitches refer to unexpected or inaccurate altitude readings logged by the drone's barometer. These glitches can lead to significant flight control issues and affect overall flight stability. In the logs, they are identified by specific error messages.

ERR Subsys  ECode  TimeUS  Alt  Press  Temp
  • ERR Subsys: Indicates the subsystem reporting the error, with 18 specifically for the barometer.
  • ECode: Provides the specific error code; 2 indicates a barometer glitch.
  • TimeUS: Timestamp of when the glitch was detected.
  • Alt: The altitude reading at the time of the glitch.
  • Press: Atmospheric pressure reading from the barometer.
  • Temp: Temperature reading from the barometer sensor.
Key takeaway: BARO glitches can disrupt altitude readings and affect flight stability. Identifying these issues in logs is crucial for troubleshooting.

Confirming It in Mission Planner

To confirm BARO glitches in Mission Planner, follow these steps:

  • Open Flight Data.
  • Navigate to DataFlash Logs in the top menu.
  • Select Review a Log to load a specific flight log.

Once loaded, plot the following fields together:

  • ALT: Monitor altitude changes.
  • Press: Observe pressure variations.
  • ERR: Check for any logged error events related to the barometer.
Key takeaway: Using Mission Planner to visualize these fields will help you identify patterns indicative of BARO glitches.

Confirming It in MAVExplorer

In MAVExplorer, you can execute the following command to graph relevant data:

MAV> graph BARO.Alt BARO.Press

This command will plot altitude alongside pressure readings, allowing you to visually assess the correlation between the two. A significant deviation in altitude readings, not corresponding to pressure changes, often indicates a BARO glitch.

Key takeaway: MAVExplorer enables detailed plotting of log data, helping to diagnose BARO issues effectively.

Why BARO Glitches Happen — Ranked by What We See Most Often

  1. Environmental Interference: Rapid changes in wind or prop wash can cause the barometer to misread. This is often reflected in erratic altitude changes.
  2. Sensor Placement: Improperly mounted barometers can pick up vibrations from the drone's frame, leading to inaccurate readings.
  3. Temperature Fluctuations: Significant temperature changes can affect the barometer's pressure readings, leading to altitude inaccuracies.
  4. Firmware Bugs: Occasionally, bugs in the ArduPilot firmware can cause glitches in sensor readings, including those from the barometer.
  5. Barometer Damage: Physical damage to the sensor can lead to persistent glitches. Logs may show consistent error messages across multiple flights.
Key takeaway: Understanding the root causes of BARO glitches helps in implementing effective prevention strategies.

Resolving BARO Glitch Issues

  1. Implement BARO_OFFSET: Adjust the barometer offset to calibrate readings accurately.
  2. Use foam covers: Place foam around the barometer to reduce vibrations and protect it from environmental factors.
  3. Improve sensor placement: Ensure the barometer is mounted away from sources of vibration and in a location with stable airflow.
  4. Check firmware updates: Review the latest ArduPilot firmware for bug fixes related to barometer functionality.
  5. Monitor temperature: Keep an eye on temperature readings and consider relocating the barometer if temperature fluctuations are significant.
Key takeaway: Implementing these fixes can significantly reduce the occurrence of BARO glitches in flight logs.

When This Isn't Actually a BARO Glitch

  • GPS signal loss: A drop in GPS quality can lead to altitude inconsistencies that may mimic BARO glitches.
  • Battery voltage issues: Low voltage can affect the flight controller's performance, leading to erroneous sensor readings.
  • Electrical interference: Nearby electronic devices can cause noise in sensor readings, leading to false positives in barometer data.
Key takeaway: Distinguishing true BARO glitches from other issues is essential for accurate diagnosis.

When LogHat Helps — and When It Doesn't

LogHat assists in analyzing flight logs by identifying error codes and correlating them with flight performance metrics. It can highlight patterns associated with BARO glitches, making it easier to diagnose and fix issues. However, LogHat cannot directly adjust hardware setups or provide real-time analysis during flights, which limits its functionality in preventing glitches from occurring in the first place.

Key takeaway: While LogHat is a powerful tool for log analysis, hardware adjustments and real-time monitoring remain outside its capabilities.
``` ```json { "seo_meta": { "faq": [ { "q": "What are common symptoms of BARO glitches?", "a": "Symptoms include unexpected altitude changes and oscillations." }, { "q": "How can I prevent BARO glitches in my drone?", "a": "Use foam covers and ensure proper sensor placement to minimize interference." }, { "q": "What does ERR Subsys=18 ECode=2 indicate?", "a": "It indicates a barometer glitch has been detected." }, { "q": "How can I confirm BARO glitches in Mission Planner?", "a": "Plot ALT, Press, and ERR fields together to visualize discrepancies." }, { "q": "What environmental factors contribute to BARO glitches?", "a": "Wind gusts, prop wash, and temperature fluctuations can all lead to inaccuracies." }, { "q": "What should I do if my barometer is damaged?", "a": "Replace the sensor and recalibrate it to ensure accurate readings." }, { "q": "How can firmware updates help with BARO glitches?", "a": "Updates often include bug fixes that improve sensor accuracy and stability." } ] } }

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 engineeringbarometer diagnosisflight logs

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