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...