public override void OnFixedUpdate() { /* update targetAPtime */ double dV = mainBody.CircVelocityAtRadius(orbit.ApR) - orbit.SwappedVelocityAtApoapsis().magnitude; targetAPtime = BurnTime(dV / 2); ThrottleState lastThrottleState = throttleState; AttitudeState lastAttitudeState = attitudeState; throttleState = throttleMapping[throttleState](); if (throttleState != lastThrottleState) { throttleMapping[throttleState](); } attitudeState = attitudeMapping[attitudeState](); if (attitudeState != lastAttitudeState) { attitudeMapping[attitudeState](); } }
protected override void OnEnable() { throttleState = ThrottleState.LAUNCH; attitudeState = AttitudeState.LAUNCH; done = false; }