Problems between orienting large ships with sas engaged
cknowles2112 opened this issue ยท 0 comments
Using stock KerbalX, get into orbit. (should be on stage 4, all external boosters gone, but the long main body in place.)
Engage sas and stability mode. Hold down the "d" key for 3 seconds. Notice that the sas light by the navball gets replaced with the "circle arrows" and that when the d key is released the skip tries to stay at the angle the key was released at.
Now, connect krpc. (using 0.4.8, and ksp 1.7.1.2539, though I'd been seeing this problem back in 1.6)
import krpc
from time import sleep
conn = krpc.connect()
conn.space_center.active_vessel.control.input_mode = conn.space_center.ControlInputMode.override
def turn():
conn.space_center.active_vessel.control.yaw = 1
sleep(3)
conn.space_center.active_vessel.control.yaw = 0
vessel = conn.space_center.active_vessel
vessel.control.sas = True
turn()
Note that this should do the same thing as the "hold d down for 3 seconds." - however, the craft never replaces the SAS light with the "circle arrows" - and the craft lumbers back to the original heading.
Now, if you change the 3 second timeout in the turn function to ~9 seconds you'll see the circle arrows.
However, if you stage the kerbal x down to stage 3 - a much more nimble turner, then the circle arrows are immediate, and things work as they would with the keyboard. The above turn function makes it turn and then stop when the yaw is zeroed
This appears to have something to do with the size/speed of turning of the vessel. But I can't quite nail down where the problem exists.