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 (>@c:NearestAirportCurrentLine)
(@c:NearestAirportCurrentICAO) (>@c:NearestAirportCurrentIdent)
(@c:NearestAirportCurrentICAO) (>@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 .