inav
inav copied to clipboard
Wrong Altitude Calculation Aocoda-RC F405 40A AIO DPS310 / SPL06
Current Behavior
- There is no constant altitude level > altitude-value fades up/down and finaly back to the value before.
- The baro counting-step is about "8" (I´m not sure if it´s an issue)
Steps to Reproduce
- default setup FC: Multirotor 3inch
- select "AUTO" @ Barometer > Result: SPL06
- calibrate ACCs
- final Reboot before starting the test
- place the Drone on the floor
- powerOn and wait for "ready to arm"
- connect to INAV and start "Sensors" > Barometer
- put the drone up to the desktop or a board (about 1m up)
- test with and without arm > negativ results
- test with Releases 6.xx up to 7.11 > negativ results
Expected behavior
constant altitude level
Suggested solution(s)
Additional context
INAV/AOCODARCF405AIO 7.1.1 May 6 2024 / 10:54:34 (dd91a871) GCC-10.3.1 20210824 (release)
Is the baro covered with open cell foam?
When disarmed the Altitude should remain around 0 regardless of height changes of the drone itself. However, when Armed altitude should follow and hold the height changes of the drone ... which it does when I tested just now.
When disarmed the Altitude should remain around 0 regardless of height changes of the drone itself. However, when Armed altitude should follow and hold the height changes of the drone ... which it does when I tested just now.
the test cases again:
ACC calibration completed Inductive interference (cable) excluded (less noise @ ACCs)
Test Case 1 (without GPS in Config, Port disabeld) Drone placed on the ground Drone connected to battery Drone NOT armed Drone lifted to 2m height (by hand)
no Altitude value
Test Case 2 (without GPS Config, Port disabled) Drone placed on the ground Drone connected to battery Drone armed Drone lifted to 2m height (by hand)
Pressure changes after arming (first negativ pressure peak) no Altitude value
Test Case 3 (with GPS) Drone placed on the ground GPS configured and connected Drone shot at battery Drone NOT armed Drone lifted to 2m height (by hand)
Altitude goes back to original value or is fading
Test Case 4 (with GPS) Drone placed on the ground GPS configured and connected Drone connected to battery Drone armed Drone lifted to 2m altitude (by hand)
Pressure changes after arming (first negativ pressure peak) Altitude is fading Note: Scaling has changed due to the large altitude value
It seems that only the GPS value is used for the altitude calculation. If the GPS is switched off, the altitude value remains at 0
I think that the negative pressure offset after arming is caused by the propellers next to the ground - if the drone moves away from the ground, this is correct again - the same effect again after placement at a altitude of 2m on a board.
I assume you're using version 7.1.1. If so there's a bug that disables the Baro if inav_use_gps_no_baro is set to ON (default setting). Setting to OFF will enable the Baro.
same like before...
same like before...
Is this armed or disarmed though ?
The first test was disarmed with GPS.
with armed same result:
correction: Now the altitude is also calculated without GPS, but again with the same effect
Disarmed, without GPS:
...and armed without GPS:
It seems that the current altitude value is the differential function (with LP) of the pressure function? At first the altitude is determined correctly, but then drops back to 0 over time
Nav altitude is calculated from a weighted average of Baro and GPS altitudes + an acceleration factor. More weighting is applied to the Baro than the GPS which is why when armed the altitude is much less -ve with the Baro working than just the GPS alone (GPS altitude is just inaccurate compared to the Baro especially when it's only just got a lock with few satellites which is why you were getting -22m). Nav altitude will not just follow the Baro altitude, it's not as simple as that.
It looks to be working as expected, altitude zeroed when disarmed and reacting to height changes when armed.
I will test it again in the open field today... fyi: during the tests at a altitude of 2m, the drone was armed the whole time. The drop in altitude did occur in armed status.
Update: I did an open field test within climbing to an Altitude of approx. 30m. The same issue here too. The altitude Value increases up and then drops back to 0m. (14 GPS SATs, sunny weather conditions).

