ManeuverNode() public static method

public static ManeuverNode ( double timetoexec ) : AttitudeCommand
timetoexec double
return AttitudeCommand
Example #1
0
        /// <summary>
        /// This method will be triggerd right after the command was enqueued to
        /// the flight computer list.
        /// </summary>
        /// <param name="computer">Current flightcomputer</param>
        public override void CommandEnqueued(FlightComputer computer)
        {
            var timetoexec = (TimeStamp + ExtraDelay) - RTSettings.Instance.FCLeadTime;

            if (timetoexec - RTUtil.GameTime >= 0 && RTSettings.Instance.AutoInsertKaCAlerts)
            {
                var kaCAddonLabel = computer.Vessel.vesselName + " Maneuver";

                if (RTCore.Instance != null && RTCore.Instance.KacAddon != null)
                {
                    KaCItemId = RTCore.Instance.KacAddon.CreateAlarm(RemoteTech_KACWrapper.KACWrapper.KACAPI.AlarmTypeEnum.Maneuver, kaCAddonLabel, timetoexec, computer.Vessel.id);
                }
            }

            // also add a maneuver node command to the queue
            computer.Enqueue(AttitudeCommand.ManeuverNode(timetoexec), true, true, true);
        }
Example #2
0
        /// <summary>
        /// This method will be triggerd right after the command was enqueued to
        /// the flight computer list.
        /// </summary>
        /// <param name="computer">Current flightcomputer</param>
        public override void CommandEnqueued(FlightComputer computer)
        {
            string KaCAddonLabel = String.Empty;
            double timetoexec    = (this.TimeStamp + this.ExtraDelay) - 180;

            if (timetoexec - RTUtil.GameTime >= 0 && RTSettings.Instance.AutoInsertKaCAlerts == true)
            {
                KaCAddonLabel = computer.Vessel.vesselName + " Maneuver";

                if (RTCore.Instance != null && RTCore.Instance.kacAddon != null)
                {
                    this.KaCItemId = RTCore.Instance.kacAddon.CreateAlarm(AddOns.KerbalAlarmClockAddon.AlarmTypeEnum.Maneuver, KaCAddonLabel, timetoexec);
                }
            }

            // also add a maneuver node command to the queue
            computer.Enqueue(AttitudeCommand.ManeuverNode(timetoexec), true, true, true);
        }