6 #ifndef SWIFT_SIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
7 #define SWIFT_SIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
17 #include "plugins/simulator/fsxcommon/simconnectwindows.h"
19 namespace swift::misc::aviation
23 namespace swift::simplugin::fsxcommon
114 strncpy_s(
atcId, c, 10);
132 std::fill(
atcId,
atcId + 10,
static_cast<byte>(0));
162 void setAllEngines(
bool on);
165 void setEngine(
int number1based,
bool on);
168 void resetAllFlaps();
171 void resetSpoilers();
174 void resetToInvalid();
240 std::fill(
data,
data + 128,
static_cast<byte>(0));
274 DataOwnAircraftTitle,
275 DataRemoteAircraftLights,
276 DataRemoteAircraftPartsWithoutLights,
282 DataTransponderModeMSFS,
287 DataClientAreaSbRunning
294 RequestOwnAircraftTitle,
307 SimObjectPositionData,
315 static const QString &requestToString(Request request);
318 static const QString &simObjectRequestToString(SimObjectRequest simObjectRequest);
324 static HRESULT initDataDefinitionsWhenConnected(
const HANDLE hSimConnect,
329 static HRESULT initOwnAircraft(
const HANDLE hSimConnect);
332 static HRESULT initRemoteAircraft(
const HANDLE hSimConnect);
335 static HRESULT initRemoteAircraftSimData(
const HANDLE hSimConnect);
338 static HRESULT initRemoteAircraftSimDataSet(
const HANDLE hSimConnect);
341 static HRESULT initSimulatorEnvironment(
const HANDLE hSimConnect);
344 static HRESULT initSbDataArea(
const HANDLE hSimConnect);
347 static HRESULT initMSFSTransponder(
const HANDLE hSimConnect);
350 static HRESULT initMSFS2024Transponder(
const HANDLE hSimConnect);
Value object encapsulating information about aircraft's lights.
Value object encapsulating information of aircraft's parts.
Simple hardcoded info about the corresponding simulator.
Handles SimConnect data definitions.
SimObjectRequest
SimObject requests used for AI aircraft and probes.
@ SimObjectBaseId
base id without specific request
Request
SimConnect request IDs.
@ RequestMSFSTransponder
MSFS XPDR mode/ident.
@ RequestSbData
SB client area / XPDR mode.
DataDefiniton
SimConnect definiton IDs.
@ DataRemoteAircraftSetData
set model data such as airline
@ DataClientAreaSbConnected
SB connected with network 0x7b81/1.
@ DataRemoteAircraftSetPosition
the position which will be set
@ DataClientAreaSb
whole SB area, see http://squawkbox.ca/doc/sdk/fsuipc.php
@ DataRemoteAircraftModelData
model data eventually used and reported back from simulator
@ DataClientAreaSbIdent
SB ident single value 0x7b93/19.
@ DataRemoteAircraftGetPosition
get position to evaluate altitude / AGL
@ DataClientAreaSbStandby
SB standby 0x7b91/17.
#define FSXCOMMON_EXPORT
FSXCommon Export Macro.
ClientAreaId
Client areas.
byte data[128]
128 bytes of data, offsets
byte getIdent() const
Ident = 1, else 0.
bool isStandby() const
Standby.
void setConnected(bool connected)
Mark as connected with network.
byte getTransponderMode() const
Standby = 1, else 0.
bool isIdent() const
Ident?
void setDefaultValues()
Set default values.
void setRunning(bool running)
SB is running.
QString toQString() const
Values.
Data structure for MSFS transponder mode information.
double transponderMode
transponder state simvar
Data struct of our own aircraft.
double rotationVelocityBodyX
Rotation Velocity Body X.
double lightBeacon
Is beacon light on?
double lightNav
Is nav light on?
double velocity
Ground velocity.
double lightLogo
Is logo light on?
double velocityWorldY
Velocity World Y.
double com2ActiveMHz
COM2 active frequency.
double engine2Combustion
Engine 2 combustion flag.
double latitudeDeg
Latitude (deg)
double simOnGround
Is aircraft on ground?
double altitudeFt
Altitude (ft)
double comTransmit1
COM1 transmit, means also receiving.
double comReceiveAll
all COMs receiving, or COM:x transmitting or receiving
double comStatus1
COM1 status.
double comStatus2
COM2 status.
double comTransmit2
COM2 transmit, means also receiving.
double flapsHandlePosition
Flaps handle position in percent.
double com2StandbyMHz
COM2 standby frequency.
double elevationFt
Elevation (ft)
double pressureAltitudeM
Pressure altitude (m)
double trueHeadingDeg
True heading (deg)
double rotationVelocityBodyZ
Rotation Velocity Body Z.
double spoilersHandlePosition
Spoilers out? (flag)
double velocityWorldX
Velocity World X.
double comTest1
COM1 test.
double rotationVelocityBodyY
Rotation Velocity Body Y.
double com1ActiveMHz
COM1 active frequency.
double lightLanding
Is landing light on?
double engine1Combustion
Engine 1 combustion flag.
double pitchDeg
Pitch (deg)
double altitudeAGLFt
Altitude above ground (ft)
double lightTaxi
Is taxi light on?
double numberOfEngines
Number of engines.
double velocityWorldZ
Velocity World Z.
double cgToGroundFt
Static CG to ground (ft)
double com1StandbyMHz
COM1 standby frequency.
double engine4Combustion
Engine 4 combustion flag.
double longitudeDeg
Longitude (deg)
double gearHandlePosition
Gear handle position (flag)
double comTest2
COM2 test.
double engine3Combustion
Engine 3 combustion flag.
double lightStrobe
Is strobe light on?
double transponderCode
Transponder Code.
double altitudeCalibratedFt
Altitude without temperature effect (ft, FS2020)
Data struct of aircraft position.
char title[256]
Aircraft model string.
Data for AI object and probe sent back from simulator.
bool isOnGround() const
Above ground ft.
double elevationFt
Elevation (ft)
double aboveGroundFt() const
Above ground ft.
double cgToGroundFt
Static CG to ground (ft)
double latitudeDeg
Latitude (deg)
double altitudeFt
Altitude (ft)
double longitudeDeg
Longitude (deg)
double lightBeacon
Is beacon light on?
double lightStrobe
Is strobe light on?
double lightLanding
Is landing light on?
double lightCabin
Is cabin light on.
double lightRecognition
Is recognition light on.
double lightLogo
Is logo light on?
double lightTaxi
Is taxi light on?
double lightNav
Is nav light on?
Data struct of aircraft model data.
char atcFlightNumber[8]
flight number (168)
char title[256]
Aircraft model string.
double cgToGroundFt
Static CG to ground (ft)
char atcAirlineNumber[64]
airline number
Data struct of remote aircraft parts.
double engine2Combustion
Engine 2 combustion flag.
double engine1Combustion
Engine 1 combustion flag.
double flapsLeadingEdgeLeftPercent
Leading edge left in percent 0..1.
double flapsLeadingEdgeRightPercent
Leading edge right in percent 0..1.
double flapsTrailingEdgeLeftPercent
Trailing edge left in percent 0..1.
double engine3Combustion
Engine 3 combustion flag.
double gearHandlePosition
Gear handle position.
double spoilersHandlePosition
Spoilers out?
double engine4Combustion
Engine 4 combustion flag.
double flapsTrailingEdgeRightPercent
Trailing edge right in percent 0..1.
Data struct of aircraft data (setable)
void copyAtcId(const char *c)
Copy the strings, length from docu.
char atcAirline[64]
Airline used by ATC.
void copyFlightNumber(const char *c)
Copy the strings, length from docu.
char atcFlightNumber[8]
Flight Number used by ATC.
void copyAtcAirline(const char *c)
Copy the strings, length from docu.
char atcId[32]
ID used by ATC.
void setDefaultValues()
Set default values.