inav icon indicating copy to clipboard operation
inav copied to clipboard

OSD 2D map enhancements: configurable margins and reference line

Open rmaia3d opened this issue 1 year ago • 3 comments

This PR adds two things to the current OSD 2D map implementation: 1 - configurable horizontal and vertical margins 2 - configurable, fixed, reference line at the center of the screen

Feature (2) draws a dashed line on the center of the map display, if using "up is north" setting. The line is aligned at the heading set by a configurable parameter. The idea is to set this heading to the same heading as an easily recognizable and static feature nearby the place you are flying, for example the runway (if flying from a club), a nearby street or fence. So now you are able to compare the craft's position on the OSD map with this reference, making it easier to orientate yourself, better align directional antennas and so on. If set to -1 (the default setting), this line is disabled.

For now, these new parameters are only configurable via the CLI. If this PR gets accepted, the parameters could probably be added to the configurator UI. But since JScript is not my area of expertise, I will leave such a PR to be made by someone more comfortable with that.

A screenshot of the line enabled and configured (this shows being used with a Walksnail video system, but it's universal, working with analog and all digital setups supported by Inav, including DJI):

Inav_Map2dLineRef_WS_Annotated

The light blue circle is the arrow which represents the craft's current position and heading (where the arrow is pointed to). The magenta ellipse marks the AHI line (artificial horizon, which works just fine together with the features from this PR). The red arrow points the reference line (feature added by this PR), configured to be aligned with the main runway (pointed to by the purple arrow).

rmaia3d avatar May 14 '24 14:05 rmaia3d

@rmaia3d please resolve conflicts

DzikuVx avatar Jun 08 '24 16:06 DzikuVx

@rmaia3d please resolve conflicts

Done!! 👍

rmaia3d avatar Jun 10 '24 15:06 rmaia3d