
Diagnosing BARO Glitch Events in ArduPilot .bin Logs
Key Takeaway
To diagnose BARO glitch events, analyze ArduPilot .bin logs for anomalies.
TL;DR: To diagnose ERR Subsys=19 ECode=2 indicating a barometer glitch, check your GPS.HDOP values; values above 2.0 suggest interference and should be investigated. Proper shielding and adjusting parameters like EK3_ALT_M_NSE can help resolve these issues.
Diagnosing BARO glitches is essential for ensuring flight stability and performance in ArduPilot. These glitches can lead to erroneous altitude readings, which may cause unexpected behavior in your drone. Understanding how to identify and resolve these issues can enhance your troubleshooting efforts and improve overall flight safety.
What is a BARO Glitch in the Log?
A BARO glitch event occurs when the barometer provides inaccurate altitude readings, which can severely impact flight stability. In ArduPilot logs, these events are associated with the error subsystem for the barometer. The relevant log message is:
ERR Subsys=19 ECode=2
TimeUS: Timestamp of the log entry.Subsys: Indicates the subsystem logging the error (19 for barometer).ECode: The specific error code (2 for barometer glitch).Press: The pressure reading at the time of the glitch.Alt: The altitude reading at the time of the glitch.
Confirming BARO Glitches in Mission Planner
To confirm BARO glitches in Mission Planner, follow these steps:
- Open the Flight Data tab.
- Select DataFlash Logs from the sidebar.
- Click on Review a Log and choose the relevant log file.
Once the log is loaded, plot the following fields together:
BARO.Alt— to see altitude readings.ERR.Subsys— to identify error events.GPS.HDOP— to check the horizontal dilution of precision.
Confirming BARO Glitches in MAVExplorer
You can use MAVExplorer to analyze your logs more effectively. Here’s a command to plot relevant data:
MAV> graph BARO.Alt ERR.Subsys
This command will help you visualize the altitude readings alongside any error events logged during the flight. Look for correlations between high ERR.Subsys values and sudden changes in altitude.
Why BARO Glitches Happen — Ranked by Frequency
- Prop Wash Interference: Rapid changes in air pressure around the drone can cause momentary spikes in barometric readings. This often occurs during aggressive maneuvers.
- Wind Gust Effects: Sudden wind gusts can create abrupt changes in pressure, leading to inaccurate altitude readings.
- Improper Shielding: If the barometer is not adequately shielded from environmental factors, it can pick up noise from vibrations or nearby components.
- Incorrect Calibration: If the barometer is not calibrated correctly, it can result in faulty altitude data, leading to glitch events.
- Software Issues: Occasionally, bugs in the firmware can lead to erratic readings from the barometer.
Resolving BARO Glitch Issues
- Implement proper shielding for the barometer to protect it from vibrations and airflow disturbances.
- Adjust the following parameter in ArduPilot:
EK3_ALT_M_NSE = 1.0to enhance altitude noise estimation. - Ensure that the barometer is installed in a location within the frame that minimizes exposure to rapid changes in pressure.
- Check and perform calibration of the barometer before each flight to ensure accurate readings.
- If persistent glitches occur, consider updating to the latest firmware version, which may contain bug fixes related to sensor readings.
When This Isn't Actually a BARO Glitch
ERR Subsys=19indicates a CPU issue, not related to BARO glitches.- High values of
GPS.HDOPalone do not imply a BARO glitch; they indicate poor GPS signal quality. - Normal fluctuations in altitude readings during flight can occur without indicating a BARO issue; assess surrounding conditions.
- Unexpected behavior in flight modes may relate to other sensor errors, not necessarily the barometer.
When LogHat Helps — and When It Doesn't
LogHat excels at analyzing flight logs for error events and visualizing sensor data trends, helping us identify BARO glitches quickly. However, it doesn't resolve hardware issues or guarantee that the barometer will function correctly after identifying a glitch. Hardware inspections and adjustments are still necessary for effective troubleshooting.
What are BARO glitch events?
BARO glitch events occur when the barometer provides inaccurate altitude readings, which can significantly impact flight stability and performance.
How can I prevent BARO glitches?
To prevent BARO glitches, use proper shielding for the barometer and adjust flight parameters as needed to reduce the impact of environmental factors.
What should I check in my logs to diagnose BARO issues?
Check the ERR.Subsys field for barometer errors and GPS.HDOP values to assess signal quality and potential interference.
How does wind affect barometer readings?
Wind gusts can create rapid changes in air pressure, causing inaccurate altitude readings from the barometer, leading to glitch events.
What parameters should I adjust to improve barometer performance?
Consider adjusting EK3_ALT_M_NSE to better estimate altitude noise and protect the barometer from environmental factors.
Can software bugs cause BARO glitches?
Yes, software bugs in the firmware can lead to erratic readings from the barometer, which may be logged as glitch events.
Is calibration important for barometer accuracy?
Yes, proper calibration of the barometer is crucial for ensuring accurate altitude readings and preventing glitch events.
If you encounter persistent BARO glitch events or need assistance with advanced log analysis, consider using LogHat to gain deeper insights into your flight data.
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