Skip to content

moving flight direction point for osd #10845

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

druckgott
Copy link
Contributor

@druckgott druckgott commented May 1, 2025

🛠️ Feature: OSD Flight Direction POI (Point of Interest)

This update adds a new HUD element that displays the current flight direction of the aircraft as a POI symbol on the OSD.

The feature is controlled via hud_flightpoint in the OSD configuration.

It uses current velocity (not attitude or orientation) to calculate the horizontal direction (in degrees).

No prediction or extrapolation is used — the direction reflects the actual motion vector, including effects like wind drift.

The vertical component (vz) is optionally used to show relative altitude of the POI (above/below).

Display uses osdHudDrawPoi() with a symbol such as SYM_ALERT.

Example Use Case

This visualization is helpful for understanding the aircraft's actual flight path — especially in conditions with wind or when the heading does not match the direction of travel.
Technical Notes

Velocity is taken from getEstimatedActualVelocity() in cm/s and converted to direction using atan2f.

Altitude is shown relative to the current vertical motion vector (vz).

POI is shown even when velocity is low, but logic can be extended to suppress output below thresholds if desired.

Currently I use SYS_ALERT Icon, but bevor merging I will change this, its for testing currently so if somebody wants to test it, here are the hex files:
https://github.com/iNavFlight/inav/actions/runs/14776843536/artifacts/3044729393

grafik

Maybe we can use the SYM_GLIDESLOPE symbol which is moving on the point or we can use arrows for up and down direction?

@druckgott druckgott force-pushed the flight_direction_osd branch 2 times, most recently from 3f9404f to 3085f8d Compare May 1, 2025 14:12
@Jetrell
Copy link

Jetrell commented May 2, 2025

I like your idea. It's just a shame most flight software and HD systems don't support pixel OSD.. Which would make the HUD more precise.
As is with analogue, it will jump around considerably. Possibly making this feature harder to use, as it jumps to the next character position.

However you may be able to get better horizontal precision with the HUD, if you incorporate the use of the AHI vertical elements.
It would provide 6 points of precision per character element position.

AHI vertical

@druckgott
Copy link
Contributor Author

yes but thats then only horizontal, not vertical. But you are right thats not so perfekt ;-)

vertical position is on the wrong side for home point and also for direction on my wing.
@druckgott druckgott force-pushed the flight_direction_osd branch from 59490a8 to 4aef327 Compare May 11, 2025 09:55
@druckgott
Copy link
Contributor Author

druckgott commented May 18, 2025

so today I did a test for the osd. Prinzipal I think it works quite well, but there are some points:

  • vertical direction is wrong (also for home point, don´t know why I also attaced my diff, the board is mounted like in manual so it´s not rotatet anyway different to the "normal" build in position.
  • the home point is shown I have to check the area: case OSD_HOME_DIR in osd.c
  • I have to check why there the 0 comes with it near to my symbol, I think it´s maybe also a problem in area of case OSD_HOME_DIR

Here a Video:
DJI OSD Einstellungen erklärt

diff all (so maybe vor the inverted homepoint and flight direction point
INAV_8.0.1_cli_FUNJET_20250511_111944_funktioniert_start_senkrecht.txt

@druckgott druckgott force-pushed the flight_direction_osd branch 4 times, most recently from 62b447e to c916b61 Compare May 19, 2025 16:55
@druckgott druckgott force-pushed the flight_direction_osd branch from c916b61 to 78f5741 Compare May 21, 2025 06:04
@MrD-RC
Copy link
Collaborator

MrD-RC commented May 21, 2025

I watched the video and have no clue what it’s supposed to be showing? Is this just the ground course vs heading difference?

@druckgott druckgott force-pushed the flight_direction_osd branch 2 times, most recently from a81d27a to 42760ac Compare May 21, 2025 10:15
@druckgott druckgott force-pushed the flight_direction_osd branch from 42760ac to d8853d9 Compare May 21, 2025 10:17
@druckgott
Copy link
Contributor Author

I watched the video and have no clue what it’s supposed to be showing? Is this just the ground course vs heading difference?

IT Shows you the moving direction of the aircraft, expext that the vertical Position i ls. Mirror, i habe flashen my funjet already this a fix But have to test it

But its the flight movement so where you will currently move on if there is no influence of anything,linke a pathe where you will go.

druckgott added 4 commits May 21, 2025 18:03
Revert "init"

This reverts commit 4aef327.

add as extra icon

init

vertical position is on the wrong side for home point and also for direction on my wing.
@druckgott druckgott force-pushed the flight_direction_osd branch 3 times, most recently from 5db9896 to effa734 Compare May 23, 2025 10:59
@druckgott
Copy link
Contributor Author

druckgott commented May 24, 2025

Today I did test it again. There are some things I don´t understand:

  • why can I see the homepoint always, I only have this on: --> ok this I find out it was due to osd symbol 45 which was on, so I now deaktivate this
    set osd_hud_flight_direction = ON
    set osd_hud_radar_disp = 3
  • Why do it jump around so much in horizontal position, vertical position is quite accurat, I use o3 with this values
    set osd_camera_fov_h = 122
    set osd_camera_fov_v = 93
  • Why is the position of the homepoint always in the wrong direction horizontal.

Video:
DJI O3 iNav OSD Video
This is the current testing Icon that it´s good to see:
grafik

@druckgott druckgott force-pushed the flight_direction_osd branch from effa734 to 24fb284 Compare May 25, 2025 09:30
@druckgott druckgott force-pushed the flight_direction_osd branch from 24fb284 to 27f8cba Compare May 25, 2025 10:47
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

Successfully merging this pull request may close these issues.

3 participants