Пример #1
0
        internal static string GetRangeStateText(RangeState rangeState, FlightStatus corridorState)
        {
            string state       = "DISARM";
            string description = string.Empty;

            switch (rangeState)
            {
            case RangeState.Nominal:
                state = "NOMINAL";
                break;

            case RangeState.Armed:
                state = "ARM";
                break;

            case RangeState.Destroyed:
                state = "DESTROYED";
                break;

            case RangeState.Safe:
                state = "SAFE";
                break;
            }
            description = FlightCorridorBase.GetFlightStatusText(corridorState);
            return(string.Format("{0}: {1}", state, description));
        }
Пример #2
0
 private void EnterSafeState(FlightStatus triggerStatus)
 {
     FlightLogger.eventLog.Add(string.Format("[{0}]: Range safety entered SAFE state: {1}", KSPUtil.PrintTimeCompact((int)Math.Floor(FlightGlobals.ActiveVessel.missionTime), false), FlightCorridorBase.GetFlightStatusText(triggerStatus)));
     State = RangeState.Safe;
 }
Пример #3
0
        private void EnterArmedState(FlightStatus triggerStatus)
        {
            FlightLogger.eventLog.Add(string.Format("[{0}]: Range safety entered ARM state: {1}", KSPUtil.PrintTimeCompact((int)Math.Floor(FlightGlobals.ActiveVessel.missionTime), false), FlightCorridorBase.GetFlightStatusText(triggerStatus)));
            State = RangeState.Armed;

            if (rangeSafetyInstance.settings.terminateThrustOnArm)
            {
                actionQueue.Enqueue(RangeActions.TerminateThrust);
            }
            if (rangeSafetyInstance.settings.destroySolids)
            {
                actionQueue.Enqueue(RangeActions.DestroySolids);
            }
            if (rangeSafetyInstance.settings.coastToApogeeBeforeAbort)
            {
                actionQueue.Enqueue(RangeActions.CoastToApogee);
            }
            if (rangeSafetyInstance.settings.abortOnArm)
            {
                actionQueue.Enqueue(RangeActions.ExecuteAbort);
            }
            if (rangeSafetyInstance.settings.delay3secAfterAbort)
            {
                actionQueue.Enqueue(RangeActions.WaitForAbortToClear);
            }
            if (rangeSafetyInstance.settings.destroyLaunchVehicle)
            {
                actionQueue.Enqueue(RangeActions.TerminateFlight);
            }
        }