
Diagnosing BARO Glitch Events Using ArduPilot .BIN Logs
Key Takeaway
Diagnosing BARO glitch events can be achieved using ArduPilot .BIN logs.
TL;DR: If you encounter ERR Subsys=18 ECode=2 in your ArduPilot logs, it indicates a barometer glitch event impacting altitude readings. To address this, consider adjusting the COMPASS_USE parameter or improving the barometer's mounting to reduce interference.
What BARO Glitch Events Actually Are in the Log
BARO glitches are recorded in ArduPilot logs when the barometric sensor experiences interference or malfunction, leading to inaccurate altitude data. The relevant log message for these events is the ERR log, specifically showing the subsystem and error code.
ERR Subsys ECode Description
Subsys=18: Indicates the barometer subsystem.ECode=2: Represents a barometer glitch detected.TIME: Timestamp of the error occurrence.ALT: Reported altitude at the time of the glitch.PRESS: Barometric pressure reading associated with the event.
Confirming It in Mission Planner
To confirm BARO glitch events using Mission Planner, follow these steps:
- Open Mission Planner and navigate to Flight Data.
- Select the DataFlash Logs tab.
- Click on Review a Log to load your flight log.
- In the log review, focus on plotting
ALTfrom theCTUNmessage againstBARO.Alt.
This will allow you to visually inspect discrepancies in altitude readings due to barometer glitches. Look for sudden spikes or drops in altitude that don't correlate with the vehicle's actual movement.
Confirming It in MAVExplorer
Using MAVExplorer, you can further analyze the log data for BARO glitches. You can use the following command to graph the relevant fields:
MAV> graph BARO.Alt CTUN.Alt
This command plots the altitude data from both the barometer and the altitude controller. Discrepancies between these two readings can indicate a BARO glitch, especially if the BARO.Alt shows erratic behavior while CTUN.Alt is steady.
Why BARO Glitches Happen — Ranked by What We See Most Often
- Prop Wash: Propeller-induced turbulence can create sudden pressure changes that the barometer cannot accurately interpret, leading to spikes in altitude readings. This is common during aggressive maneuvers.
- Environmental Factors: Sudden wind gusts or rapid changes in temperature can affect barometric pressure, causing inaccurate readings. Monitoring local weather conditions can provide insight into these events.
- Improper Mounting: If the barometer is not securely mounted or is placed in a location with airflow disturbances (e.g., near motors), it can lead to erratic readings. Ensuring proper placement can mitigate this risk.
- Sensor Malfunction: Physical damage or wear over time can cause the barometric sensor to malfunction, leading to glitches. Regular checks on sensor integrity and calibration can help identify issues early.
- Firmware Bugs: Occasionally, firmware updates may introduce bugs affecting sensor readings. Staying updated with the latest firmware releases and reviewing change logs can prevent this.
Fixes for BARO Glitch Events
- Ensure the barometer is mounted securely and away from turbulent airflow. Check the physical placement and consider using foam covers to minimize interference.
- Adjust the
COMPASS_USEparameter to reduce sensor interference. Setting this correctly can help the autopilot ignore erroneous readings. - Consider upgrading to a higher quality barometer if persistent issues occur. Some sensors handle environmental changes better than others.
- Regularly calibrate the barometer and ensure it is functioning correctly by comparing its readings against known altitudes.
- Monitor the prop wash effects during flight and adjust your flight maneuvers accordingly to minimize sudden altitude changes.
When This Isn't Actually a BARO Glitch
- Erratic GPS readings: These can show similar symptoms but will be recorded in the
GPSlog messages, not as a barometer error. - Vibration Issues: High vibration levels logged in
VIBEmessages could also lead to erroneous altitude readings but are not directly caused by the barometer. - Electrical Interference: If other sensors show erratic behavior simultaneously, it may indicate a broader electrical issue rather than a specific BARO glitch.
When LogHat Helps — and When It Doesn't
LogHat excels at analyzing flight logs and identifying BARO glitch events by providing clear visualizations and summaries of log data. However, it cannot diagnose physical sensor issues or mounting problems, which require hands-on inspection and adjustment. LogHat offers insights based on logged data but cannot replace thorough hardware checks.
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