Transports flight data for location, attitude, configuration between the network and the main thread.
More...
#include <FlightData.h>
|
XPMPPlaneID | _modeS_id = 0 |
| key More...
|
|
std::string | icaoType |
| ICAO aircraft type according to doc8643. More...
|
|
std::string | icaoAirline |
| ICAO airline code (for model matching) More...
|
|
std::string | tailNum |
| tail number / registration, also used as special livery code (optional, for model matching) More...
|
|
std::string | callSign |
| call sign More...
|
|
std::string | label |
| label text More...
|
|
tsTy | ts |
| timestamp More...
|
|
double | lat = NAN |
| latitude More...
|
|
double | lon = NAN |
| longitude More...
|
|
double | alt_m = NAN |
| altitude in meter above ground More...
|
|
bool | bGnd = false |
| on the ground? More...
|
|
float | pitch = NAN |
| Pitch in degres to rotate the object, positive is up. More...
|
|
float | heading = NAN |
| Heading in local coordinates to rotate the object, clockwise. More...
|
|
float | roll = NAN |
| Roll to rotate the object. More...
|
|
FlightData::wakeTy | wake |
|
float | gear = NAN |
| gear down = 1.0, gear up = 0.0 More...
|
|
float | nws = NAN |
| nose wheel steering degree, 0.0 = straight ahead, negative = left More...
|
|
float | flaps = NAN |
| flaps deployed = 1.0, flaps up = 0.0 More...
|
|
float | spoilers = NAN |
| spoilers (speedbrakes) up = 1.0, down = 0.0 More...
|
|
float | reversers = NAN |
| deployment of reversers, 1.0 = fully open More...
|
|
float | thrust = NAN |
| thrust ratio, -1.0 .. 0.0 .. 1.0 More...
|
|
float | engineRpm = NAN |
| revolutions per minute of engine/rotor/prop More...
|
|
bool | bVisDefined = false |
| Has visibility been set in the data? More...
|
|
bool | bVisible = true |
| Shall plane be drawn? More...
|
|
struct FlightData::lightsTy | lights = { false, false, false, false, false, false } |
|
Transports flight data for location, attitude, configuration between the network and the main thread.
◆ FlightData::lightsTy
struct FlightData::lightsTy |
Class Members |
bool |
beacon: 1 |
beacon lights |
bool |
defined: 1 |
are lights values valid, ie. defined? |
bool |
landing: 1 |
landing lights |
bool |
nav: 1 |
navigation lights |
bool |
strobe: 1 |
strobe lights |
bool |
taxi: 1 |
taxi lights |
◆ FlightData() [1/2]
FlightData::FlightData |
( |
const std::string & |
csv | ) |
|
Constructor: Creates a FlightData object from single record CSV-style data.
◆ FlightData() [2/2]
FlightData::FlightData |
( |
const JSON_Object * |
obj | ) |
|
Constructor: Creates a FlightData object from a JSON object.
◆ AddNew()
bool FlightData::AddNew |
( |
std::shared_ptr< FlightData > && |
pFD | ) |
|
|
staticprotected |
Add a just created object to the internal list.
Performs some basic timestamp handling and validations before doing so like timestamp within grace period and sorted.
◆ FillFromRTTFC()
bool FlightData::FillFromRTTFC |
( |
const std::string & |
csv | ) |
|
|
protected |
◆ FillFromXPPTraffic()
bool FlightData::FillFromXPPTraffic |
( |
const JSON_Object * |
obj | ) |
|
|
protected |
Converts the purpose-desgined XPPTraffic JSON format.
◆ IsUsable()
bool FlightData::IsUsable |
( |
| ) |
const |
Has usable data? (Has at least position information)
◆ NANtoCopy()
void FlightData::NANtoCopy |
( |
const FlightData & |
o | ) |
|
Replace any remaining NAN
s with values from the other object.
◆ NANtoZero()
void FlightData::NANtoZero |
( |
| ) |
|
Replace any remaining NAN
s with 0.0
◆ operator XPLMDrawInfo_t()
FlightData::operator XPLMDrawInfo_t |
( |
| ) |
const |
Convert to XP's drawInfo.
◆ operator<()
bool FlightData::operator< |
( |
const FlightData & |
o | ) |
const |
|
inline |
Order is solely by timestamp.
◆ ProcessNetworkData()
bool FlightData::ProcessNetworkData |
( |
const std::string & |
s | ) |
|
|
static |
Main function to interpret network data.
Needs to distinguish between
- single record data a) in CSV style like RTTFC b) in JSON style like XPPTraffic single plane
- array data in JSON style like XPPTraffic
◆ SetTimestamp()
void FlightData::SetTimestamp |
( |
double |
tsIn | ) |
|
Set timestamp from input value.
Can be one out of three:
- If larger than 1577836800000 -> absolute Java timestamp in milliseconds
- If larger than 1577836800.0 -> absolute Unix timestamp in seconds, supports decimals
- otherwise relative timestamp NAN is handled as 0.0, ie. "now"
◆ _modeS_id
XPMPPlaneID FlightData::_modeS_id = 0 |
◆ alt_m
double FlightData::alt_m = NAN |
altitude in meter above ground
◆ bGnd
bool FlightData::bGnd = false |
◆ bVisDefined
bool FlightData::bVisDefined = false |
Has visibility been set in the data?
◆ bVisible
bool FlightData::bVisible = true |
◆ callSign
std::string FlightData::callSign |
◆ engineRpm
float FlightData::engineRpm = NAN |
revolutions per minute of engine/rotor/prop
◆ flaps
float FlightData::flaps = NAN |
flaps deployed = 1.0, flaps up = 0.0
◆ gear
float FlightData::gear = NAN |
gear down = 1.0, gear up = 0.0
◆ heading
float FlightData::heading = NAN |
Heading in local coordinates to rotate the object, clockwise.
◆ icaoAirline
std::string FlightData::icaoAirline |
ICAO airline code (for model matching)
◆ icaoType
std::string FlightData::icaoType |
ICAO aircraft type according to doc8643.
◆ label
std::string FlightData::label |
◆ lat
double FlightData::lat = NAN |
◆ lights
◆ lon
double FlightData::lon = NAN |
◆ nws
float FlightData::nws = NAN |
nose wheel steering degree, 0.0 = straight ahead, negative = left
◆ pitch
float FlightData::pitch = NAN |
Pitch in degres to rotate the object, positive is up.
◆ reversers
float FlightData::reversers = NAN |
deployment of reversers, 1.0 = fully open
◆ roll
float FlightData::roll = NAN |
Roll to rotate the object.
◆ spoilers
float FlightData::spoilers = NAN |
spoilers (speedbrakes) up = 1.0, down = 0.0
◆ tailNum
std::string FlightData::tailNum |
tail number / registration, also used as special livery code (optional, for model matching)
◆ thrust
float FlightData::thrust = NAN |
thrust ratio, -1.0 .. 0.0 .. 1.0
◆ ts
◆ wake
The documentation for this class was generated from the following files: