• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Toggle between GPS waypoint coordinates

Messages
218
Country
greece
I want to create a gauge that displays and assigns the coordinates of the currently selected waypoint to GeoCalc.
Since my M/B died and I cannot test the code, I thought I should ask.

I have a knob that uses this when you right click it:
(C:fs9gps:FlightPlanWaypointIndex, number) ++ (>C:fs9gps:FlightPlanWaypointIndex, number)

From reading the SDK I suppose that this will read the next waypoint in my FP (from WP1 to WP2, etc). Then, I can use the following variables to write into GeoCalc. Is that right, or do I need to somehow "select" the waypoint other than change the index number?

VARIABLE EX GET SET

FlightPlanWaypointIndex Number X X X
FlightPlanWaypointLatitude Degrees X
FlightPlanWaypointLongitude Degrees X
 
I have a knob that uses this when you right click it:
(C:fs9gps:FlightPlanWaypointIndex, number) ++ (>C:fs9gps:FlightPlanWaypointIndex, number)

From reading the SDK I suppose that this will read the next waypoint in my FP (from WP1 to WP2, etc). Then, I can use the following variables to write into GeoCalc. Is that right, or do I need to somehow "select" the waypoint other than change the index number?

That will work. Note also that depending upon what you want GeoCalc to calculate, there may be gps variables that provide the answer a little more directly.

Bob
 
I use the following variables.

HTML:
(A:GPS WP NEXT LAT, degrees)
(A:GPS WP NEXT LON, degrees)

That gives the Lat/Long of the current active waypoint of your flight plan , and no index number is required.

However your method is much more flexible as you can interrogate any waypoint in the flight plan without
having to make it the active waypoint.
In other words you could be flying the leg leading to active waypoint #3 , at the same time with your switch/knob you could be
doing a GeoCalc way ahead at for example waypoint #17 , that would be much more flexible , and in some
circumstances much more desirable .

Cheers
Karol
 
Last edited:
Thanks for the prompt replies!
What I had in mind was not following the active waypoint, but instead updating my FD and calculating the track to any waypoint the pilot selects.
 
Last edited:
Thanks for the prompt replies!
What I had in mind was not following the active waypoint, but instead updating my FD and calculating the track to any waypoint the pilot selects.

We all agree! You have a workable approach to indexing and are correct in the use of GeoCalc to calculate bearing from aircraft to any waypoint in the flight plan.

Have fun with the gps.

Bob
 
Back
Top