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

FS2004 GPS VOR frequency to tuned radio?

Messages
542
Country
australia
Hi Bob

Your code at reply #15 is interesting , I need to look at it more .
I had a similar need , whereby I click on various facilities showing on my radar and derive data on the specific chosen facility ,
I wanted both the data and the ability to enter that facility into a flight plan .

The method that I used is as follows , with the exception that PLANE Lat/Long reads CLICK Lat/Long in my instrument .
Code:
<Macro Name="c">C:fs9gps</Macro>
<Macro Name="C">C:fs9gps</Macro>
      <Update Hidden="No"> 
        <Frequency>6</Frequency>
        (L:VorNearest,enum) 0 ==
            if{
                (A:PLANE LATITUDE, degrees) (>@c:NearestVorCurrentLatitude, degrees)
                (A:PLANE LONGITUDE, degrees) (>@c:NearestVorCurrentLongitude, degrees)
                2 (>@c:NearestVorMaximumItems)
                70 (>@c:NearestVorMaximumDistance, nmiles)
            }
      </Update>
      <!--above the 70 represents a VOR search out to 70 nm from your aircraft-->
    <Element Name="Vor">
      <Visible>(L:VorNearest,enum) 0 == </Visible>
      <Element>
        <Select>
            <Value> 0 (&gt;@c:NearestVorCurrentLine)
                   (@c:NearestVorCurrentICAO) (&gt;@c:NearestVorCurrentIdent)
            </Value>
        </Select>
      </Element>
       <!--above the 0 represents just one VOR-->
        <Element>
          <Position X="136" Y="93"/>
          <FormattedText X="61" Y="12" Font="Tahoma" FontSize="9" LineSpacing="12" Adjust="Right" Color="#33E100" Bright="Yes">
            <String>%((@c:NearestVorCurrentIdent))%!s!%  %((@c:NearestVorCurrentFrequency, mhz))%!6.2f!%</String>
          </FormattedText>
        </Element>
    </Element>
       <!--above is text readout change the Position X and Y to suit your gauge -->
This one gives both VOR ident and freq . and I can set the Freq to the standby side of the radio .

Cheers
Karol
PS ;
Both shots taken at YAMB Amberley Australia , Radar projected to
KDEN Denver USA .
The Right hand MFD has multiple Facility Buttons ,
LL , APT , VOR , NDB , INT .
When APT , VOR , NDB , INT are selected a short range (10 - 15 nm) Nearest search is conducted for that type of facility , data is then shown and it is available for entry (ENT) into a Flt Pln or DTO .
Any of the latter 4 facility types will be entered into a Pln with their specific Ident name .

Shot #1
VOR Facility selected .
VGlOJgo.jpg

Shot #2
Here APT (Airport) Facility button is selected .
As can be seen with the large amount of airport data available and in this instance multiple ILS it has necessitated spill over data overlays .
ILS data on overlay below radar .
You can click on any airport symbol currently showing on the touch sensitive radar display screen , the clicked airport data shows up immediately , you can do that as often as you wish , that browsing capability gives you the airport names etc of any of them .
The upper radar display composite was put there as the radar has been returned to Local and shows the Distance-Bearing from YAMB to KDEN .
Sdk5PFJ.jpg
 
Last edited:
Messages
1,564
Country
thailand
Hi Karol,

Thanks for your post - your work and ideas are always interesting.

I should point out that my post in #15 was in response only to the question asked by gr8guitar in #14. There, the conditions were 1) Sim is FS9, and 2) needed frequency of a waypoint VOR in an active flight plan. So, it wasn't a NearestVOR search issue, which was my point in #17.

For your cockpit, have you tried calibrating the map scale so you can use the mouse cursor to click on a facility, return its lat/lon, and then have a Nearest search pull info about the clicked facility?

Bob
 
Messages
542
Country
australia
Hi Bob

Yes .
If you look carefully at the 2 previous shots you will see the little RED DOT click indicator on firstly the VOR symbol , then on the Airport symbol , the data presentation mentioned is all off touchscreen click spots .

I slightly modified your arrangement , and created it as a Pop Up instrument .
You call up the " Calibration Gauge " ,
then turn the aircraft till it is pointing to TRUE North ,
run the usual Calibration routine
you then get the 2 Scale numbers.

Those 2 numbers are then added at about lines # 29 and #30 of the Radar xml , then save it.

Thereafter the Radar Touchscreen has absolute Click location precision .

The Radar Touchscreen works in all modes ,
The 4 Normal modes (at the aircraft's current location ) ,
and
The Stand Off (where the radar display can be projected to any location on Earth by the user) , The stand Off now has 2 selectable modes , Track Up and North Up .

All clicks return the particular location anywhere on earth as either " LL , APT , VOR , NDB , INT " , depending on what Facility button has been selected ,
the first one LL is just the Lat/Long .

Click precision is maintained for all Zooms in 1 to 300 nm range .

The Distance - Bearing (text top of radar) for the click location are now constantly updated as the aircraft moves , AND the RED DOT remains Locked on the actual clicked location .

The shot below is the Calibration Set up .

Cheers
Karol
29Rkkl3.jpg


EDIT
Following shot details Facility button useage .
LJ0pJWl.jpg

Note ; above to the Right of " RADAR > PICK UP " in each instance there appears a Lat/Long , that Lat/Long is the location of the click point ( RED DOT ) .
For each of " APT , VOR , NDB , INT " the Lat/Long will differ by a miniscule amount as the Nearest Search obtains the actual Lat/Long of the Facility from the FS database .
 
Last edited:
Messages
129
Country
us-indiana
1) What is the difference between @c: and C:fs9gps:? My gauge wouldn't work until I change @c: to C:fs9gps: ...


2) I'm working on an EFB gauge and I've been able to extract airway info, make a list of the entire waypoints in a flightplan. This all started when the default GPS500 didn't show all the missed approach procedure, like holding altitude and holding radial that I can tell. I can show it my EFB now. I have used XMLVARS to have one gauge send data to another (gauge 1 sends to gauge2) and it works great. And now, I am trying to have gauge 2 send different data to gauge 3. I changed the macro names and StringValue names, i.e., tried StringValue1, StringValue2, etc. but I would get blank data in gauge 3. If I just used different macro names but use StringValue, I get gauge 1 data into gauge 3, which is what I don't want. Can XMLVARS be used between 3 or more gauges?

3) How may I retrieve runway course and ILS frequency based on the approach selected as seen in the attached picture? I've included a small samlple of what I tried and I tried many other ways via extracting from GPS500.xml and DAT37.xml (Karol Clebowski's) with no success.

--- attempt --

(A:GPS POSITION LAT, Radians) (>C:fs9gps:WaypointAirportRunwayLatitude, Radians)
(A:GPS POSITION LON, Radians) (>C:fs9gps:WaypointAirportRunwayLongitude, Radians)
14 (>C:fs9gps:WaypointAirportMaximumItems, enum)
30 (>C:fs9gps:WaypointAirportRunwayMaximumDistance, nmiles)

--- tried this too --

(A:GPS POSITION LAT, Radians) (&gt;C:fs9gps:NearestAirportSelectedLatitude)
14 (>C:fs9gps:WaypointAirportMaximumItems, enum)
30 (>C:fs9gps:WaypointAirportRunwayMaximumDistance, nmiles) (A:GPS POSITION LON, Radians) (&gt;C:fs9gps:NearestAirportSelectedLongitude)

<Element>
<Position X="4" Y="17"/><Visible>1</Visible>
<Text X="150" Y="18" Length="30" Font="consolas" FontSize="15" Fix="Yes"
Color="#FFaa88" Adjust="Left" VerticalAdjust="Center">
<String>%((C:fs9gps:NearestAirportSelectedFrequencyValue) 100 * near d 100 div)%!03d!.%(100 %)%!02d!</String>
</Text>
</Element>

Thanks for any helpful input.
 

Attachments

  • FS FP test.JPG
    FS FP test.JPG
    188.4 KB · Views: 323
Messages
495
Country
austria
Have you defined this macro in your gauge?

<Macro Name="c">C:FS9GPS</Macro>

But anyway i only use "C:FS9GPS".

Runway course
Code:
 %((C:FS9GPS:WaypointAirportRunwayDirection,degree) (A:MAGVAR,degree) - (&gt;L:NavM_POST_Rwy_Direction,degree))
But of coure you have to select the proper runway.


BTW are you using XMLTools in FS9 ???
 
Last edited:
Messages
495
Country
austria
Scrolled just up!
All the things you are looking for must be in Karol's DAT73.xml.
 
Last edited:
Messages
1,564
Country
thailand
flythesimskies,

Regarding your gps question 3), every line contains a mistake, so a better idea than addressing those one-by-one is to suggest you study this guidebook to learn more about how to work with the gps module. If you're new to XML gauge work, then you have a double challenge: learning XML and learning about the gps module. Be persistent, it will take time.

Question 2), using XMLVARS. Looks like you just want to access a certain variable from different gauges in your panel. Are these numerical values? If so, do you know about L:Vars? Those are shared by each XML gauge in your panel. XMLVARS is a good tool, but probably not necessary for your application.

Bob
 
Messages
542
Country
australia
flythesimskies,

Your LEFT instrument shows the following detail ,
- Loaded
- ILS 04L
- KRSTL ............. what is this , please expand ?
- RW 04L

You need to explain the above and more importantly why it is being displayed .

The 04L is showing up , so obviously you know the airport and runway that is being utilised .
That 04L is the key to getting both your (1 ) ILS frequency , and (2) Runway Heading .

Why is ILS 04L and RW 04L in that information block ?
What Variables are causing them to be displayed ?

Also ,
Do you have Approach loaded , that's important , because I am guessing that the last Approach segment Heading
will be exactly aligned with the Runway heading , if so it could be captured and used as the runway heading .

Cheers
Karol
 
Last edited:
Messages
129
Country
us-indiana
Wow, did I have a difficult time logging on to this website this morning (11 ish EST).
Hello. Thank you all for your responses. I will try to answer each one.
1) From Eduhir: Have you defined this macro in your gauge?
<Macro Name="c">C:FS9GPS</Macro>
Yes.I have both "c" and "g" defined.
But of coure you have to select the proper runway.
Done, which why the approach list shows "Loaded"
BTW are you using XMLTools in FS9 ???
Yes. And thank you to the person who developed that!

2) From rpmc:
I do have the GPS Guidebook download and thank you for that.
Are these numerical values?
No, I am trying to send string variables. Yes, I do understand I can send numerical values with L:Vars but I was trying
to send string variables. Gauge 1 to Gauge 2, I have working but I was trying to send a different string variable from
Gauge 2 to Gauge 3 but was unsuccessful with different macro and StringValue names. I was wondering if it's even possible to do.

3: from COBS:
- KRSTL ............. what is this , please expand ?
As you can see from the GPSInfo gauge, I have the approach loaded (and I've tried it with it Active with no successful of displaying its associated ILS frequency or course) and below the "Loaded" are the actual approach waypoints listed for runway 04L. KRSTL is the first waypoint listed. RW04L is the second waypoint listed, etc.. This can also be seen in the GPS500 as well.
Why is ILS 04L and RW 04L in that information block ?
These and the others below them are the waypoints (using Vector instead of a STARS approach) to 04L
What Variables are causing them to be displayed ?
(C:fs9gps:FlightPlanWaypointApproachType)
Do you have Approach loaded , that's important.... ?
Yes, as can be seen by the "Loaded" on the top-right-hand side of the GPSInfo gauge. This either shows "Loaded" or "Active" in the gauge as appropriately selected. I have also tried with the approach "Active" but again, the ILS frequency and course could not be shown with my attempts. (picture attached). Notice that when the approach becomes Active, then there is a ">" symbol to show the next waypoint in the flight plan. Just to clarifly, everything shown (except the 1. 2., etc. and '-------' on the GPSInfo gauge is based on the results of the GPS variables queried.

Again, thanks for the replies, still plugging away at a solution.
 

Attachments

  • FS FP test 2.JPG
    FS FP test 2.JPG
    166.2 KB · Views: 366
Messages
129
Country
us-indiana
Hello. Thank you for your reply and also the great aircraft and its respective gauges. I don't have a list of ALL the runways and their respective information as I am only interested in the runway and its approach information when selected from the APP/DEP (or PROC in GSP500) button. I took at look at DAT37.xml and I deleted the runway's width information and tried to insert the ILS frequency but that didn't work.
excerpt:
\t
%((@c:NearestAirportSelectedFrequencyValue, MHz) 100 * near d 100 div)%!03d!.%(100 %)%!02d! MHz
%{end}

I again looked at the gps500.xml and trying to see how it knows the difference from the COM frequencies from the ILS frequencies that is shown in the gauge. Again, I am only interested in the approach runway's ILS frequency.

I do see that the DAT37.xml does list the runways' courses so I'm trying to learn from the xml how that was derived.
 
Messages
495
Country
austria
I understand what to want!
I think there is no other solution as to check the data line by line.
But please keep us informed when you find an other solution!
 
Messages
542
Country
australia
In the above posts you will have noticed reference to DAT37.xml and DAT73.xml .
I created an extra copy of DAT37 and renamed it to DAT73 for insurance purposes while I made some changes that are described at following Link ,

http://www.fsdeveloper.com/forum/threads/storage-of-gps-variables.433868/

If you go to page 2 of that link , and scroll down to Reply # 34 , you will see DAT73v6.zip and AILA PDF , if you download those ,
just rename the DAT73 to DAT37 then you can insert it and use it .
The changes that I made in that xml were to create additional pages in the MFD that enable precise Synthetic ILS approaches to be conducted on
any Runway that exists in the FS database ,
You select an airport , then select a runway , then select which runway end that you wish to use , it is applicable to all 24,000+ airports in database .
Selection is all done manually .

In one respect it won't help you , as Edi previously stated ,
%((@c:WaypointAirportRunwayDirection, degrees) (A:GPS MAGVAR, degrees) - d360)%
the variable only gives you one end of each runway , to determine the other end heading you have to add or subtract 180 degrees .

Regards the ILS frequency , in the above shot I used Edi's ILS code to show those ILS and ILS frequencies .
It might be worth a look at Edi's ILS code as contained in his " NAV INFO MAIN " instrument , it has in it the actual variables that might
help you to pull the ILS frequency .
The work that both Edi and Bob have done on this stuff is absolutely awesome , they are both streets ahead of me .

Cheers
Karol
 
Messages
129
Country
us-indiana
Hello. Thank you for your help. Are the Synthetic ILS approaches in your MFD similar to the SALSv9 gauge? A great gauge by the way! I did download the GPS Guidebook and I saw some information on airport frequencies. I was not able to directly copy the text as it looked like an image insert but it was well-worth the time to type the XML gauge by hand. I think there might be a misprint though. Shouldn't the ">" be used?
(@c:NearestAirportCurrentICAO) (>@c:WaypointAirportICAO).
In any case, that was very useful. It gives complete airport information, except elevation. Between the gps500, DAT37 and the airport information from the GPS Guidebook, I might be able to figure it out. Also, I did not get an answer to:
1) What is the difference between @c: and C:fs9gps: ? C:fs9gps: was more reliable for me but I don't know why.
1a) In that vain, I noticed that sometimes the ">" doesn't always work as well as using "&gt;", again why?
2) Can XMLVARS, with different string data be used with 3 or more gauges?
 
Messages
1,564
Country
thailand
I think there might be a misprint though. Shouldn't the ">" be used?
(@c:NearestAirportCurrentICAO) (>@c:WaypointAirportICAO).
What page?
It gives complete airport information, except elevation.
Use WaypointAirportElevation to get airport elevation.
I did not get an answer to:
1) What is the difference between @c: and C:fs9gps: ? C:fs9gps: was more reliable for me but I don't know why.
Actually, Edi addressed this in #26, above. This is an xml macro topic and you need to understand what macros are and why they are used in xml gauge work. That's why Edi asked have you defined <Macro Name="c">C:FS9GPS</Macro> in your gauge. Here's more info on macros.
I noticed that sometimes the ">" doesn't always work as well as using "&gt;"
">" and "&gt;" are interchangeable when you are writing a value to a variable, like (>L:Variable, number) or 50 (>@C:NearestAirspaceMaximumDistance, nmiles). The xml parser will interpret (> as (&gt; However, when typing a "greater than" logical comparison, then use &gt;
If ">" does not always work for you as well as using &gt;, then you likely have a typo error somewhere.
Can XMLVARS, with different string data be used with 3 or more gauges?
Believe so, yes. This is the first sentence of the XMLVARS user manual pdf:
"This class enables the use of custom variables -kind of LVars- for storing and retrieving data across the entire gauge set of an aircraft panel."
 
Messages
129
Country
us-indiana
Hello. Thank you for your replies and information :).
To COBS: will do and thanks.
To rpmc:
1) I believe the page was 43, from the GPS Guidebook v2.0.1.
2) I did add the elevation, thank you.
3) In reference to my question about @c: vs. C:fs9gps, from Eduhir, I only saw: "But anyway i only use "C:FS9GPS".". I did
not see an explanation. Will re-look the above. In addition, I believe this person realized I had the "c" and "g" macros defined already as I was retrieving/writing @c:/C:fs9gps: data already. Eduhir: "Scrolled just up!"
4) I realize "<" and "&gt;: are suppose to be interchangeable and I do not believe I had typos but I just noticed that I seem to have less difficulty, but more typing - ugh when I use the more verbose versions. There has to be a reason somewhere why the two versions exist. I usually use Notepad to edit but when I get a blank gauge, I then use Cooktop to help validate and find my typos in the XML. Just today however, I noticed something I hadn't before. Sometimes when I open up a gauge and then go to save, the Encoding has been ANSI but today, the UTF-8 was showing. I searched about it and it has to do with ANSI uses 1 byte and UTF-8 uses up tp 4 bytes and variable length. It was just something I never observed before. I don't know if that matters or not. It's not a big deal I was just curious. I appreciate your time on this.
5) As I may have mentioned before, I do have XMLVARS working for gauge 1 strings to gauge 2. Just not gauge 2 strings to gauge 3 as they have different string values. I'll keep plugging away. If it can be done, I should solve it.

Again, thanks for all of your help.
 
Messages
1,468
Country
italy
I use Ed's NAVINFO gauge as well. It's amazing stuff. Being able to determine which airport one is at or a destination allowed me to create codeshare safety messages in different languages automatically triggered by Ed's gauge! Oh, and I almost forgot with his gauge I can find the destination airfield and calculate and display the QFE for landing or touch and gos
 
Last edited:
Top