Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command horizontal and vertical throttles #308

Closed
IanOMHiggins opened this issue Aug 3, 2023 · 3 comments
Closed

Command horizontal and vertical throttles #308

IanOMHiggins opened this issue Aug 3, 2023 · 3 comments

Comments

@IanOMHiggins
Copy link

IanOMHiggins commented Aug 3, 2023

Hello,

I wish to fly the BETA eVTOL while manually control the vertical throttle with python3. This can be done with a joystick, but I see no writable dataref for this. I could control each propeller with a quadrotor dynamics controller, but I would ideally like to only alter the "Throttle Vertical" just like the joystick can do. Is this possible?

Thanks
Ian

@YovanDharwal
Copy link

YovanDharwal commented Aug 5, 2023

Hi @IanOMHiggins you can use ''sim/cockpit2/engine/actuators/throttle_ratio_all '' to send throttle command one by one. You can define number of motors throttleRatios[0] = 0.5; //
// throttleRatios[1] = 0.5;
// throttleRatios[2] = 0.1;
// throttleRatios[3] = 0.1;
0 for 1st motor and so on. Are you able to give throttle to your VTOL motors manually using joystick??

@IanOMHiggins
Copy link
Author

IanOMHiggins commented Aug 9, 2023

Hi, when I said 'manually', I actually meant 'through code' (I am using joystick input to inform my python api calls, bypassing xplane's joystick reader).

Your answer is exactly what I was looking for! (well actually I used 'sim/cockpit2/engine/actuators/throttle_ratio' instead of 'sim/cockpit2/engine/actuators/throttle_ratio_all'). Interestingly, the 'sim/cockpit2/engine/actuators/throttle_ratio' DREF has four separate values for "vertical throttle", but they are always identical, even when the four engines are different speeds (due to roll/pitch commands, etc). Setting all four at once to the same value still allows the stick commands to provide roll/pitch moments, which is the exact behavior I desire. Thanks very much!

@YovanDharwal
Copy link

if values are identical that means its just for lift throttle(if you know the flight dynamics you will understand)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants