public FlightControls(Connection Connection, VesselProperty VesselProperty, FlightParameters FlightParams, CraftControls CraftControls)
        {
            connection     = Connection;
            vesselProperty = VesselProperty;
            flightParams   = FlightParams;
            craftControls  = CraftControls;

            var spaceCenter = connection.SpaceCenter();

            vessel = spaceCenter.ActiveVessel;

            var flight = vessel.Flight();

            altitudeASL = connection.AddStream(() => flight.MeanAltitude);
        }
예제 #2
0
        public static void Main()
        {
            #region Variables

            var launchSequence   = new LaunchSequence();
            var flightParamaters = new FlightParameters();
            var craftControls    = new CraftControls(connection, flightParamaters);
            var flightControls   = new FlightControls(connection, vesselProperty, flightParamaters, craftControls);

            #endregion

            Console.WriteLine("Current Vessel: {0}", vessel.Name);
            Console.WriteLine();

            LaunchSetup(flightParamaters);
            StartFueling();
            launchSequence.BeginLaunchSequence(connection, flightParamaters.SpoolEngines);

            flightControls.RollProgram();
            flightControls.GravityTurn();
            flightControls.AscentToApoapsis();
            flightControls.OrbitalInsertion();
        }