• 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 Where am I?

Messages
1,468
Country
italy
Is there a way in xml to determine that I am actually on a runway? I can see in the SDK (A:GPS APPROACH IS WP RUNWAY) but that seems to do nothing.
 
Well, OK, here is the hard way....
You can determine the geographic coordinates of each runway - you can use the GPS functions to get lat, lon, length, width and heading for each.
Once you have the four corners of each runway, you can apply a "point in poly" function (Google this) to determine whether the aircraft is located within one of them.

Doug
 
Vololiberista

The following link here at this site ,
http://www.fsdeveloper.com/forum/threads/storage-of-gps-variables.433868/

has a full instrument at page 2 of the thread , just download the MFD folder then at the end of the thread you will
find the latest xml version .
That instrument has all the variables that you will need .

There is even an easier way as follows ,
1. create an xml instrument .
1.(a). GPS module Macro ,
Code:
<Macro Name="c">C:fs9gps</Macro>
<Macro Name="C">C:fs9gps</Macro>
2. In the Update section ,
Code:
            (L:Whatever,enum) 1 ==
            if{
                (A:PLANE LATITUDE, degrees) (>@c:NearestAirportCurrentLatitude, degrees)
                (A:PLANE LONGITUDE, degrees) (>@c:NearestAirportCurrentLongitude, degrees)
                2 (>@c:NearestAirportMaximumItems)
                10 (>@c:NearestAirportMaximumDistance, nmiles)
            }
3. an Element section ,
Code:
    <Element Name="Apt">
      <Visible>(L:Whatever,enum) 1 == </Visible>
      <Element>
        <Select>
            <Value> 0 (&gt;@c:NearestAirportCurrentLine)
                   (@c:NearestAirportCurrentICAO) (&gt;@c:NearestAirportCurrentIdent)
                   (@c:NearestAirportCurrentICAO) (&gt;@c:FacilityICAO)
            </Value>
        </Select>
      </Element>
    </Element>
4. Another element section with a readout ,
Code:
<!-- Current selection  #A1A9A6    75C5FF    8CD4FF     71A3D0  8CBAD6  readout -->  
        <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:NearestAirportCurrentIdent))%!s!%</String>
          </FormattedText>
        </Element>
This formatted section can have any airport or runway variable readout in it that you desire .

Add a switch to set L:Whatever,enum to 1 , ie; On .
If the visibility is set at 0 then it is always On and displaying an airport ICAO if there is an airport within 10 nm .

What it does is a Nearest search for an airport that is within 10 nm from your aircraft's current position ,
it then reads out only line 0 (zero) airport ICAO ident which is your airport .
For example the above would read "EDDF" if you are at or in the immediate vicinity of Frankfurt airport .
Other variables could be used to establish that the aircraft is both on the ground and on a runway .

Basically this is a very short and simple instrument .

Cheers
Karol
EDIT : I forgot the GPS Macros .
have added them at 1.(a). in the above code .
 
Last edited:
Many thanks Karol,
The idea is to trap certain calls by the PO so that they only occur on a runway. For example "Factored Power" is called when it is necessary to not move the throttles to 100% as the RR Conways don't have fadec control. To avoid the engines overspooling on hot days. It is called as the throttles are moved past 50% which might easily occur elsewhare other than a runway.
 
Back
Top