Jump to content

Recommended Posts

Posted

I am building a motor driven cyclic to provide variable centering torque and trim position, and one of the key goals is to have the stick follow the co-pilot stick when the co-pilot is flying (either when 'autopilot' or in multiplayer) - in the real Huey the two sticks are mechanically linked so the always follow each other, and linking them in the game means that way when you take back control the stick is already in the right place. However I have not been able to find any exportable data for the stick position.

(This may be specific to the Huey, I'm not sure, but I imagine the it should probably be common to all aircraft)

The list_cockpit_params() lua function returns BASE_SENSOR_STICK_PITCH_POS and BASE_SENSOR_STICK_ROLL_POS, but it is just a reflection of the pilot stick input - when in 'autopilot' it continues emitting the pilot stick input position (ie. my joystick position), not the copilot stick position that is actually controlling the aircraft. When you show the control positions overlay, it is the position of the white copilot diamond I want, not the one that moves with my own stick.

This data is obviously there somewhere as it is used to display on the controls overlay and also used to animate the cyclic position when in 'autopilot' mode - the question is, is it accessible from a lua script?

Any ideas, anyone?

Posted (edited)

I don't have an FFB device. Didn't DCS have a native FFB feature (at least for cyclic)? Were they not enough to achieve the goal?

if you can only use telemetry:

Use GetDevice(deviceID):get_argument_value(arg) to read those values:

mainpanel_init.lua
  Controlls Pilot
  ├── [184] -- rudder
  ├── [187] -- stick_roll
  ├── [186] -- stick_pitch
  └── [200] -- collective_position
  Controlls CoPilot
  ├── [185] -- rudder_add
  ├── [191] -- stick_roll_sec
  ├── [190] -- stick_pitch_sec
  └── [207] -- collective_position_operator

there is no autopilot pre-defined. and not sure if AP will alter those values. Test it first, and if it does, you don't have to do extra work add AP back to the arg table.

Spoiler

In ControlsIndicator_page.lua

AP labelled as stick_pitch_AP, stick_roll_AP , collective_AP, rudder_AP if you want make AP accessible, add those to the mainpanel_init as instrument argument , It will break IC

 

Edited by Insonia
  • Thanks 1
Posted

@Insonia you, Sir, are a saviour! Took me a while to figure out what the deviceID needed to be (simply 0) and then it worked a charm. I hadn't realised all those data points were accessible in that way so thanks a mil!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...