Jump to content

ModuleReactionWheel - torque values?


Ratzap

Recommended Posts

I'm trying to read the charge use of a reaction wheel but the information returned from the module appear to be static. Charge use should be the sum of torque being produced in the 3 axes multiplied by the rate given. Ie

ModuleResource r = rWheel.inputResources;

if (rWheel.State == ModuleReactionWheel.WheelState.Active)

double chargeUse = r.rate * (rWheel.PitchTorque +rWheel.RollTorque + rWheel.YawTorque);

However all I get back is the maximum possible. There don't appear to be any other variables in ModuleReactionWheel I could query, so my question would be does anyone know where (if anywhere) that information would be stored? If I used FlightCtrlState.pitch/yaw/roll I can't use sure that the reaction wheel in question is actually doing anything or do all wheels react on heading changes if they are active?

Link to comment
Share on other sites

Actual charge used when applying controls to a test ship looks correct, there just doesn't seem to be any way to get those values. Is that something for the bugtrack site or contact the devs somehow?

ModuleAlternator has a problem reporting it's charge generation too. There's a bug http://bugs.kerbalspaceprogram.com/issues/727 saying it always generates but what I'm seeing is it always reports that it is generating 1 charge but that is not being delivered to the vessel. So it's a bit like the bug was fixed giving constant charge but the outputResources list is not being updated (the alternator doesn't have an on/off state either). I can work round that by querying the state of the engine module on the same part I hope.

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