Jump to content

Sign in to follow this  
Guest BFG

Country Display

Recommended Posts

Guest BFG

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest BFG

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}

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest BFG

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...