Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

xPilot dataref behavior issue tied to CSLs (HotStart Challenger 650)


Robert Jahelka
 Share

Recommended Posts

Robert Jahelka
Posted
Posted

Hello!

I'm working on a CSL for the CL60 (HotStart Challenger) and I'm having an issue tying up animations.  After some research it looks like there could be a dataref issue. It looks like some of that is on HotStart's side, but I'm wondering if we can see if it's possible to update xPilot to accomidate some of these dataref's that the challenger is using currently:

  • libxplanemp/controls/flap_ratio

From our research it looks like xPilot is pulling from: "sim/flightmodel/controls/flaprat", DataRef::FlapRatio

CL650 writes to "sim/cockpit2/controls/flap_handle_deploy_ratio" which seems more logical given the other datarefs?  Maybe we can tie this up on the xPilot side!

  • libxplanemp/controls/spoiler_ratio

From our research it looks like the Challenger is pushing information to  "sim/cockpit2/controls/speedbrake_ratio", DataRef::SpeedbrakeRatio, however I'm having issues getting this animation to work from that dataref.
 

Thanks for any assistance!

Link to comment
Share on other sites

Justin Shannon
Posted
Posted

Hi Robert,

The libxplanemp/controls/flap_ratio dataref is used internally by xPilot to control the flap ratio on the aircraft object. There are many other datarefs that xPilot supports, you can find a list here: https://twinfan.github.io/XPMP2/CSLdataRefs.html

The sim/flightmodel/controls/flaprat dataref is for the user's own plane, not for other aircraft objects being rendered in the sim. This dataref value is sent across the network for other pilot clients to interpret to adjust the aircraft surfaces on the object rendered in the sim (like the flap ratio, gear ratio, lights, etc.).

If you look at an existing CLS object (such as a Bluebell model), you can see where the flap_ratio dataref is defined. It's up to you (as the object creator) to add these animations so that xPilot (and other X-Plane pilot clients) can set the values of these datarefs to control the aircraft object surfaces (i.e. flap ratio, gear ratio, etc.). https://github.com/oktal3700/bluebell/blob/main/BB_Boeing/B737/B737_SWA.obj#L3782

Also, if you haven't found it already, Laminar has the OBJ8 file format specification published here: https://developer.x-plane.com/article/obj8-file-format-specification/

Controller (C3), Los Angeles ARTCC
Developer: xPilot, vATIS

Link to comment
Share on other sites

 Share