LTAPI

API to access LiveTraffic’s aircraft information. Data transfer from LiveTraffic to your plugin is by dataRefs in a fast, efficient way: LiveTraffic copies data of several planes combined into defined structures. LTAPI handles all that in the background and provides you with an array of aircraft information with numerical info like position, heading, speed and textual info like type, registration, call sign, flight number.

LTAPI files and Documentation

You only need to include 2 files into your own projects:

Both files include lots of comments in Doxygen style as documentation. The generated Doxygen documentation is available in docs/html/index.html or on GitHub pages.

Example Plugin Implementation

The Example folder includes an example X-Plane plugin (based on the Hello World plugin), which demonstrates the most simplistic usage as well as an enhanced way of using the API by subclassing the provided LTAPIAircraft class.

The plugin just opens two windows and shows information about LiveTraffic’s aircrafts as text.

Simple Example

…starts at around line 195 of LTAPIExample.xpp. Look for MARK: LTAPI Simple Example. It just

Enhanced Example

…starts at around line 269 of LTAPIExample.xpp. Look for MARK: LTAPI Enhanced Example. This demonstrates how to use LTAPIAircraft as a base class for some own class. Often, you have your own way of representing aircrafts in your app already. You can add LTAPIAircraft as a base class and then don’t need to copy information back and forth but have access to it right from within your own class.

For this to work you

All the rest of the code deals with the example’s functionality, which is:

Building the Example