RemoteTechnologiesGroup/RemoteTech — pull request #97 by Starstrider42 (2014-06-13 05:38:55+00:00)
Title: Fixed broken RCS support in flight computer

This fix for #94 works to the best of my ability to test it. By which I mean that a small probe works just fine, but [a ship using a Rockomax-64 tank](https://gist.github.com/Starstrider42/fd05d50738588066122f) to boost its moment of inertia will oscillate along the roll axis so much that it can't get a stable pointing. I have to use time warp to freeze slewing every so often. And neither test case ever fully settles down, at best draining ~0.1 RCS per second.

I think those are all bugs downstream from the torque calculation, but designing test cases is really not my strong suit. I don't know how to isolate the `GetTorque()` function from the slewing code that uses it. The vectors I get when I plug in debug statements *look* reasonable, but it also looks like, as-is, the fix may actually worsen RCS fuel use for some ship designs. And `SteerShipToward()` is too cthulhoid for me to dare analyze it at the moment.

Short version: I can't improve this code any more, but I'm not 100% sure it's ready for merging, either. Help!