Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Bad altitude hold behavior in 2.2 #4878
I updated my S800 wing to inav 2.2 a few days ago. While testing the nav modes, I noticed that 3D cruise and loiter (with alt hold) were oscillating heavily.
This plane and all it's althold modes worked perfectly in inav 2.1, so I decided to reflash 2.1 to confirm that and do some testing.
Sadly I'm unable to provide blackbox logs as my target (matekf405 servo6) does not appear to support it, although the fc has an sd card slot.
TLDR: vario reading are inaccurate, 3d cruise and loiter is ok in 2.1, but got worse in 2.2
The board alignment is the same both my 2.1 and 2.2 setup. It may not be 100% perfect, but since it is equal in both versions, it doesn't explain the difference.
I did autotune the 2.2 setup, but the resulting PIDs did not make sense. It set P for both pitch and roll to 0 and 1 respectively, so I reverted back to using the defaults. All videos were made on stock PIDs.
I'll try disabling either gps and baro next time I'm out flying, see if the behaviour changes.
My main concern is that the vario and altitude are apparently not linked together/get their data from the same source. I tried figuring it out in code, but I'm not familiar enough with the code base. The vario showing -10m/s while the osd altitude increases is never a valid scenario...
I updated to 2.2.1 today for some more testing.
First I double checked some things. Switching from acro to manual goes smoothly, so mechanically the plane is set up well. In angle mode the plane flies level and depending on the last maneuver goes up or down at about 2m/s, so the board alignment is setup correctly as well.
Then I disabled the baro on the configuration tab to see how 3d cruise and the variometer would behave purely on GPS info. As expected, GPS data is not fast enough to get good flight behaviour, but at least the reported altitude and the vario tell the same story (no more of that -10m/s vario when the altitude is increasing).
Next I tried enabling the baro again and setting the inav_w_z_..._p to 1 for baro and 0 gps. This resulted in a much smaller oscillation (about 3 meter variance; totally acceptable), but the throttle still annoying me because it oscillates between 35 an 50%. This is a very loud wing so it is very noticeable.
I decided to set the throttle_to_pitch setting to stop the throttle oscillation (still only using baro data, no gps). This again resulted in about a 10 meter height oscillation. Enough of a nosedive to make it uncomfortable over water 1km out so I switched to angle and called it a day.
After returning home I noticed I did my autotune session after these tests, so I guess I'll have to retest this on the new tune but I wanted to update this issue anyway in case it triggers some new insights.
It also seems I am the only one having these issues (or at least reporting on it) so I may just have a damaged GPS or flight controller? Or maybe a lot of people haven't updated to 2.2.x yet?
What do you think, should I swap out the GPS for a new one, or go straight with a new FC and GPS, or keep trying to figure this out?
I'm afraid I cannot provide logs, the blackbox tab says "Your flight controller's firmware does not support Blackbox logging.". It seems I'm not the only matek user with that issue: #4904