|
LTAPI
API to access LiveTraffic's aircraft information
|
Represents one aircraft as controlled by LiveTraffic. More...
#include <LTAPI.h>
Classes | |
| struct | LTAPIBulkData |
| Bulk data transfer structur for communication with LTAPI. More... | |
| struct | LTAPIBulkInfoTexts |
| Bulk text transfer structur for communication with LTAPI. More... | |
| struct | LTLights |
| Structure to return plane's lights status. More... | |
Public Types | |
| enum | LTFlightPhase { FPH_UNKNOWN = 0 , FPH_PARKED = 5 , FPH_TAXI = 10 , FPH_TAKE_OFF = 20 , FPH_TO_ROLL , FPH_ROTATE , FPH_LIFT_OFF , FPH_INITIAL_CLIMB , FPH_CLIMB = 30 , FPH_CRUISE = 40 , FPH_DESCEND = 50 , FPH_APPROACH = 60 , FPH_FINAL , FPH_LANDING = 70 , FPH_FLARE , FPH_TOUCH_DOWN , FPH_ROLL_OUT , FPH_STOPPED_ON_RWY } |
| Flight phase, definition copied from LiveTraffic. More... | |
Public Member Functions | |
| LTAPIAircraft () | |
| virtual | ~LTAPIAircraft () |
| virtual bool | updateAircraft (const LTAPIBulkData &__bulk, size_t __inSize) |
| Updates the aircraft with fresh numerical values, called from LTAPIConnect::UpdateAcList() | |
| virtual bool | updateAircraft (const LTAPIBulkInfoTexts &__info, size_t __inSize) |
| Updates the aircraft with fresh textual information, called from LTAPIConnect::UpdateAcList() | |
| bool | isUpdated () const |
| Helper in update loop to detected removed aircrafts. | |
| void | resetUpdated () |
Helper in update loop, resets bUpdated flag. | |
| virtual void | toggleCamera (bool bCameraActive, SPtrLTAPIAircraft spPrevAc) |
| Called when LiveTraffic toggles its aircraft camera, override in your class to handle event. | |
| void | setCameraAc () |
| Declare the aircraft the one under the camera (e.g. if your plugin is a camera plugin and now views this aircraft) | |
| std::string | getKey () const |
| Unique key for this aircraft, usually ICAO transponder hex code. | |
| std::string | getRegistration () const |
| tail number like "D-AISD" | |
| std::string | getModelIcao () const |
| ICAO aircraft type like "A321". | |
| std::string | getAcClass () const |
| a/c class like "L2J" | |
| std::string | getWtc () const |
| wake turbulence category like H,M,L/M,L | |
| std::string | getOpIcao () const |
| ICAO-code of operator like "DLH". | |
| std::string | getMan () const |
| human-readable manufacturer like "Airbus" | |
| std::string | getModel () const |
| human-readable a/c model like "A321-231" | |
| std::string | getCatDescr () const |
| human-readable category description | |
| std::string | getOp () const |
| human-readable operator like "Lufthansa" | |
| std::string | getCslModel () const |
| name of CSL model used for actual rendering of plane | |
| std::string | getCallSign () const |
| call sign like "DLH56C" | |
| std::string | getSquawk () const |
| squawk code (as text) like "1000" | |
| std::string | getFlightNumber () const |
| flight number like "LH1113" | |
| std::string | getOrigin () const |
| origin airport (IATA or ICAO) like "MAD" or "LEMD" | |
| std::string | getDestination () const |
| destination airport (IATA or ICAO) like "FRA" or "EDDF" | |
| std::string | getTrackedBy () const |
| name of channel deliverying the underlying tracking data | |
| std::string | getDescription () const |
| some reasonable descriptive string formed from the above, like an identifier, type, form/to | |
| double | getLat () const |
| [°] latitude | |
| double | getLon () const |
| [°] longitude | |
| double | getAltFt () const |
| [ft] altitude | |
| float | getHeading () const |
| [°] heading | |
| float | getTrack () const |
| [°] track over ground | |
| float | getRoll () const |
| [°] roll: positive right | |
| float | getPitch () const |
| [°] pitch: positive up | |
| float | getSpeedKn () const |
| [kt] ground speed | |
| float | getVSIft () const |
| [ft/minute] vertical speed, positive up | |
| float | getTerrainFt () const |
| [ft] terrain altitude beneath plane | |
| float | getHeightFt () const |
| [ft] height AGL | |
| bool | isOnGnd () const |
| Is plane on ground? | |
| LTFlightPhase | getPhase () const |
| flight phase | |
| std::string | getPhaseStr () const |
| flight phase as string | |
| bool | isVisible () const |
| aircraft visible? | |
| float | getFlaps () const |
| flap position: 0.0 retracted, 1.0 fully extended | |
| float | getGear () const |
| gear position: 0.0 retracted, 1.0 fully extended | |
| float | getReversers () const |
| reversers position: 0.0 closed, 1.0 fully opened | |
| LTLights | getLights () const |
| all plane's lights | |
| bool | isOnCamera () const |
| is currently seen on LiveTraffic's internal camera view? | |
| float | getBearing () const |
| [°] to current camera position | |
| float | getDistNm () const |
| [nm] distance to current camera | |
| int | getMultiIdx () const |
| multiplayer index if plane reported via sim/multiplayer/position dataRefs, 0 if not | |
| void | getLocalCoord (double &x, double &y, double &z) const |
lat/lon/alt converted to local coordinates | |
Static Public Member Functions | |
| static LTAPIAircraft * | CreateNewObject () |
| Standard object creation callback. | |
Protected Attributes | |
| LTAPIBulkData | bulk |
| numerical plane's data | |
| LTAPIBulkInfoTexts | info |
| textual plane's data | |
| bool | bUpdated = false |
| update helper, gets reset before updates, set during updates, stays false if not updated | |
Represents one aircraft as controlled by LiveTraffic.
You can derive subclasses from this class if you want to add information specific to you app. Then you would need to provide a callback function fCreateAcObject to LTAPIConnect so that you create new aircraft objects when required by LTAPIConnect.
Flight phase, definition copied from LiveTraffic.
| LTAPIAircraft::LTAPIAircraft | ( | ) |
|
virtual |
|
inlinestatic |
Standard object creation callback.
|
inline |
a/c class like "L2J"
|
inline |
[ft] altitude
|
inline |
[°] to current camera position
|
inline |
call sign like "DLH56C"
|
inline |
human-readable category description
|
inline |
name of CSL model used for actual rendering of plane
| std::string LTAPIAircraft::getDescription | ( | ) | const |
some reasonable descriptive string formed from the above, like an identifier, type, form/to
|
inline |
destination airport (IATA or ICAO) like "FRA" or "EDDF"
|
inline |
[nm] distance to current camera
|
inline |
flap position: 0.0 retracted, 1.0 fully extended
|
inline |
flight number like "LH1113"
|
inline |
gear position: 0.0 retracted, 1.0 fully extended
|
inline |
[°] heading
|
inline |
[ft] height AGL
|
inline |
Unique key for this aircraft, usually ICAO transponder hex code.
|
inline |
[°] latitude
|
inline |
all plane's lights
|
inline |
lat/lon/alt converted to local coordinates
| [out] | x | Local x coordinate |
| [out] | y | Local y coordinate |
| [out] | z | Local z coordinate |
|
inline |
[°] longitude
|
inline |
human-readable manufacturer like "Airbus"
|
inline |
human-readable a/c model like "A321-231"
|
inline |
ICAO aircraft type like "A321".
|
inline |
multiplayer index if plane reported via sim/multiplayer/position dataRefs, 0 if not
|
inline |
human-readable operator like "Lufthansa"
|
inline |
ICAO-code of operator like "DLH".
|
inline |
origin airport (IATA or ICAO) like "MAD" or "LEMD"
|
inline |
flight phase
| std::string LTAPIAircraft::getPhaseStr | ( | ) | const |
flight phase as string
|
inline |
[°] pitch: positive up
|
inline |
tail number like "D-AISD"
|
inline |
reversers position: 0.0 closed, 1.0 fully opened
|
inline |
[°] roll: positive right
|
inline |
[kt] ground speed
|
inline |
squawk code (as text) like "1000"
|
inline |
[ft] terrain altitude beneath plane
|
inline |
[°] track over ground
|
inline |
name of channel deliverying the underlying tracking data
|
inline |
[ft/minute] vertical speed, positive up
|
inline |
wake turbulence category like H,M,L/M,L
|
inline |
is currently seen on LiveTraffic's internal camera view?
|
inline |
Is plane on ground?
|
inline |
Helper in update loop to detected removed aircrafts.
|
inline |
aircraft visible?
|
inline |
Helper in update loop, resets bUpdated flag.
| void LTAPIAircraft::setCameraAc | ( | ) |
Declare the aircraft the one under the camera (e.g. if your plugin is a camera plugin and now views this aircraft)
|
inlinevirtual |
Called when LiveTraffic toggles its aircraft camera, override in your class to handle event.
| bCameraActive | True if camera is on this aircraft now, false if camera is switched off |
| spPrevAc | May point to previous aircraft under camera if switching directly from one to this; can be null |
|
virtual |
Updates the aircraft with fresh numerical values, called from LTAPIConnect::UpdateAcList()
| __bulk | A structure with updated numeric aircraft data |
| __inSize | Number of bytes returned by LiveTraffic |
|
virtual |
Updates the aircraft with fresh textual information, called from LTAPIConnect::UpdateAcList()
| __info | A structure with updated textual info |
| __inSize | Number of bytes returned by LiveTraffic |
|
protected |
numerical plane's data
|
protected |
update helper, gets reset before updates, set during updates, stays false if not updated
|
protected |
textual plane's data