Bug #554
RCS rotation control are not linear
0%
Description
The current RCSModule implementation has some problem with rotation thrust.
The main one is that RCS block far away from the center of mass do a full thrust even if you set the control for at low value. It makes it harder to do fine maneuver with RCS.
The other one is that since all RCS don't do the same thrust at the same level of input, it s hard for an addon to know how much torque you can generate from a given control input.
From what I gathered FixedUpdate for ModuleRCSPerso do something like :
Vector inputPRY = base.vessel.ReferenceTransform.rotation * new Vector3(base.vessel.ctrlState.pitch, base.vessel.ctrlState.roll, base.vessel.ctrlState.yaw);
Vector neededForce = Vector3.Cross(this.inputPRY, base.part.transform.position - (base.vessel.CoM + base.vessel.rb_velocity * Time.deltaTime));
for (int j = 0; j < this.thrusterTransforms.Count; j++)
{
if (this.thrusterTransforms[j].position != Vector3.zero)
{
this.thrustForces[j] = Mathf.Max(Vector3.Dot(this.thrusterTransforms[j].up, this.neededForce), 0f);
...
Since the distance to the center of mass is not normalized then a RCS block at a distance of 10 will do a full thrust with an input of 0.1. The angle between the input vector and the part position does change the thrust too, but it shouldn't (I think)
I think it would be a lot better with this change :
Vector neededForce = inputPRY.magnitude * Vector3.Cross(inputPRY, base.part.transform.position - (base.vessel.CoM + base.vessel.rb_velocity * Time.deltaTime)).normalized;
With this all RCS thrust are linear with the input. Fine control are finer and Addon dev are happier :)
(I hope my english is clear enough ... )
History
#1 Updated by TriggerAu over 8 years ago
- Status changed from New to Needs Clarification
#2 Updated by sarbian over 8 years ago
- Status changed from Needs Clarification to Not a Bug
- % Done changed from 0 to 100
No relevant anymore with the current state of RCS