API Question Docking, SetEmptyMass(), and drunken automatons.

atomicdryad

Fracking toaster
Addon Developer
Joined
Dec 25, 2010
Messages
46
Reaction score
0
Points
0
Am I correct in concluding that the reason the autopilot acts like a drunken monkey with something heavy docked, is a mass issue as well as a COG issue?

I've used ShiftCG() or SetThrusterRef() to center the RCS arrays around the COG, however, even with something (heavy) docked along the centerline, 'prograde' still swings wildly about.

I'm new to coding for Orbiter but the autopilot is acting like it's expecting a certain amount of angular acceleration from the thrusters to slow down and is overshooting the mark.

I've also noticed that GetEmptyMass() doesn't change when a ship docks, so am thinking this is the problem.

Wouldn't using SetEmptyMass, without zeroing out the docked ships, just add more 'real' mass and not solve the issue?

Is there a way to extend the default autopilot functions, or has anyone tried doing so via memory hooks?

Or am I completely off base here?
 
Did you try using "GetSuperstructureCG" (or similar) for knowing the CoG of the docked vehicles?

Docking does not change the spacecraft, but they move as one rigid body.

Changing your vessels CoG does not fix this, you need to change your thruster groups.
 
Last edited:
Yes, I used the values from GetSuperstructureCG when shifting the RCS thrusters or using shiftcg.
However, when trying to fix this via SetThrusterRef(), I only shifted to center everything based on GetSuperstructureCG - I didn't expand the distances between thrusters.

I'm able to rotate to a specific point manually, so am blaming autopilot logic :P
 
Last edited:
the autopilot acts like a drunken monkey with something heavy docked

:rofl:

Would not have said better :lol:
 
I have done manual RCS commands for vessel stacks and otherwise challenged vessels in the recent version of the Precession MFD (page Status). Press OPT, enter RCS thrust setting, use Shift - numkeys to rotate your vessel stack. No autopilot replacement yet, but definitely in the todo tray.
 
Back
Top