Jump to content

[Answered] RCS: How to determine thrust?


Recommended Posts

As I've just started messing around with addon development, I stumbled across a few confusing things regarding RCS. What bugs me most is how to get the available thrust of an RCS port.

Is it "ModuleRCS.thrusterPower" or do I need to use "ModuleRCS.thrustForces"? What's the difference between these two class members? I know that the latter is a list, but a list of what?

For now I've been using thrusterPower, and it does seem to work. Nevertheless I'm not certain if the number output by this is really the thrust, or something related to it (as power would imply unit of Watt instead of Newtons).

Thanks in advance.

Edited by soulsource
Link to comment
Share on other sites

Forces is a list of transform that define the direction the RCS module can thrust. To get the vector of thurst you use the transform .up component. This vector is in world space

For the stock 4 way RCS you have 4 transforms, for the one way RCS you have only 1, ...

thrusterPower is the power those thruster can give. Thrust in KSP is in kilo Newton.

Have a look at how it's done in MJ : https://github.com/MuMech/MechJeb2/blob/master/MechJeb2/VesselState.cs#L356-L374

(the InverseTransformDirection transform the vector in a coordinate system local to the ship)

Link to comment
Share on other sites

Thanks for the answer!

I've been looking at the MechJeb source, and I'm sorry to correct you, but the list of transforms representing the thrust directions is named ModuleRCS.thrusterTransforms. Nevertheless, by pointing me towards MechJeb, you gave me the crucial hint that allowed me to find out what ModuleRCS.thrustForces is.

So, to sum up:

ModuleRCS.thrusterTransforms is a list of transforms, where the .up component gives the thrust direction in world space.

ModuleRCS.thrusterPower is the maximum thrust that each of the nozzles can give in kN

ModuleRCS.thrustForces is a list of current thrust values.

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