Jump to content

GetPotentialTorque : what is the output ?


Recommended Posts

Hi all !

I'm trying to get the actual pitch, roll and yaw available torque of some ModuleRCS, to have values that I can compare to ModuleReactionWheel.(pitch/roll/yaw)Torque values.

Seems that ITorqueProvider.GetPotentialTorque(out Vector3 pos, out Vector3 neg) can get get me here. They obviously aren't torque vectors and looking at the output for reaction wheels, they seems to represent the final available torque in the six control directions : pos = ( positive pitch, positive roll, positive yaw), neg = ( negative pitch, negative roll, negative yaw).

However, for the RCS modules, the output of GetPotentialTorque seems to be in relation to the part orientation (or something else ?). My understanding of 3d geometry/maths is not great so maybe I missed something, but I can't find a way to retrieve back the available pitch/roll/yaw torque from the function output.

EDIT :

Seems that there is a bug in 1.2.x with ModuleRCS.GetPotentialTorque, the values returned are wrong according to @djungelorm in https://github.com/krpc/krpc/issues/354

Can someone confirm ? Is there a workaround (beside recalculating everything using the thrust transforms and thrust power...) ?

 

Edited by Gotmachine
Link to comment
Share on other sites

I can't answer your question directly but you might look at the source for RCS Build aid:

m4v's doing it somehow and you might be able to find the answer in the code....

Edited by wasml
Link to comment
Share on other sites

Yup, I already tough of looking at how RCS Build Aid do it, and it does find the torque output by doing all the calculations from the rcs module base info. I want to avoid doing that if possible because that's a bit heavy and complex for me.

RCS Build Aid do not have access to the game physics calculations because they don't exist in the editor, so it has no other choice. Its results also doesn't account for some parameters, like the atmospheric ISP curve.

But thanks anyway :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...