XPLM_API void       XPLMInstanceSetPosition(
                         XPLMInstanceRef      instance,
                         const XPLMDrawInfo_t * new_position,
                         const float *        data);

Updates both the position of the instance and all datarefs you registered for it. Call this from a flight loop callback or UI callback.

DO_NOT call XPLMInstanceSetPosition from a drawing callback; the whole point of instancing is that you do not need any drawing callbacks. Setting instance data from a drawing callback may have undefined consequences, and the drawing callback hurts FPS unnecessarily.

The memory pointed to by the data pointer must be large enough to hold one float for every dataref you have registered, and must contain valid floating point data.

BUG: before X-Plane 11.50, if you have no dataref registered, you must still pass a valid pointer for data and not null.