예제 #1
0
        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]();
            }
        }
예제 #2
0
 protected override void OnEnable()
 {
     throttleState = ThrottleState.LAUNCH;
     attitudeState = AttitudeState.LAUNCH;
     done          = false;
 }