iNavFlight / OpenTX-Telemetry-Widget

INAV Lua Telemetry with support for EdgeTX
https://luatelemetry.readthedocs.io/en/latest/
GNU General Public License v3.0
156 stars 32 forks source link

Reversed Roll in attitude indicator (artificial horizon) Graphic #131

Closed packetkiller closed 6 months ago

packetkiller commented 6 months ago

Describe the bug

The iNAV Telemetry Widget is displaying the attitude indicator graphic roll in reverse (left roll is right roll and right roll is left roll).

TX = RadioMaster TX16S TX Firmware = 6.17 EdgeTX ver = 2.9.3 "Providence" RX = TBS Crossfire Diversity Nano RX Firmware = 6.17 Telemetry Protocol = Crossfire Flight Controller = MaTekSys H743-WING V3 FC Firmware = iNAV 7.0.1

To reproduce

  1. Turn on all electronics (TX, VRX, Battery connected to aircraft)
  2. While looking at the aircraft from the rear (the aircraft pointing away from you in the direction it would normally fly), lower the left wing (simulate a left roll).
  3. Look at the iNAV Telemetry Widget on the TX and notice the roll graphic depicts a right roll.
  4. Repeat for right roll.
  5. Again, look at iNAV Telemetry Widget on the TX and notice the roll graphic depicts a left roll. Note, all telemetry data indicates good values with the exception of the reversed roll attitude indicator graphic.

Expected behavior

An aircraft left roll is expected to show a left roll in the iNAV Telemetry Widget. Same for right roll.

Screenshots

See attached zip for left and right roll with iNAV Telemetry Widget showing reverse roll in attitude indicator graphic.

Radio and model settings

The model name is OptiAR1. Note: the other model using the same TX (a quadcopter) displays correctly in the iNAV Widget. Attached is the .dat and EdgeTX .etx settings backup files.

Additional context

Also provided is a copy of the iNAV config settings for OptiAR1. Of note may be the orientation of the FC and GPS. (FC trned 90 degrees in aircraft and GPS is turned 180 degrees in aircraft)

bug_report_2024-02-14_19-17-26.zip

stronnag commented 6 months ago

The widget is an AHI; the behaviour is correct.

packetkiller commented 6 months ago

The widget is an AHI; the behaviour is correct.

What does that mean? So why does the roll display correctly with the quadcopter model but reverse on the flying wing?

packetkiller commented 6 months ago

The widget is an AHI; the behaviour is correct.

Are you saying, after launch, the banking will switch and look like the pilots cockpit view (the way I am expecting it to look)?

stronnag commented 6 months ago

The widget reports the data supplied by the radio, it has no knowledge of the platform or the FC configuration.

stronnag commented 6 months ago

If you still think there is a problem with the Lua widget, please supply ETX logs and corresponding Blackbox logs that illustrate the alleged bug, with a reference to the timestamp of the data that is not displayed correctly.

packetkiller commented 4 months ago

Here is the flight controller log. FC_LOGS.zip

packetkiller commented 4 months ago

Here is the TX EdgeTX log. TX_LOGS_Opticopter2-2024-04-15-134032.zip

packetkiller commented 4 months ago

Here is an image of the quad showing orientation of the GPS. I am holding up same make/model next to the attached one so you see its orientation. 20240415_130059

packetkiller commented 4 months ago

Since the upgrade to iNAV 7.1.0, this now is affecting all models. The logs are from the shown quad but this also affects other fixed wing aircraft. Here is the "diff all" iNAV config file. INAV_7.1.0_cli_OPTICOPTER2_diff_20240415_112656.txt

packetkiller commented 4 months ago

The firmware installed on the flight controller is "inav_7.1.0_MATEKH743.hex" and was obtained via the latest stable in the git repo.

packetkiller commented 4 months ago

The quad and other models fly as expected. I am looking for some proof of where the issue lies (FC firmware, iNAV config, EdgeTX config, or iNAV Widget). The timestamp of the issue is in the logs as it happens all the time and is consistent. Seems to be off 180 degree. As far as I can tell, it looks fine in iNAV and EdgeTX otherwise. Here is video of the issue so you can see what is going on. Keep in mind, this was working just a version ago with iNAV 7.0.1 on the quad and EdgeTX 2.9 on TX. PICT0001a_edit.zip

packetkiller commented 4 months ago

Since this issue has grown to additional models, I will attempt to obtain logs from the fixed wing I started this issue with. It may take me a few days...

sensei-hacker commented 4 months ago

For anyone else who later has the same question, here's what was explained to @packetkiller on Discord:

The title of this issue shows the confusion. An attitude indicator is not an artificial horizon - they will appear opposite.

This aircraft is turning RIGHT.

horizon

attitude

mmosca commented 4 months ago

Aircraft banking right:

image

packetkiller commented 4 months ago

Thank you all who provided the above detail showing the expected behavior. I have been able to determine from this that the issue was a bug in the firmware (v7.0.1) for the Matek H743-WING and my particular configuration (FC turned 90 degree). This same firmware is also used for a different model FC (Lumenier LUX H743 HD) in another model that operates as described above (no issue). This seems to indicate a hardware specific setting. This has been corrected in the v7.1.0 firmware release for both models and no longer seems to be an issue. Again, thank you for the response, as it was what was needed in order to identify the root cause of the issue. Hope this helps others who may see these types of issues in the future.