Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Developer-MR01 opened this issue May 15, 2024 · 9 comments
Open

Comments

@Developer-MR01
Copy link

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 (dd91a87)
GCC-10.3.1 20210824 (release)

@MrD-RC
Copy link
Collaborator

MrD-RC commented May 16, 2024

Is the baro covered with open cell foam?

@breadoven
Copy link
Collaborator

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.

@Developer-MR01
Copy link
Author

Developer-MR01 commented May 16, 2024

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.

@breadoven
Copy link
Collaborator

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.

@Developer-MR01
Copy link
Author

Developer-MR01 commented May 16, 2024

same like before...

1

11

@breadoven
Copy link
Collaborator

same like before...

image

image

Is this armed or disarmed though ?

@Developer-MR01
Copy link
Author

Developer-MR01 commented May 16, 2024

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

@breadoven
Copy link
Collaborator

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.

@Developer-MR01
Copy link
Author

Developer-MR01 commented May 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants