XPLMPlaneDrawState_t

This structure contains additional plane parameter info to be passed to draw plane. Make sure to fill in the size of the structure field with sizeof(XPLMDrawPlaneState_t) so that the XPLM can tell how many fields you knew about when compiling your plugin (since more fields may be added later).

Most of these fields are ratios from 0 to 1 for control input. X-Plane calculates what the actual controls look like based on the .acf file for that airplane. Note for the yoke inputs, this is what the pilot of the plane has commanded (post artificial stability system if there were one) and affects ailerons, rudder, etc. It is not necessarily related to the actual position of the plane’s surfaces!

typedef struct {
     // The size of the draw state struct.
     int                       structSize;
     // A ratio from [0..1] describing how far the landing gear is extended.
     float                     gearPosition;
     // Ratio of flap deployment, 0 = up, 1 = full deploy.
     float                     flapRatio;
     // Ratio of spoiler deployment, 0 = none, 1 = full deploy.
     float                     spoilerRatio;
     // Ratio of speed brake deployment, 0 = none, 1 = full deploy.
     float                     speedBrakeRatio;
     // Ratio of slat deployment, 0 = none, 1 = full deploy.
     float                     slatRatio;
     // Wing sweep ratio, 0 = forward, 1 = swept.
     float                     wingSweep;
     // Thrust power, 0 = none, 1 = full fwd, -1 = full reverse.
     float                     thrust;
     // Total pitch input for this plane.
     float                     yokePitch;
     // Total Heading input for this plane.
     float                     yokeHeading;
     // Total Roll input for this plane.
     float                     yokeRoll;
} XPLMPlaneDrawState_t;