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

NM distance and compass point direction in "what is there" dialog #1386

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xtophe80
Copy link
Contributor

This set of commits add the distance in nautical miles and the direction as a point of the compass to the Map item dialog aka "what is there" dialog.
Mainly for ease of position reporting with ATC. There is a toolbox for that but I find it's wasting real estate for the occasional use.

@xtophe80 xtophe80 requested a review from a team as a code owner March 15, 2024 23:20
@xtophe80
Copy link
Contributor Author

Doesn't compile on Windows due to my poor string handling. Also forgot about i18n and l10n.
So no need to review

@lordfolken
Copy link
Contributor

This set of commits add the distance in nautical miles and the direction as a point of the compass to the Map item dialog aka "what is there" dialog. Mainly for ease of position reporting with ATC.

There is a toolbox for that but I find it's wasting real estate for the occasional use.

You do realize that there are 3 or 4 Infobox sets that you can assign to additional pages?

@xtophe80
Copy link
Contributor Author

There is a toolbox for that but I find it's wasting real estate for the occasional use.
You do realize that there are 3 or 4 Infobox sets that you can assign to additional pages?

Indeed. It's all about what is the less disturbing/more streamlined. Going back and forth between the normal page and the aux page or opening and closing the dialog. At the moment I haven't flown with that patch, so only better in my head, no practical experience.

@lordfolken
Copy link
Contributor

Please integrate your fix up commit, in the first commit where the changes are relevant.

Comment on lines 65 to 72
{"N","E","S","W"},
{"N","NE","E","SE","S","SW","W","NW"},
{"N","NNE","NE","ENE","E","ESE","SE","SSE",
"S","SSW","SW","WSW","W","WNW","NW","NNW"}};
{N_("N"),N_("E"),N_("S"),N_("W")},
{"N",N_("NE"),"E",N_("SE"),"S",N_("SW"),"W",N_("NW")},
{"N",N_("NNE"),"NE",N_("ENE"),"E",N_("ESE"),"SE",N_("SSE"),
"S",N_("SSW"),"SW",N_("WSW"),"W",N_("WNW"),"NW",N_("NNW")}};

_tcscpy(buffer, table[level][(int) (fmod((angle + 45/pow(2,level)),360 ) /
(90/pow(2,level)))]);
_tcscpy(buffer, _(table[level][(int) (fmod((angle + 45/pow(2,level)),360 ) /
(90/pow(2,level)))]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please integrate this into your previous commit. We don't want fix up commits in the PR.

@lordfolken
Copy link
Contributor

are you still working on this?

@xtophe80 xtophe80 marked this pull request as draft April 30, 2024 13:46
@xtophe80
Copy link
Contributor Author

I will but very slowly.
I think I'll need to get a windows build environment to fix my code.
I understand the macosx failure is generic and not due to my commit.

Also should it be made an configurable feature ?

Format bearing or azimut into point of the compass with configurable
level of precision.
As well as bearing as a point of compass. To help communication with
ATC.
@xtophe80
Copy link
Contributor Author

xtophe80 commented May 8, 2024

That should fix the strings issues on windows.

Now I need to see to make it configurable

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.

None yet

2 participants