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.

Nearest airport in C

Featured Replies

I'm trying to get a list of the nearest airports to use in a C gauge. I've seen something in the xml gps that uses @c:NearestAirportItemsNumber to get the number of them and then loop through. I have a real hard time reading the polish notation that this is wrapped up in. Does anyone know how one would get this info into a C guage?Thanks,Steve

  • Commercial Member

Hi Steve,Not sure if this will help, but take a look at the following reference site, with some great examples:http://www.fs2x.com/Tutorials.htmPut in a search for "TALAL" - there is an XML gauge that is simplified enough that you may be able to take advantage of it.Misho

P3D SpacePort Team

  • Author
  • Moderator

>Does anyone know how one>would get this info into a C guage?Steve, it can be done, but it is extremely difficult. The method we've developed is proprietary, but I can tell you that the answer(s) are in the gauges.h file and the SDK examples.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • 2 weeks later...

I have looked through the SDK in depth and through the gauges.h file. I see you need the execute_calculator_code method but i don't know where to use this in my gauge. Also is the macro "c" in the xml gauge going to require me to add more to the parameter for the execute_calculator_code method?

  • Author
  • Moderator

>I have looked through the SDK in depth and through the>gauges.h file. I see you need the execute_calculator_code>method but i don't know where to use this in my gauge. Also>is the macro "c" in the xml gauge going to require me to add>more to the parameter for the execute_calculator_code method?No, execute_calculator_code is used ONLY for standard XML token variables and key_events.You would need to access the gps.dll using a similar method to the XML version. Taken as an aggregate, it involves several thousands of lines of code, which on the face of it seems a bit excessive just to obtain the 'list of nearest airports...' ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.