• 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.

P3D v4 [HELP] Need Help with GPS script

Messages
201
Goodmorning everybody!
In the SDK manual it says we can read a gps status variable in a gauge with this syntax: (C:fs9gps:Variable Name , Units)
Then there is a table called "GPS Enumerations - The following tables describe the enumerations referenced in the table above."
which i don't understand the meaning of ENUMERATIONS honestly.
And there ia a variable (is it?) "FAC_BV_TYPE" - values: TOWER = 9, CLEARANCE = 10, GROUND = 11, DEPARTURE = 12, APPROACH = 13..." and so on.
So i thought it was basically the ATC status. I tried to get the value:
(C:fs9gps:FAC_BV_TYPE , Enum)
(C:fs9gps:FAC_BV_TYPE , Number)
(C:fs9gps:FAC_BV_TYPE)


But it returns always 0, nothing.
So what i would need is to get a variable that tells me what is the status of the flight plan progress in a specified moment.
For example in a saved scenario .fxml file there is this line: "<Property Name="AcState" Value="ACSTATE_PRETAXI_CLEARANCE" />"
I need exactly to get that value in the simulator.
Is that possible?

Thanks a lot for any help!

ADD:
the SDK says: "VarGet and VarSet methods which can be used to get and set any type of parameter available to the system (e.g. Scenario Variables 'S:', Aircraft Parameter 'A:' ...."
Scenario "S:" variables?! Where are them? No documentation. I can only see a list of A:, E:, K: varibles. NOT S:
 
Last edited:
Enumerations are just a numbered list in this case.
The actual number refers to the bit in the 24 bits available.

That chart is used for the input variable "NearestAirspaceQuery" ex.
<hex code from FAC_BV_TYPE> (>C:fs9gps:NearestAirspaceQuery)
See pages 100 thru 102 in Robert McElrath's excellent GPS Guide - https://www.robbiemcelrath.com/fs/guides/gps

There is only 1 example of the nearest airspace query in the FSX GPS 500 (snipped) -
XML:
<!-- Line 37 -->
<Macro Name="c">C:fs9gps</Macro>

<!-- Lines 82 thru 85 -->
<!-- B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING -->
<Macro Name="kDisplayedAirspaces">0xEFC038</Macro>
<!-- MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER -->
<Macro Name="kAlwaysDisplayedAirspaces">0x0FC000</Macro>

<!-- Line 427 -->
@kDisplayedAirspaces (&gt;@c:NearestAirspaceQuery)

S Vars? Most likely not used? -or- S Vars "could" refer to "simvars" used in missions.
Line 1410, SDK\Mission Creation Kit\Mission Samples\Airline Pilot\Amsterdam\Amsterdam.xml
<Name>Simvar.AltitudeAMSL</Name>

Take everything in the SDK with a grain of salt - incomplete, incorrect and so on.
 
Hi Roman!
Well, thanks! Now everything makes more sense to me. Nevertheless i don't know if i am going in the right direction.
Back speaking about scenario events, the <Property Name="AcState" Value="ACSTATE_PRETAXI_CLEARANCE" /> would be more useful if "intercepted" and make actions based on its value.
I'm afraid there is no way to get a value that describes the ATC status.
I think i'm not going in the right direction with "FAC_BV_TYPE> (>C:fs9gps:NearestAirspaceQuery)" stuff

EDIT: definetely not the right direction. TOWER = 9, CLEARANCE = 10, GROUND = 11, DEPARTURE = 12, APPROACH = 13... they identify radio frequencies, not atc statuses :-(

Maybe i should open another thread describing what i exactly need? (nothing to do with gps engine)
 
Last edited:
But it "talks" to the player as well.
Status: ACSTATE_PRETAXI_CLEARANCE that you can see in a saved scenario is when the player is in the pre-taxi status. Not AI.
 
I do believe that only changes if you interact with the default ATC, requesting clearance, announcing departures, etc. Otherwise, it may not be valid.
 
Exactly. And i was wondering if there is a way to get those variables values.
Im afraid no.
An external dll or exe would help, but it doesnt exists afaik
 
Back
Top