Exemplo n.º 1
0
        public NodePlanningResult PlanNode(Operation op, TimeReference timeRef, double leadingTime, double newPeA, double newApA, double newInc, double courseCorrectFinalPeA, double moonReturnAltitude, double interceptInterval, bool planLast = false)
        {
            NodePlanningResult result = new MechJebModuleManeuverPlanner.NodePlanningResult();

            result.Success = true;
            var UT = DoChooseTimeGUI(op, timeRef, out result.TimeError, false, leadingTime);

            if (result.TimeError == "" && CheckPreconditions(vessel.GetPatchAtUT(UT), UT, op, newPeA, newApA, newInc))
            {
                MakeNodeForOperation(vessel.GetPatchAtUT(UT), UT, op, newPeA, newApA, newInc, courseCorrectFinalPeA, moonReturnAltitude, interceptInterval);
            }
            else
            {
                result.Success = false;
            }
            result.Error   = errorMessage;
            errorMessage   = "";
            result.Success = (result.Success == true && result.Error == "" && result.TimeError == "");
            return(result);
        }
 public NodePlanningResult PlanNode(Operation op, TimeReference timeRef, double leadingTime, double newPeA, double newApA, double newInc, double courseCorrectFinalPeA, double moonReturnAltitude, double interceptInterval, bool planLast = false)
 {
     NodePlanningResult result = new MechJebModuleManeuverPlanner.NodePlanningResult();
     result.Success = true;
     var UT = DoChooseTimeGUI(op, timeRef, out result.TimeError, false, leadingTime);
     if (result.TimeError == "" && CheckPreconditions(vessel.GetPatchAtUT(UT), UT, op, newPeA, newApA, newInc)) {
        			MakeNodeForOperation(vessel.GetPatchAtUT(UT), UT, op, newPeA, newApA, newInc, courseCorrectFinalPeA, moonReturnAltitude, interceptInterval);
     }
     else {
         result.Success = false;
     }
        		result.Error = errorMessage;
        		errorMessage = "";
        		result.Success = (result.Success == true && result.Error == "" && result.TimeError == "");
     return result;
 }