inav icon indicating copy to clipboard operation
inav copied to clipboard

VSpd telemetry error accumulates in flight

Open dingrgh opened this issue 9 months ago • 8 comments

Current Behavior

Platform: iNav FC mounted in a motor glider. VSpd telemetry parameter accumulates an error with a offset of up to +2m/s after about 30 minutes in the air. At the start of the flight, there is zero error. At the end of the flight, with the aircraft sitting on the ground, telemetry shows it is still climbing. This error is also noticeable in flight if the vario tones are enabled (i.e. a climb indicated when the glider is actually descending). Screenshot 2024-04-28 at 3 36 51 PM

Steps to Reproduce

  1. Arm. Launch and fly.
  2. After about, say, 30 minutes in the air, land.
  3. Check VSpd telemetry with the aircraft sitting on the ground to observe the offset.
  4. Confirm that the Alt telemetry figure is correct (i.e. not changing).

Expected behavior

At the end of the flight, the VSPD telemetry should show zero m/s when sitting stationary on the ground.

Suggested solution(s)

The error was probably introduced in code changes for barometric and GPS alt.

Additional context

This VSpd error only started after I updated from iNav 6.0 to iNav 7.1.0. iNav Dump: (https://pastebin.com/7ZSPq3p6)


  • FC Board name and vendor: Matek F405-WSE
  • INAV version string: INAV/MATEKF405SE 7.1.0 Mar 27 2024 / 13:52:59 (59a6ee61)

dingrgh avatar Apr 28 '24 20:04 dingrgh

I did more flights with iNav 7.1.0 to confirm that the problem was repeatable. I even tried setting CLI parameter inav_w_z_gps_v to zero (default is 0.1) to remove all dependence on GPS vertical speed but it did not fix the problem.

I downgraded the firmware to iNav 7.0.0 and can confirm that the problem went away. I can only conclude that some change to the Vertical Speed code from 7.0.0 to 7.1.0 is causing the problem.

Summary: Rolling back to iNav 7.0.0 is a workaround for this issue.

dingrgh avatar May 02 '24 22:05 dingrgh

Hey, I had similar problems. The Baro was no longer used for altitude and vario. The default setting for “inav_use_gps_no_baro” has been changed from OFF to ON. After the CLI command “set inav_use_gps_no_baro = OFF” it works perfectly again. I hope this will solve your problem too.

Frank0587 avatar May 12 '24 08:05 Frank0587

Hey, I had similar problems. The Baro was no longer used for altitude and vario. The default setting for “inav_use_gps_no_baro” has been changed from OFF to ON. After the CLI command “set inav_use_gps_no_baro = OFF” it works perfectly again. I hope this will solve your problem too.

I will try this and report back in a week or so...

dingrgh avatar May 14 '24 13:05 dingrgh

The VSpd issue may be related to #10040.

dingrgh avatar May 15 '24 20:05 dingrgh

The VSpd issue may be related to #10040.

I created #100400 based partly on reading this and finding out that inav_use_gps_no_baro doesn't do what some thought it did. It does exactly what the name says - it uses the GPS and not the baro.

Suggest turning off inav_use_gps_no_baro.

sensei-hacker avatar May 15 '24 20:05 sensei-hacker

I have done several flights (iNav 7.1.1) with “inav_use_gps_no_baro” set to OFF. Unfortunately, the VSpd residual offset problem is still present.

So the problem is not likely to be related to #10040 but is a result of something that was changed in the Z velocity position estimator code between iNav 7.0.0 and iNav 7.1.x.

To be clear, there is no problem observed with the altitude telemetry. Only the VSpd telemetry.

dingrgh avatar May 17 '24 19:05 dingrgh

Update: Workaround found...

Version: iNav 7.1.1

Things I tried that didn't solve the problem:

  • Setting "inav_use_gps_no_baro" to OFF.
  • Setting "inav_w_z_gps_v" to zero (default was 0.1) in an attempt to remove all GPS vertical speed weighting
  • Setting "inav_w_z_baro_p" to 2.0 (default was 0.35) in an attempt to increase weighting of baro altitude.

What worked finally:

  • I kept the above three changes and also changed "inav_w_z_gps_p" to zero (default was 0.2) to remove all GPS altitude weight. The VSpd telemetry now shows zero after landing (other than the expected small blips plus or minus 0.1m/s due to baro noise) while sitting stationary on the ground.

As mentioned in a previous post, rolling back to iNav 7.0.0 (without the changes above) also works around the problem.

Clearly, the problem introduced by code changes in iNav 7.1.0 will have to be fixed as I suspect it will affect other navigation functions in some annoying, hard-to-pinpoint way.

dingrgh avatar May 26 '24 23:05 dingrgh

Problem is still not fixed in latest iNav 7.1.2

VARIO shows +2 ft/sec accumulated upon landing after ~30min flying.
This is what I've tried.

  • inav_use_gps_no_baro = OFF
  • inav_w_z_gps_v = 0

I have not tried inav_w_z_gps_p = 0 as I want the GPS to correct any ALT drift of the BARO

It's interesting the ELRS telemetry docs specify two different VARIO packets for GPS and BARO, from which one might infer the VARIO types should not be blended https://github.com/crsf-wg/crsf/wiki/CRSF_FRAMETYPE_BARO_ALTITUDE

Use this telemetry type for barometer-based variometers to include altitude and vertical speed in a single packet. GPS-based variometers should use the CRSF_FRAMETYPE_GPS and CRSF_FRAMETYPE_VARIO packets separately.

HW: Speedybee F405 Wing FW: iNav 7.1.2 LNK: ELRS 3.4.3

silicongarage avatar Jul 10 '24 19:07 silicongarage