XPLMPlaneDrawState t

From X-Plane SDK
Revision as of 13:15, 15 April 2009 by Bsupnik (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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 aelerons, rudder, etc. It is not necessarily related to the actual position of the plane!

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