-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
inav7.1.1 with optflow senser(micoair MTF-01) can't hold altitude on althold mode #10025
Comments
What do you have max_surface_altitude set to? |
|
I can't help but think there's something not quite right with the nav altitude estimations. I had problems the other day with Poshold (no surface) with it sinking to the ground even after you'd added a lot of extra throttle, wasn't stable at all. The log showed navPos[2] and navVel[2] moving in opposite directions for way too long, i.e. Pos increasing whilst Vel was -ve and vice versa, which makes no sense. In fact navVel[2] was indicating a consistent climb of almost 1m/s even before arming according to the OSD DVR. The following screenshot from Test2 above shows navPos[2] really doesn't align well with the baro altitude or the raw rangefinder reading, they both indicate a climb but navPos[2] barely increases at all. In fact the Rangefinder drops out with navPos[2] still only reading a little over a meter. In the next screenshot from the same test navPos[2] suddenly shoots up from 3.4m to over 6m in 0.2s even though the max navVel[2] was only 1.3 m/s. The baro barely changes when this happens. This looks pretty odd. There doesn't appear to be any issue with vibration either to explain this. |
Okay so you have it set to ignore the rangefinder above 2 meters. If you want to fly 3-4 meters above the ground, you may want to allow the rangefinder to work at that altitude. Perhaps set that to about 600 or 650. |
@KONG8691 Try setting |
I had try this setting,it is not work |
So I think I found the problem in the althold when using the rangefinder in the latest INAV firmware.
Then, in the
I'm not an INAV developer and I'm not used to this repo but I'll probably make a PR later on with the changes I made to solve this issue. 🙂 |
Take a look at the end of this #10308 PR where I explain how the dynamic accelerometer weight just messes up altitude estimations in some quads |
Current Behavior
blackbox_log_2024-05-12_214254.TXT
test1.TXT
test2.txt
the drone hover above 3-4 meters, when i switch on altthold mode ,the drone decrease altitude until it almost touch the ground,and it throttles up and increases altitude to 6-7meter, and than decrease slowly.
I check the blackbox file ,when I switch on althold mode, navTgtPos is set 0.63m, when I switch off althold mode ,navTgtPos is set at real altitude.
the drone hover above 17-18 meters,althold mode works will.
when the drone is auto landing on rth mode,it decrease altitude to 17 meters,and it hover and do not land continuously.
Steps to Reproduce
1.hover above 3-4 meters
2.swith on angle/nav poshold/nav althold/heading hold/surface mode
Expected behavior
the drone can hover smoothly
Suggested solution(s)
Additional context
INAV_7.1.1_cli_ERDOG_10_20240513_001143.txt
INAV/HAKRCF722V2 7.1.1 May 6 2024 / 11:32:50 (dd91a87)
GCC-10.3.1 20210824 (release)
The text was updated successfully, but these errors were encountered: