Skip to content
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

Change the way horizon line is drawned on OSD when banked to conform with aviation standards #25520

Open
dxs94 opened this issue Nov 12, 2023 · 3 comments

Comments

@dxs94
Copy link

dxs94 commented Nov 12, 2023

Feature request

Please note this is different from issue #24855 which was fixed in master.

Is your feature request related to a problem? Please describe.
When the aircraft is banked, the OSD artificial horizon line is not drawn the way it should be according to aviation standards. For example with 90° of bank, the OSD no longer gives any indication of current pitch attitude. The drawing is the same no matter if the nose is below, on, or above horizon. The 90° example is extreme but the drawing is always wrong when roll is not 0, as the indicated pitch value will reduce with increasing bank angle.

Describe the solution you'd like
Modify the way OSD horizon line is drawn.

Platform
[ ] All
[ ] AntennaTracker
[X] Copter
[X] Plane
[ ] Rover
[ ] Submarine

Additional context

When bank is close to 0 horizon line is correct:

Capture d'écran 2023-11-12 222048


Now at bank 90°, the OSD line is always the same. No way of knowing if aircraft nose is below, on, or above horizon.

Capture d'écran 2023-11-12 221942

Capture d'écran 2023-11-12 222443

Capture d'écran 2023-11-12 223550


When bank is not 0, the horizon line should be drawn sideways to give pitch information. Here is a model of how it should look like, during a roll with constant pitch attitude:

OSD roll depiction

@dxs94 dxs94 changed the title Change the way horizon line is drawned on OSD when banked at 90 degrees to conform with aviation standards Change the way horizon line is drawned on OSD when banked to conform with aviation standards Nov 13, 2023
@Hwurzburg
Copy link
Collaborator

Hwurzburg commented Nov 24, 2023

osd/ahrs uses euler angles...pitch becomes undefined at 90 roll....euler angle limitation...roll is undefined at +/-90 deg pitch conversely
either one becomes yaw
this is not a rotating ball like an aviation gyro....

there is a new option to make it better conform to aviation like behavior for inverted flight...ArduPilot/ardupilot_wiki#5497

@dxs94
Copy link
Author

dxs94 commented Nov 26, 2023

Yes I'm the one who opened the issue regarding pitch which led to PR #5497. When I test flew it I realized there was room for further improvement.

Here I'm considering a further improvement to OSD artificial horizon which could be incorporated at the same time in upcoming AP 4.5. I'm aware of euler limitations, and at 90° bank, pitch is indeed controlled by yaw input. However please consider this: aircraft pitch body attitude is still defined at 90° bank, and this is what should be presented to the pilot (ie. drawn on OSD). Just how it is in mission planner: in below screenshots the pitch value as known to Ardupilot is reported, and the artificial horizon drawing is correct, unlike on OSD.

Level flight, roll 0:
Demo1


Level flight, right roll 90°: the artificial horizon line is in the middle of the attitude display frame:
Demo2


Aircraft in a climb, right roll 90°: the artificial horizon line is drawn on the RIGHT of the attitude display frame:
Demo3


Aircraft in a descent, right roll 90°: the artificial horizon line is drawn on the LEFT of the attitude display frame:
Demo4

This obviously is reversed for a LEFT 90° roll.

@Hwurzburg
Copy link
Collaborator

without major code changes 90 deg roll will have gimbal locked pitch, as will 90 deg pitch have gimbal locked roll...not something I would anticipate happening anytime soon, if ever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants