Jump to content
Sign in to follow this  
mcp5500

Reading NRST airports using offset 0658

Recommended Posts

Can someone help me understand how I can extract this table in Linda's lua action.lua file. I want to display the 6 nearest airports in a Lua display.

 

0658 [120 bytes]

This area provides a table of data about the 6 nearest airports to
the user aircraft, in order nearest to furthest.
This works properly in FSX with Acceleration, and should work
okay in SP2 versions. It should also work in P3D. 1.4.
Each entry is 20 bytes long, consisting of 4 fields as follows:
0 4 bytes ICAO ID of the aircraft. If this is 3 characters only
the 4th will be zero.
4 4 bytes Latitude of the airport, in degrees, as a 32-bit
Float (N positive, S negative).
8 4 bytes Longitude of the airport, in degrees, as a 32-bit
Float (E positive, W negative).
12 4 bytes Altitude of the airport, in feet, as a 32-bit Float.
Intl N/A
16 4 bytes Distance from the user aircraft, in nm.
It is only updated when the user aircraft's Latitude or Longitude
change by one minute or more. If there are less than 6 airports
within the current "reality bubble" the unused entries will be all
zero.
06D0 144 Area

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...