Diagnosing BARO Glitch Events Using ArduPilot .bin Logs
ArduPilotdrone engineeringlog analysistroubleshooting

Diagnosing BARO Glitch Events Using ArduPilot .bin Logs

LogHat Engineering TeamJune 13, 20265 min read

Key Takeaway

BARO glitch diagnosis can be performed by analyzing ArduPilot .bin logs.

TL;DR: To diagnose BARO glitch events, look for the ERR subsystem with Subsys=18 and ECode=2 in your logs, indicating a barometer glitch. To fix this, check your barometer connections and consider adjusting SIM_BARO_GLITCH and SIM_BAR2_GLITCH parameters.

What is a BARO Glitch Event in the Log?

A BARO glitch event refers to anomalies in the barometric data logged during flight, which can impact the drone's altitude readings and overall stability. In ArduPilot logs, these events are captured under specific message types associated with the barometer.

BARO  TimeUS  I  Alt  AltAMSL  Press  Temp  CRt  SMS  Offset  GndTemp  H  CPress
  • TimeUS: Timestamp of the logged data.
  • I: Instance number of the barometer.
  • Alt: Altitude above sea level in meters.
  • Press: Atmospheric pressure in Pascals.
  • Temp: Temperature in hundredths of degrees Celsius.
  • H: Health status of the barometer (0 = unhealthy, 1 = healthy).
Key Takeaway: Recognizing BARO glitch events in your logs is essential for diagnosing altitude-related issues in flight performance.

Confirming it in Mission Planner

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

  • Open Mission Planner and connect your drone.
  • Navigate to the Flight Data tab.
  • Click on DataFlash Logs and select Review a Log.
  • In the log analysis window, plot the following fields:
    • BARO.Alt
    • BARO.Press
    • BARO.Temp
    • BARO.H
Key Takeaway: Use Mission Planner to visualize and confirm the presence of BARO glitches in your log data.

Confirming it in MAVExplorer

MAVExplorer provides an efficient way to analyze log data. To check for BARO glitches, you can run the following command:

MAV> graph BARO.Alt BARO.Press

This command will plot altitude versus pressure readings, allowing you to assess any anomalies in the barometric data. Look for irregular patterns that deviate from expected behavior.

Key Takeaway: Utilize MAVExplorer for detailed analysis of barometric data anomalies and to visually assess the relationship between altitude and pressure.

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

  1. Loose or Damaged Connections: Poor electrical connections can lead to intermittent data loss, causing glitches. Check wiring and connectors for damage.
  2. Environmental Factors: Rapid changes in temperature or pressure can affect sensor readings. Ensure the barometer is shielded from direct sunlight and wind.
  3. Firmware Issues: Sometimes, bugs or inconsistencies in firmware can lead to incorrect barometer readings. Ensure your firmware is updated to the latest stable version.
  4. Faulty Barometer Hardware: If the barometer itself is malfunctioning due to wear or damage, it may require replacement. Test with a known good unit if possible.
  5. Parameter Misconfiguration: Incorrect settings in the flight controller parameters can affect barometer performance. Review and adjust parameters as needed.
Key Takeaway: Understanding the common causes of BARO glitches helps you focus troubleshooting efforts on the most likely culprits.

Fixes for BARO Glitches

  1. SIM_BARO_GLITCH = 0: Disable the simulation of barometer glitches during testing.
  2. SIM_BAR2_GLITCH = 0: Adjust secondary barometer parameters if using dual barometers.
  3. Inspect wiring: Ensure all connections to the barometer are secure and undamaged.
  4. Update firmware: Install the latest version of ArduPilot that may contain fixes for known barometer issues.
  5. Replace the barometer: If the hardware is faulty, consider replacing it with a new unit.
Key Takeaway: Implement these specific fixes to resolve BARO glitches and restore reliable altitude readings.

When This Isn't Actually a BARO Glitch

  • Erroneous GPS readings: Sometimes, GPS glitches can be mistaken for barometer issues.
  • Unexpected throttle behavior: Throttle loss events can cause altitude changes that may mimic BARO glitches.
  • Electrical noise: Interference from other components can affect sensor readings, leading to false positives.
Key Takeaway: Distinguishing BARO glitches from other issues is crucial for accurate diagnosis and troubleshooting.

When LogHat Helps — and When It Doesn't

LogHat excels in identifying and analyzing specific log messages related to BARO glitches, providing detailed insights into your flight performance. However, it cannot directly diagnose hardware failures or physical connections, which require manual inspection. Use LogHat as a complement to your troubleshooting process, but remember to check your physical setup as well.

Key Takeaway: LogHat is a powerful tool for log analysis, but ensure to also investigate hardware aspects when diagnosing BARO glitches.
What are BARO glitches?

BARO glitches are anomalies in barometric data that can affect drone stability and altitude accuracy, leading to erratic flight behavior.

How can I fix BARO glitches?

Fixing BARO glitches typically involves checking sensor connections, adjusting parameters like SIM_BARO_GLITCH, and ensuring firmware is up to date.

What symptoms indicate a BARO glitch?

Symptoms include erratic altitude readings, unexpected changes in flight behavior, and logs showing Subsys=18 ECode=2.

How do I confirm a BARO glitch in Mission Planner?

In Mission Planner, navigate to Flight DataDataFlash LogsReview a Log, and plot fields like BARO.Alt and BARO.Press.

Can environmental factors cause BARO glitches?

Yes, rapid temperature or pressure changes can affect barometer readings, contributing to glitches.

If you found this information helpful, consider exploring our other resources at LogHat for in-depth analysis and troubleshooting techniques. Understanding your drone's performance through log data is vital for safe and effective operation.

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 engineeringlog analysistroubleshooting

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