inav icon indicating copy to clipboard operation
inav copied to clipboard

Wrong Altitude Calculation Aocoda-RC F405 40A AIO DPS310 / SPL06

Open Developer-MR01 opened this issue 1 year ago • 9 comments
trafficstars

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)

Unbenannt

Steps to Reproduce

  1. default setup FC: Multirotor 3inch
  2. select "AUTO" @ Barometer > Result: SPL06
  3. calibrate ACCs
  4. final Reboot before starting the test
  5. place the Drone on the floor
  6. powerOn and wait for "ready to arm"
  7. connect to INAV and start "Sensors" > Barometer
  8. put the drone up to the desktop or a board (about 1m up)
  9. test with and without arm > negativ results
  10. 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)

Developer-MR01 avatar May 15 '24 21:05 Developer-MR01

Is the baro covered with open cell foam?

MrD-RC avatar May 16 '24 05:05 MrD-RC

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.

breadoven avatar May 16 '24 08:05 breadoven

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

wo_gps

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

wo_gps_armed

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

with_gps

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

with_gps_armed

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.

Developer-MR01 avatar May 16 '24 09:05 Developer-MR01

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.

breadoven avatar May 16 '24 09:05 breadoven

same like before...

1

11

Developer-MR01 avatar May 16 '24 10:05 Developer-MR01

same like before...

image

image

Is this armed or disarmed though ?

breadoven avatar May 16 '24 10:05 breadoven

The first test was disarmed with GPS.

with armed same result:

2

correction: Now the altitude is also calculated without GPS, but again with the same effect

Disarmed, without GPS:

3

...and armed without GPS:

4

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

Developer-MR01 avatar May 16 '24 10:05 Developer-MR01

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.

breadoven avatar May 16 '24 12:05 breadoven

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).

Developer-MR01 avatar May 16 '24 12:05 Developer-MR01