inav icon indicating copy to clipboard operation
inav copied to clipboard

[3.0-RC1] AHI does not respect fw_level_pitch_trim

Open b14ckyy opened this issue 4 years ago • 1 comments

Current Behavior

If fw_level_pitch_trim is set at a certain value to maintain level flight in self level modes, the AHI will still follow the RAW sensor value. This leads to an AHI offset in level flight.

Steps to Reproduce

  1. Place the aircraft on the bench to set sensor value for pitch close to 0°
  2. watch the OSD on a monitor or goggles
  3. Go to PID tuning > Mechanics and set fw_level_pitch_trim to a value like 10°
  4. check the AHI on the fpv feed. AHI stays aligned on the crosshair
  5. If the plane flies now level, the AHI will be 10° below the crosshair implying a climb
  6. the same applies form the pitch angle value item on the OSD that also still shows the raw sensor value and not relative to fw_level_pitch_trim

Expected behavior

fw_level_pitch_trim should be considered to indicate level flight and actual pitch angle in any case.

Suggested solution(s)

respect fw_level_pitch_trim for pitch angle indication on OSD and logs.

Additional context


  • FC Board name and vendor: Matek F411-WSE
  • INAV version string: INAV/MATEKF411SE 3.0.0 May 15 2021 / 17:01:46 (7b6a37a3)

b14ckyy avatar May 20 '21 10:05 b14ckyy

I propose to just add pidProfile()->fixedWingLevelTrim degrees to the pitch angle in the AHI OSD element, and perhaps also the pitch angle element.

avsaase avatar May 21 '21 10:05 avsaase

I think that was fixed somewhere down the line.

b14ckyy avatar Mar 20 '24 17:03 b14ckyy