LTAPI
API to access LiveTraffic's aircraft information
LTAPI.h
Go to the documentation of this file.
1
29
30#ifndef LTAPI_h
31#define LTAPI_h
32
33#include <cstring>
34#include <memory>
35#include <string>
36#include <list>
37#include <map>
38#include <chrono>
39
40#include "XPLMDataAccess.h"
41#include "XPLMGraphics.h"
42
43class LTDataRef;
44class LTAPIAircraft;
45
47typedef std::shared_ptr<LTAPIAircraft> SPtrLTAPIAircraft;
48
56{
57private:
60 unsigned keyNum = 0;
62 std::string key;
63
64public:
65
87
93 public:
94 // identification
95 uint64_t keyNum = 0;
96 // position, attitude
97 float lat_f = 0.0f;
98 float lon_f = 0.0f;
99 float alt_ft_f = 0.0f;
100 float heading = 0.0f;
101 float track = 0.0f;
102 float roll = 0.0f;
103 float pitch = 0.0f;
104 float speed_kt = 0.0f;
105 float vsi_ft = 0.0f;
106 float terrainAlt_ft = 0.0f;
107 float height_ft = 0.0f;
108 // configuration
109 float flaps = 0.0f;
110 float gear = 0.0f;
111 float reversers = 0.0f;
112 // simulation
113 float bearing = 0.0f;
114 float dist_nm = 0.0f;
115
116 struct BulkBitsTy {
118 bool onGnd : 1;
119 // Lights:
120 bool taxi : 1;
121 bool land : 1;
122 bool bcn : 1;
123 bool strb : 1;
124 bool nav : 1;
125 unsigned hidden : 1;
126 bool camera : 1;
127 // Misc
128 int multiIdx : 8;
129 // Filler for 8-byte alignment
130 unsigned filler2 : 8;
131 unsigned filler3 : 32;
133
134 // V1.22 additions
135 double lat = 0.0f;
136 double lon = 0.0f;
137 double alt_ft = 0.0f;
138
139
142 { memset(&bits, 0, sizeof(bits)); }
143 };
144
148 public:
149 // identification
150 uint64_t keyNum;
151 char registration[8];
152 // aircraft model/operator
153 char modelIcao[8];
154 char acClass[4];
155 char wtc[4];
156 char opIcao[8];
157 char man[40];
158 char model[40];
159 char catDescr[40];
160 char op[40];
161 // flight data
162 char callSign[8];
163 char squawk[8];
164 char flightNumber[8];
165 char origin[8];
166 char destination[8];
167 char trackedBy[24];
168
169 // V1.22 additions, in V2.40 extended from 24 to 40 chars
170 char cslModel[40];
171
174 { memset(this, 0, sizeof(*this)); }
175 };
176
178 struct LTLights {
179 bool beacon : 1;
180 bool strobe : 1;
181 bool nav : 1;
182 bool landing : 1;
183 bool taxi : 1;
184
187 beacon(b.bcn), strobe(b.strb), nav(b.nav), landing(b.land), taxi(b.taxi){}
188 };
189
190protected:
193
195 bool bUpdated = false;
196
197public:
199 virtual ~LTAPIAircraft();
200
201 // Updates an aircraft. If our key is defined it first verifies that the
202 // key matches with the one currently available in the dataRefs.
203 // Returns false if not.
204 // If our key is not defined it just accepts anything available.
205 // Updates all fields, set bUpdated and returns true.
209 virtual bool updateAircraft(const LTAPIBulkData& __bulk, size_t __inSize);
213 virtual bool updateAircraft(const LTAPIBulkInfoTexts& __info, size_t __inSize);
215 bool isUpdated () const { return bUpdated; }
217 void resetUpdated () { bUpdated = false; }
218
222 virtual void toggleCamera ([[maybe_unused]] bool bCameraActive,
223 [[maybe_unused]] SPtrLTAPIAircraft spPrevAc) {}
224
226 void setCameraAc ();
227
228 // data access
229public:
230 std::string getKey() const { return key; }
231 // identification
232 std::string getRegistration() const { return info.registration; }
233 // aircraft model/operator
234 std::string getModelIcao() const { return info.modelIcao; }
235 std::string getAcClass() const { return info.acClass; }
236 std::string getWtc() const { return info.wtc; }
237 std::string getOpIcao() const { return info.opIcao; }
238 std::string getMan() const { return info.man; }
239 std::string getModel() const { return info.model; }
240 std::string getCatDescr() const { return info.catDescr; }
241 std::string getOp() const { return info.op; }
242 std::string getCslModel() const { return info.cslModel; }
243 // flight data
244 std::string getCallSign() const { return info.callSign; }
245 std::string getSquawk() const { return info.squawk; }
246 std::string getFlightNumber() const { return info.flightNumber; }
247 std::string getOrigin() const { return info.origin; }
248 std::string getDestination() const { return info.destination; }
249 std::string getTrackedBy() const { return info.trackedBy; }
250 // combined info
251 std::string getDescription() const;
252 // position, attitude
253 double getLat() const { return bulk.lat; }
254 double getLon() const { return bulk.lon; }
255 double getAltFt() const { return bulk.alt_ft; }
256 float getHeading() const { return bulk.heading; }
257 float getTrack() const { return bulk.track; }
258 float getRoll() const { return bulk.roll; }
259 float getPitch() const { return bulk.pitch; }
260 float getSpeedKn() const { return bulk.speed_kt; }
261 float getVSIft() const { return bulk.vsi_ft; }
262 float getTerrainFt() const { return bulk.terrainAlt_ft; }
263 float getHeightFt() const { return bulk.height_ft; }
264 bool isOnGnd() const { return bulk.bits.onGnd; }
265 LTFlightPhase getPhase() const { return bulk.bits.phase; }
266 std::string getPhaseStr() const;
267 bool isVisible() const { return !bulk.bits.hidden; }
268 // configuration
269 float getFlaps() const { return bulk.flaps; }
270 float getGear() const { return bulk.gear; }
271 float getReversers() const { return bulk.reversers; }
272 LTLights getLights() const { return bulk.bits; }
273 bool isOnCamera() const { return bulk.bits.camera; }
274 // simulation
275 float getBearing() const { return bulk.bearing; }
276 float getDistNm() const { return bulk.dist_nm; }
277 int getMultiIdx() const { return bulk.bits.multiIdx; }
278
279 // calculated
285 void getLocalCoord (double& x, double& y, double& z) const
286 { XPLMWorldToLocal(bulk.lat,bulk.lon,bulk.alt_ft*0.3048, &x,&y,&z); }
287
288public:
291 static LTAPIAircraft* CreateNewObject() { return new LTAPIAircraft(); }
292};
293
294//
295// MapLTAPIAircraft
296//
297
308typedef std::map<std::string,SPtrLTAPIAircraft> MapLTAPIAircraft;
309
314typedef std::list<SPtrLTAPIAircraft> ListLTAPIAircraft;
315
320{
321public:
332
336 std::chrono::seconds sPeriodExpsv = std::chrono::seconds(3);
337
338protected:
340 const int iBulkAc = 50;
342 std::unique_ptr<LTAPIAircraft::LTAPIBulkData[]> vBulkNum;
344 std::unique_ptr<LTAPIAircraft::LTAPIBulkInfoTexts[]> vInfoTexts;
345
346protected:
349
352
354 std::chrono::time_point<std::chrono::steady_clock> lastExpsvFetch;
355
356public:
362 int numBulkAc = 50);
363 virtual ~LTAPIConnect();
364
366 static bool isLTAvail ();
367
379 static int getLTVerNr();
380
385 static int getLTVerDate();
386
392 static bool doesLTDisplayAc ();
393
395 static int getLTNumAc ();
396
404 static bool doesLTControlAI ();
405
407 static time_t getLTSimTime ();
408
410 static std::chrono::system_clock::time_point getLTSimTimePoint ();
411
419 const MapLTAPIAircraft& UpdateAcList (ListLTAPIAircraft* plistRemovedAc = nullptr);
420
422 const MapLTAPIAircraft& getAcMap () const { return mapAc; }
423
427 SPtrLTAPIAircraft getAcByMultIdx (int multiIdx) const;
428
432
435
436protected:
444 template <class T>
445 bool DoBulkFetch (int numAc, LTDataRef& DR, int& outSizeLT,
446 std::unique_ptr<T[]> &vBulk);
447
450};
451
452
461
463protected:
464 std::string sDataRef;
465 XPLMDataRef dataRef = NULL;
466 XPLMDataTypeID dataTypes = xplmType_Unknown;
467 bool bValid = true;
468public:
469 LTDataRef (std::string _sDataRef);
470 inline bool needsInit () const { return bValid && !dataRef; }
472 bool isValid ();
474 bool FindDataRef ();
475
476 // types
478 XPLMDataTypeID getDataRefTypes() const { return dataTypes; }
480 bool hasInt () const { return dataTypes & xplmType_Int; }
482 bool hasFloat () const { return dataTypes & xplmType_Float; }
484 static constexpr XPLMDataTypeID usefulTypes =
485 xplmType_Int | xplmType_Float | xplmType_Data;
486
489 int getInt();
492 float getFloat();
494 inline bool getBool() { return getInt() != 0; }
496 int getData(void* pOut, int inOffset, int inMaxBytes);
497
499 void set(int i);
501 void set(float f);
502
503protected:
504};
505
506//
507// Sizes for version compatibility comparison
508//
509
511constexpr size_t LTAPIBulkData_v120 = 80;
514
516constexpr size_t LTAPIBulkInfoTexts_v120 = 264;
517constexpr size_t LTAPIBulkInfoTexts_v122 = 288;
520
521#endif /* LTAPI_h */
std::map< std::string, SPtrLTAPIAircraft > MapLTAPIAircraft
Map of all aircrafts stored as smart pointers to LTAPIAircraft objects.
Definition LTAPI.h:308
constexpr size_t LTAPIBulkData_v122
Size of current bulk structure.
Definition LTAPI.h:513
std::list< SPtrLTAPIAircraft > ListLTAPIAircraft
Simple list of smart pointers to LTAPIAircraft objects.
Definition LTAPI.h:314
constexpr size_t LTAPIBulkInfoTexts_v120
Size of original bulk info structure as per previous versions of LiveTraffic.
Definition LTAPI.h:516
constexpr size_t LTAPIBulkData_v120
Size of original bulk structure as per LiveTraffic v1.20.
Definition LTAPI.h:511
std::shared_ptr< LTAPIAircraft > SPtrLTAPIAircraft
Smart pointer to an LTAPIAircraft object.
Definition LTAPI.h:47
constexpr size_t LTAPIBulkInfoTexts_v240
Size of current bulk info structure.
Definition LTAPI.h:519
constexpr size_t LTAPIBulkInfoTexts_v122
Definition LTAPI.h:517
Represents one aircraft as controlled by LiveTraffic.
Definition LTAPI.h:56
std::string getKey() const
Unique key for this aircraft, usually ICAO transponder hex code.
Definition LTAPI.h:230
float getPitch() const
[°] pitch: positive up
Definition LTAPI.h:259
float getFlaps() const
flap position: 0.0 retracted, 1.0 fully extended
Definition LTAPI.h:269
bool isOnGnd() const
Is plane on ground?
Definition LTAPI.h:264
LTFlightPhase getPhase() const
flight phase
Definition LTAPI.h:265
std::string getPhaseStr() const
flight phase as string
std::string getDestination() const
destination airport (IATA or ICAO) like "FRA" or "EDDF"
Definition LTAPI.h:248
void resetUpdated()
Helper in update loop, resets bUpdated flag.
Definition LTAPI.h:217
std::string getOpIcao() const
ICAO-code of operator like "DLH".
Definition LTAPI.h:237
float getTrack() const
[°] track over ground
Definition LTAPI.h:257
LTAPIBulkInfoTexts info
textual plane's data
Definition LTAPI.h:192
void getLocalCoord(double &x, double &y, double &z) const
lat/lon/alt converted to local coordinates
Definition LTAPI.h:285
LTLights getLights() const
all plane's lights
Definition LTAPI.h:272
void setCameraAc()
Declare the aircraft the one under the camera (e.g. if your plugin is a camera plugin and now views t...
std::string getOrigin() const
origin airport (IATA or ICAO) like "MAD" or "LEMD"
Definition LTAPI.h:247
std::string getMan() const
human-readable manufacturer like "Airbus"
Definition LTAPI.h:238
double getLon() const
[°] longitude
Definition LTAPI.h:254
float getTerrainFt() const
[ft] terrain altitude beneath plane
Definition LTAPI.h:262
bool isVisible() const
aircraft visible?
Definition LTAPI.h:267
std::string getTrackedBy() const
name of channel deliverying the underlying tracking data
Definition LTAPI.h:249
std::string getModel() const
human-readable a/c model like "A321-231"
Definition LTAPI.h:239
virtual void toggleCamera(bool bCameraActive, SPtrLTAPIAircraft spPrevAc)
Called when LiveTraffic toggles its aircraft camera, override in your class to handle event.
Definition LTAPI.h:222
std::string getFlightNumber() const
flight number like "LH1113"
Definition LTAPI.h:246
virtual bool updateAircraft(const LTAPIBulkData &__bulk, size_t __inSize)
Updates the aircraft with fresh numerical values, called from LTAPIConnect::UpdateAcList()
std::string getSquawk() const
squawk code (as text) like "1000"
Definition LTAPI.h:245
float getReversers() const
reversers position: 0.0 closed, 1.0 fully opened
Definition LTAPI.h:271
LTFlightPhase
Flight phase, definition copied from LiveTraffic.
Definition LTAPI.h:67
@ FPH_TAXI
Taxiing.
Definition LTAPI.h:70
@ FPH_LIFT_OFF
Lift-off, until "gear-up" height.
Definition LTAPI.h:74
@ FPH_STOPPED_ON_RWY
Stopped on runway because ran out of tracking data, plane will disappear soon.
Definition LTAPI.h:85
@ FPH_DESCEND
Descend, more then 100ft/min descend.
Definition LTAPI.h:78
@ FPH_FLARE
Flare, when reaching "flare " height.
Definition LTAPI.h:82
@ FPH_TOUCH_DOWN
The one cycle when plane touches down, don't rely on catching it...it's really one cycle only.
Definition LTAPI.h:83
@ FPH_ROTATE
Rotating.
Definition LTAPI.h:73
@ FPH_FINAL
Final, below "gear-down" height.
Definition LTAPI.h:80
@ FPH_CRUISE
Cruising, no altitude change.
Definition LTAPI.h:77
@ FPH_UNKNOWN
used for initializations
Definition LTAPI.h:68
@ FPH_ROLL_OUT
Roll-out after touch-down until reaching taxi speed or stopping.
Definition LTAPI.h:84
@ FPH_APPROACH
Approach, below "flaps-down" height.
Definition LTAPI.h:79
@ FPH_INITIAL_CLIMB
Initial climb, until "flaps-up" height.
Definition LTAPI.h:75
@ FPH_TAKE_OFF
Group of status for take-off:
Definition LTAPI.h:71
@ FPH_CLIMB
Regular climbout.
Definition LTAPI.h:76
@ FPH_PARKED
Parked at startup position.
Definition LTAPI.h:69
@ FPH_TO_ROLL
Take-off roll.
Definition LTAPI.h:72
@ FPH_LANDING
Group of status for landing:
Definition LTAPI.h:81
float getHeightFt() const
[ft] height AGL
Definition LTAPI.h:263
std::string getModelIcao() const
ICAO aircraft type like "A321".
Definition LTAPI.h:234
float getGear() const
gear position: 0.0 retracted, 1.0 fully extended
Definition LTAPI.h:270
bool isUpdated() const
Helper in update loop to detected removed aircrafts.
Definition LTAPI.h:215
std::string getCslModel() const
name of CSL model used for actual rendering of plane
Definition LTAPI.h:242
std::string getCatDescr() const
human-readable category description
Definition LTAPI.h:240
virtual ~LTAPIAircraft()
int getMultiIdx() const
multiplayer index if plane reported via sim/multiplayer/position dataRefs, 0 if not
Definition LTAPI.h:277
std::string getAcClass() const
a/c class like "L2J"
Definition LTAPI.h:235
std::string getDescription() const
some reasonable descriptive string formed from the above, like an identifier, type,...
virtual bool updateAircraft(const LTAPIBulkInfoTexts &__info, size_t __inSize)
Updates the aircraft with fresh textual information, called from LTAPIConnect::UpdateAcList()
LTAPIBulkData bulk
numerical plane's data
Definition LTAPI.h:191
double getLat() const
[°] latitude
Definition LTAPI.h:253
bool bUpdated
update helper, gets reset before updates, set during updates, stays false if not updated
Definition LTAPI.h:195
static LTAPIAircraft * CreateNewObject()
Standard object creation callback.
Definition LTAPI.h:291
std::string getCallSign() const
call sign like "DLH56C"
Definition LTAPI.h:244
std::string getRegistration() const
tail number like "D-AISD"
Definition LTAPI.h:232
float getVSIft() const
[ft/minute] vertical speed, positive up
Definition LTAPI.h:261
float getBearing() const
[°] to current camera position
Definition LTAPI.h:275
float getDistNm() const
[nm] distance to current camera
Definition LTAPI.h:276
float getRoll() const
[°] roll: positive right
Definition LTAPI.h:258
std::string getWtc() const
wake turbulence category like H,M,L/M,L
Definition LTAPI.h:236
double getAltFt() const
[ft] altitude
Definition LTAPI.h:255
bool isOnCamera() const
is currently seen on LiveTraffic's internal camera view?
Definition LTAPI.h:273
float getSpeedKn() const
[kt] ground speed
Definition LTAPI.h:260
std::string getOp() const
human-readable operator like "Lufthansa"
Definition LTAPI.h:241
float getHeading() const
[°] heading
Definition LTAPI.h:256
Connects to LiveTraffic's dataRefs and returns aircraft information.
Definition LTAPI.h:320
fCreateAcObject * pfCreateAcObject
Pointer to callback function returning new aircraft objects.
Definition LTAPI.h:348
const MapLTAPIAircraft & getAcMap() const
Returns the map of aircraft as it currently stands.
Definition LTAPI.h:422
static int getLTNumAc()
How many aircraft does LiveTraffic display right now?
bool DoBulkFetch(int numAc, LTDataRef &DR, int &outSizeLT, std::unique_ptr< T[]> &vBulk)
fetch bulk data and create/update aircraft objects
std::unique_ptr< LTAPIAircraft::LTAPIBulkInfoTexts[]> vInfoTexts
bulk info text array for communication with LT
Definition LTAPI.h:344
std::chrono::seconds sPeriodExpsv
Definition LTAPI.h:336
MapLTAPIAircraft mapAc
THE map of aircrafts.
Definition LTAPI.h:351
static int getLTVerDate()
LiveTraffic's version date.
SPtrLTAPIAircraft getAcInCameraView() const
Returns the aircraft being viewed in LiveTraffic's camera view, if any.
static void CameraSharedDataCB(LTAPIConnect *me)
shared DataRef event notification
std::unique_ptr< LTAPIAircraft::LTAPIBulkData[]> vBulkNum
bulk data array for communication with LT
Definition LTAPI.h:342
LTAPIAircraft * fCreateAcObject()
Callback function type passed in to LTAPIConnect()
Definition LTAPI.h:331
static bool doesLTControlAI()
Does LiveTaffic control AI planes?
static bool doesLTDisplayAc()
Does LiveTraffic display aircrafts? (Is it activated?)
virtual ~LTAPIConnect()
static std::chrono::system_clock::time_point getLTSimTimePoint()
What is current simulated time in LiveTraffic (usually 'now' minus buffering period)?
static int getLTVerNr()
LiveTraffic's version number.
static time_t getLTSimTime()
What is current simulated time in LiveTraffic (usually 'now' minus buffering period)?
static bool isLTAvail()
Is LiveTraffic available? (checks via XPLMFindPluginBySignature)
LTAPIConnect(fCreateAcObject *_pfCreateAcObject=LTAPIAircraft::CreateNewObject, int numBulkAc=50)
Constructor.
const int iBulkAc
Number of aircraft to fetch in one bulk operation.
Definition LTAPI.h:340
SPtrLTAPIAircraft getAcByMultIdx(int multiIdx) const
Finds an aircraft for a given multiplayer slot.
void clearCameraInfo()
Clear camera information, ie. delcare that no aircraft is currently being viewed.
std::chrono::time_point< std::chrono::steady_clock > lastExpsvFetch
Last fetching of expensive data.
Definition LTAPI.h:354
const MapLTAPIAircraft & UpdateAcList(ListLTAPIAircraft *plistRemovedAc=nullptr)
Main function: updates map of aircrafts and returns reference to it.
Represents a dataRef and covers late binding.
Definition LTAPI.h:462
XPLMDataTypeID dataTypes
supported data types
Definition LTAPI.h:466
int getData(void *pOut, int inOffset, int inMaxBytes)
Gets dataRef's binary data.
bool hasFloat() const
Is float a supported dataRef type?
Definition LTAPI.h:482
static constexpr XPLMDataTypeID usefulTypes
Defines which types to work with to become valid
Definition LTAPI.h:484
void set(float f)
Writes a float vlue to the dataRef.
LTDataRef(std::string _sDataRef)
Constructor, set the dataRef's name.
bool hasInt() const
Is int a supported dataRef type?
Definition LTAPI.h:480
bool FindDataRef()
Finds the dataRef (and would try again and again, no matter what bValid says)
XPLMDataRef dataRef
dataRef identifier returned by X-Plane
Definition LTAPI.h:465
bool bValid
does this object have a valid binding to a dataRef already?
Definition LTAPI.h:467
XPLMDataTypeID getDataRefTypes() const
Get types supported by the dataRef.
Definition LTAPI.h:478
void set(int i)
Writes an integer value to the dataRef.
bool needsInit() const
Definition LTAPI.h:470
int getInt()
Get dataRef's integer value. Silently returns 0 if dataRef doesn't exist.
std::string sDataRef
dataRef name, passed in via constructor
Definition LTAPI.h:464
bool isValid()
Found the dataRef and it contains formats we can work with?
bool getBool()
Gets dataRef's integer value and returns if it is not zero.
Definition LTAPI.h:494
float getFloat()
Get dataRef's float value. Silently returns 0.0f if dataRef doesn't exist.
Bulk data transfer structur for communication with LTAPI.
Definition LTAPI.h:92
LTFlightPhase phase
flight phase, see LTAircraft::FlightPhase
Definition LTAPI.h:117
unsigned hidden
aircraft not visible? (remains an 'unsigned' for backward compatibility)
Definition LTAPI.h:125
float alt_ft_f
deprecated: [ft] altitude
Definition LTAPI.h:99
float track
[°] track over ground
Definition LTAPI.h:101
float gear
gear position: 0.0 retracted, 1.0 fully extended
Definition LTAPI.h:110
float terrainAlt_ft
[ft] terrain altitude beneath plane
Definition LTAPI.h:106
float pitch
[°] pitch: positive up
Definition LTAPI.h:103
float lat_f
deprecated: [°] latitude
Definition LTAPI.h:97
double lat
[°] latitude
Definition LTAPI.h:135
float reversers
reversers position: 0.0 closed, 1.0 fully opened
Definition LTAPI.h:111
unsigned filler2
Definition LTAPI.h:130
float height_ft
[ft] height AGL
Definition LTAPI.h:107
uint64_t keyNum
a/c id, usually transp hex code, or any other unique id (FLARM etc.)
Definition LTAPI.h:95
float speed_kt
[kt] ground speed
Definition LTAPI.h:104
float flaps
flap position: 0.0 retracted, 1.0 fully extended
Definition LTAPI.h:109
LTAPIBulkData()
Constructor initializes some data without defaults.
Definition LTAPI.h:141
float heading
[°] heading
Definition LTAPI.h:100
bool camera
is LiveTraffic's camera on this aircraft?
Definition LTAPI.h:126
bool strb
strobe light
Definition LTAPI.h:123
float vsi_ft
[ft/minute] vertical speed, positive up
Definition LTAPI.h:105
double alt_ft
[ft] altitude
Definition LTAPI.h:137
float lon_f
deprecated: [°] longitude
Definition LTAPI.h:98
bool taxi
taxi lights
Definition LTAPI.h:120
struct LTAPIAircraft::LTAPIBulkData::BulkBitsTy bits
Flights phase, on-ground status, lights.
bool land
landing lights
Definition LTAPI.h:121
bool nav
navigaton lights
Definition LTAPI.h:124
int multiIdx
multiplayer index if plane reported via sim/multiplayer/position dataRefs, 0 if not
Definition LTAPI.h:128
float bearing
[°] to current camera position
Definition LTAPI.h:113
float dist_nm
[nm] distance to current camera
Definition LTAPI.h:114
unsigned filler3
Definition LTAPI.h:131
float roll
[°] roll: positive right
Definition LTAPI.h:102
bool bcn
beacon light
Definition LTAPI.h:122
bool onGnd
Is plane on ground?
Definition LTAPI.h:118
double lon
[°] longitude
Definition LTAPI.h:136
Bulk text transfer structur for communication with LTAPI.
Definition LTAPI.h:147
char wtc[4]
wake turbulence category like H,M,L/M,L
Definition LTAPI.h:155
char catDescr[40]
human-readable category description
Definition LTAPI.h:159
char callSign[8]
call sign like "DLH56C"
Definition LTAPI.h:162
char squawk[8]
squawk code (as text) like "1000"
Definition LTAPI.h:163
LTAPIBulkInfoTexts()
Constructor initializes all data with zeroes.
Definition LTAPI.h:173
uint64_t keyNum
a/c id, usually transp hex code, or any other unique id (FLARM etc.)
Definition LTAPI.h:150
char opIcao[8]
ICAO-code of operator like "DLH".
Definition LTAPI.h:156
char op[40]
human-readable operator like "Lufthansa"
Definition LTAPI.h:160
char modelIcao[8]
ICAO aircraft type like "A321".
Definition LTAPI.h:153
char flightNumber[8]
flight number like "LH1113"
Definition LTAPI.h:164
char origin[8]
origin airport (IATA or ICAO) like "MAD" or "LEMD"
Definition LTAPI.h:165
char registration[8]
tail number like "D-AISD"
Definition LTAPI.h:151
char cslModel[40]
name of CSL model used for actual rendering of plane
Definition LTAPI.h:170
char man[40]
human-readable manufacturer like "Airbus"
Definition LTAPI.h:157
char trackedBy[24]
name of channel deliverying the underlying tracking data
Definition LTAPI.h:167
char destination[8]
destination airport (IATA or ICAO) like "FRA" or "EDDF"
Definition LTAPI.h:166
char acClass[4]
a/c class like "L2J"
Definition LTAPI.h:154
char model[40]
human-readable a/c model like "A321-231"
Definition LTAPI.h:158
Structure to return plane's lights status.
Definition LTAPI.h:178
bool nav
navigaton lights
Definition LTAPI.h:181
LTLights(const LTAPIBulkData::BulkBitsTy b)
Type conversion constructor.
Definition LTAPI.h:186
bool strobe
strobe light
Definition LTAPI.h:180
bool beacon
beacon light
Definition LTAPI.h:179
bool landing
landing lights
Definition LTAPI.h:182
bool taxi
taxi lights
Definition LTAPI.h:183