Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Country Display

Featured Replies

Hi allI'm wondering if the following would be possible:A gauge that spits out a line of text containing only the country you are currently in, possibly by referencing the first letters of the nearest airport ICAO, or any other more reliable way that you guys may know of. Alternatively, even just the general "region" by referencing the first letter only of an ICAO code.First prize would be the "regions" listed in the "go to airport" selection page in the FS interface.The gauge would probably have to contain a reference list of countries and their ICAO codes, which is no problem, I'm just looking for an example on how to go about this. Any help would be much appreciated.

  • Moderator

You can obtain the "region code" from the fs9gps.dll if you ask politely... ;)C:fs9gps:WaypointAirportRegionC:fs9gps:WaypointIntersectionRegionC:fs9gps:WaypointNdbRegionC:fs9gps:WaypointVorRegionC:fs9gps:FacilityRegionC:fs9gps:IcaoSearchCurrentIcaoRegionYou can request these from an XML gauge using the G500 example script, or from a C gauge using the "execute_calculator_code(); method.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks so much Bill!I'm having some luck with this now. FacilityCity works perfectly, but FacilityRegion doesn't show anything.My code:------------------- C:fs9gpsC:fs9gps (A:GPS POSITION LAT, Radians) (>@c:NearestAirportCurrentLatitude, Radians) (A:GPS POSITION LON, Radians) (>@c:NearestAirportCurrentLongitude, Radians) 1 (>@c:NearestAirportMaximumItems) 200 (>@c:NearestAirportMaximumDistance, NMiles) 0 (>@c:NearestAirportCurrentLine) (@c:NearestAirportCurrentIcao) (>@c:FacilityIcao) %( (@c:NearestAirportItemsNumber, Number) 1 >= )%{if}%((@c:FacilityCity))%!s!%{else}Loading%{end} ---------------------------If I could get it to display FacilityRegion (ie. Country) it would be fantastic.One more question, how do I display the output in upper case? I know this has something to do with {uc} but I'm not sure where to put it in this line:%( (@c:NearestAirportItemsNumber, Number) 1 >= )%{if}%((@c:FacilityCity))%!s!%{else}Loading%{end}

Hi,Try%((@c:FacilityCity) uc)%!s!Hope it helps,Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

That's the ticket, thanks Jan!Any idea why FacilityRegion doesn't show anything?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.