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

fs9GPS tutorials

Messages
131
Country
unitedstates
Tried a forum search, and didn't quite find what I was looking for.

I need a simple tutorial on using the fs9gsp module. I have Bob McElrath's guide, and it is filled with tons of great information, however it isn't quite geared to someone just starting with the fs9gps.

I ideally would like to find a simple FSX XML gauge that does nothing more than let you enter an ICAO and displays the appropriate information. I think if I had something like that to reference, I could delve into more complex stuff using Bob's guide.

I script my gauges in ACE, so and ACE compatible example gauge would be the best, but an older format XML gauge would also work.

Any ideas on where I could find such information. I have looked in Microsoft's gauges, and the stuff I need to do is in there, but the scripting is so unstructured and ugly I am bit overwhelmed.

Any advice would be appreciated.
 
Daniel, there is currently a very long thread/discussion at AVSIM in the Aircraft and Panel Design forum with just such a discussion, along with numerous example scripts.

It is primarily oriented toward developing FMS/FMC type equipment, but does cover how to enter ICAO and retrieve data for subsequent display.
 
Thanks Bill,

I haven't used the AVSIM forums much, but I will definitely go check them out.
 
Bill,

Thanks for the welcome back I saw on another thread.

Do you have a link to the AVSIM forum discussion? I am having problems with my account over there (there password recovery system doesn't seem to wort atm). I have a email in to the administrator, but in the mean time, I cannot use the search functions.

Thanks again.
 
I wrote dozens of xml scripts when I was working on the guidebook. I will clean up and comment one or two and post them. That's probably what you are after.

As Bill advises, there are some threads in AVSIM that have xml script related to fs9gps. Many have just snippets (some that actually do not even work), but there are a few threads that contain a fully functional xml script.

Bob
 
Bob,

Thanks for the offer of some of your scripts, I look forward to seeing them.

Bill,

Thanks for the link, I am still having problems with my avsim forum account. I can log in now, but I can't browse the forums while logged in. I need to activate the account but the link is dead! I downloaded the Honeywell FMC, and have glanced through it. The author really like macros I see. I have only glanced at it, and have found several uses for macros that would have simplified my own stuff.

One quick question: I see the following macros defined in almost all gauges that use the fs9gps.

HTML:
<Macro Name="c">C:fs9gps</Macro>
<Macro Name="g">C:fs9gps</Macro>

What is the purpose of having 2 identical macros with different names?

Wouldn't
HTML:
(@c:FlightPlanWaypointDistanceTotal, nmiles)
be exactly the same to the compiler as
HTML:
(@g:FlightPlanWaypointDistanceTotal, nmiles)
*insert any GPS variable here.
 
Bob,
Wouldn't
HTML:
(@c:FlightPlanWaypointDistanceTotal, nmiles)
be exactly the same to the compiler as
HTML:
(@g:FlightPlanWaypointDistanceTotal, nmiles)
Yes, it would be. The Microsoft gps gauges use dozens of custom functions designated with a "@g". The functions are not the same as the gps variables, but both are part of the gps module, so the full path is c:fs9gps: ... for both.
 
You mean to tell me that microsoft used @g instead of @c to keep things tidy and differentiate between custom functions. That isn't the Microsoft in know, tidy scripting in a gauge?!?! :)
 
OK, so I spent a few hours tonight digging through forum posts, the gps_500.xml and the g1000 MFD (fsx schema, ace tool). I am starting to get a grasp on using the gps functions.

My biggest hurdles are: 1) I code in FSX Schema using the ace too ( I know, I know ) and 2) the g1000 gauge is horribly written, not commented at all, and much more complex than what I need.

Does anyone know of any other GPS's that are written in AceXML? With my lack of familiarity of the fs9 schema, the gps_500.xml is a bit to complex to follow. I am finding great information in the gps_500, just having a hard time putting it all together.

I guess I am more of a visual programmer, than pure code, which is why I am more comfortable with AceXML.

I am not looking to copy someone else work, just would like to use it as a reference. If all goes well, I would also like to put together a tutorial on using the GPS in AceXML,
 
a simple FSX XML gauge that does nothing more than let you enter an ICAO and displays the appropriate information.
Question for clarification ... do you really mean to enter the ICAO code, or do you mean Ident?
 
I am talking about the 4 digit code.

IE in the case of Minneapolis/St Paul Minnesota airport, I am referring to KMSP.

I will need to be able to look things up by other means at some point, but for now, I am focusing on just one.
 
I am talking about the 4 digit code.
Daniel,
That's the Ident, and it's what I figured you were referring to. Airports have a three or four character Ident. ICAO is the 12 character facility identification string used in the fs9gps database, but it's not what a pilot enters into gps or fmc units. Ident, Name, Lat/Lon - those are typical entries, but not the fs9gps ICAO.
 
Last edited:
Dug my teeth in again tonight...made some good progress.

Anyone know of a tutorial/overview of the custom @g functions of the fs9gps?

I an aware there is no official documentation from MS, but has anyone put together a list on the functions and their arguments?

I have found some, but has anyone compiled a list?
 
Last edited:
Daniel,

Note that none of the @g functions are necessary for use in a gauge that you may be building. That is, they aren't navigation or database related variables like the gps variables. Instead, they are utilities that facilitate certain operations of the Garmin gps gauges that Microsoft wrote. By my count, there are 81 @g functions in the gps_500 gauge.

My recommendation, for what it's worth, to anyone wanting to get into the fs9gps realm, is to simply avoid using @g functions in the gauges that you write.

Bob
 
Last edited:
Daniel,

As promised, here's an example fs9 xml script demonstrating a simple ICAOSearch and NameSearch - which is essentially what you want to do according to your earlier post.

Directions

1. The gauge is large (1000x700), so set it up as a separate Window. Add something like
Window50=ICAO XFER EXAMPLE
in the Window definitions area near the top of the Panel.cfg file

2. Add the Window parameter statements to the Panel.cfg file:
[Window50]
position=0
size_mm=1000,700
visible=0
gauge00=Custom_Gauges!Example 1, 0,0,1000,700


where "Custom_Gauges" is whatever folder you stick Example 1.xml into.

3. To enter an IDENT, click the blue Ident square and begin typing the Ident using your keyboard

4. In the case of multiple ICAOs found, click the white ICAO SELECTED square and type the Index number of the desired ICAO

5. To enter a NAME, click the yellow-green NAME square and begin typing the airport name using your keyboard. NameSearch only locates airport names, and there will never be multiple NameSearch ICAOs returned

6. To disable Keyboard Direct Entry of the Example 1 xml gauge, click the lime green KEYBOARD DIRECT ENTRY square. This is important as it will return the normal keyboard assignments

7. To reset the gauge, click the red square with the "R" in the upper right hand side of the gauge

Selected Waypoint Airport, Intersection, NDB, VOR, and Facility variables are on the right side of the gauge. Note that an ICAO of any type will return ICAO, Ident, Lat and Lon within all groups.

Bob
 

Attachments

Last edited:
My recommendation, for what it's worth, to anyone wanting to get into the fs9gps realm, is to simply avoid using @g functions in the gauges that you write.

Bob

With this advice, I indeed starting using the fs9gps without using the @g functions. I must say, great advice. By NOT using the @g functions, I removed the mystery of what was happening "behind scenes".

The particular gauge that I am working on uses much of the same Garmin interface that MS created all those functions for, however, so far I have not found it to be difficult to "replicate" the functions with my own code (I haven't started working on the multiple match popups yet though, so we'll see).

Anyways, back to my point. Without all that "behind scenes" stuff happening, it greatly improved my understanding the the fs9gps system.

Thanks again Bob!


Daniel
 
Back
Top