Quadcopter altitude problem

Hello. I have built a new board and am currently testing it. The problem I am experiencing during flight is that when flying in altitude hold mode, the altitude drops when moving to the left. I am using an MS5611 as the internal barometer and a BMP581 integrated into the GPS module as the external barometer. I have tried switching the barometer priority between internal and external, but the result is the same. What I find most strange is that the altitude drops only when moving to the left. I was unable to save the logs due to an issue with my SD card, but I do have the tlog. Has anyone else experienced this problem?

2026-03-31 20-03-29.tlog (315.5 KB)

This is a common issue. Caused by barometer exposure to airflow.

Search this forum for “barometer foam” and you will get some answers.

I’ve also experienced this and adding foam never solved the issue. In my case the entire flight controller is inside the hull of drone. Even tried pressure membranes and foam. Nothing worked except removing barometer from the height / altitude loop and only running on GPS.

Do you know what could be the issue?

Hi,

I took a look at your tlog and I think I can see what’s going on here. This looks like a classic barometric pressure interference from prop wash / aerodynamic effects (Bernoulli effect).

Here’s what the data shows during the left roll maneuvers (around t=111-115s into the flight):

  • Your MS5611 (internal) drops from ~1006.88 to 1006.15 hPa, that’s a 0.73 hPa swing, roughly equivalent to ~6m of phantom altitude gain
  • Your BMP581 (external, on the GPS module) drops even harder, from ~1009.95 to 1009.16 hPa, about 0.79 hPa or ~6.5m

So what happens is: both baros see a pressure drop during the roll, EKF interprets that as the vehicle climbing, AltHold reduces throttle to “correct” for it, and the actual altitude drops. That’s exactly the behavior you’re describing.

The reason switching baro priority doesn’t help is that both sensors are equally affected. The BMP581 on your GPS module is actually worse since it’s more exposed to airflow.

A few things I noticed in your parameters that I’d suggest looking at:

1. Wind Compensation Filter is off on both baros

BARO1_WCF_ENABLE = 0 BARO2_WCF_ENABLE = 0

This filter uses IMU data to compensate for exactly this kind of pressure disturbance during maneuvers. We’ve had similar issues on our builds and enabling WCF made a noticeable difference. It does require a calibration flight procedure though, so check the docs:

There’s also a Lua script that can automate the tuning process: Scripting Copter Wind Estimation/Baro Compensation Tuning

2. No harmonic notch filter

INS_HNTCH_ENABLE = 0

Your vibration levels during maneuvering go up to vib_z=17.4 which is on the high side. Setting up the notch filter should help the overall attitude and altitude estimation. Start with throttle-based mode since it’s the simplest to set up:

Managing Gyro Noise with the Dynamic Harmonic Notch Filters — Copter documentation Throttle Based Dynamic Notch Setup — Copter documentation

3. Foam over the baro port

If you haven’t already, covering the barometer port on the FC board with a piece of open-cell foam is the standard recommendation. Same goes for the GPS module if the BMP581 has an exposed port there. The MethodicConfigurator tuning guide has a good summary of this:

And the external barometer docs mention placement considerations: Barometer (external) — Copter documentation

4. BMP581 temperature

One more thing, your BMP581 is reading 30.8°C while the MS5611 is at 23.6°C. That’s a 7°C difference which seems high. Might be worth checking if the GPS module is sitting near something hot (ESC, video TX, etc.). Shouldn’t directly cause the left-roll issue, but temperature gradients can add drift.

The asymmetry (worse on left roll specifically) is most likely due to the physical placement of both sensors relative to the frame and motor positions. When you roll left, the airflow from certain motors hits both baro locations more directly than when rolling right.

I’d start with enabling WCF on both baros and adding foam. That alone might solve it. Let us know how it goes.

He could do baro temperature calibration to fix this temperature issue. I have not seen the log so it might have been done or not

I have tried the following methods:

  1. Barometer foam

This method had no effect.

  1. Wind direction correction filter

I cannot implement this method. I am building a general-purpose FC, not a specific airframe. I cannot tune it to fit a specific airframe.

  1. Applying a harmonic notch filter

I cannot implement this method either. I cannot do so for the same reasons mentioned above.

  1. Using only the internal barometer

The result is the same even when using only the internal barometer.

Currently, the altitude drops in all directions, not just in a specific direction.

I am attaching my flight log.

00000001.zip (567.2 KB)

I also a quadcopter and with notch filters, windspeed filters, barometer foam, my drone can hover very well, even with the infamous ms5607 barometer. Why cannot you implement these, atleast you can implement once for testing on your current vehicle/quadcopter/etc to see if it fixes the issue.

barometers use air pressure to calculate altitude. when you move, it is exposed to air and pressure increases and thus height reduces, causing the “altitude drop”.

Do as suggested by others, and use amc. atleast verify if it is caused by airflow.

Hi @ljj24680,

I took a look at your .bin log. Here’s what I found:

1. Barometric altitude is extremely noisy

Your CTUN.BAlt (raw barometer altitude) swings ±1.5 m during flight — from 0.93 to 3.30 m — while the EKF-filtered CTUN.Alt stays relatively smooth around 2.2 m. This means the EKF is doing its best to compensate, but the barometer input itself is heavily corrupted by prop wash / dynamic pressure changes when the frame tilts.

2. Only one barometer instance is detected

Despite having a BMP581 on your GPS module, BARO2_DEVID = 0 in the log — meaning ArduPilot doesn’t see it at all. So you’ve been flying on the internal MS5611 only. Please check:

  • BARO_PROBE_EXT — set to the correct bitmask for BMP581
  • BARO_EXT_BUS — set to the I2C bus number your GPS module is on (not -1)
  • Verify the BMP581 I2C address and wiring

3. BARO_FLTR_RNG is disabled

BARO_FLTR_RNG = 0 in your log. Try setting it to 2.0. This tells ArduPilot to filter out barometer readings that deviate more than the expected range, which helps reject prop wash spikes.

4. Harmonic notch is off

INS_HNTCH_ENABLE = 0. Even though you mentioned trying it, it’s disabled in this log. The notch filter primarily cleans up IMU (accelerometer/gyro) noise from motor vibrations, which indirectly improves EKF altitude estimation. I’d recommend enabling it — you can use the FFT-based setup to find the correct frequency.

5. Vibrations are borderline high

VIBE_Y peaks at 32.9 (recommended < 30). This feeds noisy accelerometer data into the EKF and makes altitude holding harder.

6. Barometer temperature is 38°C

This suggests the MS5611 may be near heat-generating components. Thermal drafts around the sensor also cause pressure reading errors.

Our assumption on root cause: Based on the log data, we suspect this is a barometer isolation problem — which is quite common on custom boards. If foam alone didn’t help, it’s possible that the barometer port is still exposed to dynamic pressure changes from prop wash when the frame tilts. A more effective approach might be a fully sealed pressure chamber around the barometer with only a small breather hole (ideally routed via silicone tubing to a calm area underneath the frame). The idea is to block fast dynamic pressure while still allowing slow static pressure equalization. That said, since you’re designing a general-purpose FC, you’d know the physical layout best — so this is just our best guess from what the log shows.

Summary of recommended changes:

  • BARO_FLTR_RNG = 2.0
  • Fix BARO2 detection (BARO_PROBE_EXT, BARO_EXT_BUS) so you have two baros for cross-checking
  • Build a proper sealed baro chamber with a breather tube
  • Enable INS_HNTCH via FFT setup
  • Address vibration source (soft-mount FC, balance props)
  • Thermally isolate the baro from hot components if possible

Hope this helps!

Rather than turning this into some big issue, why don’t you just finish tuning the drone? It’s mostly still on defaults.

Set:

PSC_ACCZ_I, 0.62
PSC_ACCZ_P, 0.32

Configure a notch filter.

Continue with the tune.

AMC has been linked in this thread. I also recommended you follow those instructions.