Textual aircraft and flight information is provided via
shared dataRefs
of type xplmType_Data
as suggested by FSTramp.
This information is offered to 3rd party plugins,
which want to show (information of) AI planes like camera or map plugins.
DRE and DRT are informed about these dataRef names as soon as the first aircraft is created. So you can use either to have a peek.
The names of the shared dataRefs follow the naming conventions known from pre-XP11.50 times when there were just 19 multiplayer planes support with similarly named dataRefs for position and configuration information. For each plane there is a set of dataRefs, each dataRef contains up to 40 byte data to be interpreted as a zero-terminated C string.
XPMP2 creates and maintains up to 63 sets of these dataRefs, starting at
sim/multiplayer/position/plane1_tailnum
and ending at
sim/multiplayer/position/plane63_apt_to
.
If you want to pubish information in your XPMP2-based plugin via these channels,
then fill the appropriate field in the XPMP2::Aircraft::acInfoTexts
structure.
sim/multiplayer/position/... |
acInfoTexts. |
Meaning |
---|---|---|
plane#_tailnum |
tailNum |
Tail number, registration |
plane#_ICAO |
icaoAcType |
ICAO Aircraft type |
plane#_manufacturer |
manufacturer |
Aircraft manufacturer, human readable |
plane#_model |
model |
Aircraft model, human readable |
plane#_ICAOairline |
icaoAirline |
ICAO airline/operator code |
plane#_airline |
airline |
Airline/operator |
plane#_flightnum |
flightNum |
Flight number |
plane#_apt_from |
aptFrom |
Origin airport |
plane#_apt_to |
aptTo |
Destination airport |
plane#_cslModel |
n/a | CSL Model name *) |
*) _cslModel
differs from the others in that it is not related to live flight
information but to the way the plane is rendered by the XPMP2-based plugin.
It returns the CSL model used as returned by XPMP2::Aircraft::GetModelName()
,
that is: last folder name plus model id.
A plugin that wants to use this data
63 * 9 = 567
datarefs by
XPLMShareData
,XPLMFindDataRef
;XPLMGetDatab
as usual.
Provide at least a 40 character buffer to be on the safe side.