public Mission(MissionType type, Factory factory) { this.type = type; this.factory = factory; this.acceptedMission = new SortedSet <Troop>(); this.prereqs = new HashSet <Mission>(); this.planner = new MissionPlanner(this); switch (type) { case MissionType.Capture: solver = new CaptureMissionSolver(this); break; case MissionType.Defend: solver = new CaptureMissionSolver(this); break; case MissionType.IncSupport: solver = new ReinforceMissionSolver(this); break; case MissionType.Reinforce: solver = new ReinforceMissionSolver(this); break; case MissionType.Inc: solver = new IncreaseMissionSolver(this); break; default: break; } }
public IActionResult Results() { int numberOfDays = int.Parse(Request.Form["NumOfDays"]); int numberOfTasks = int.Parse(Request.Form["NumOfTasks"]); var newMissionPlan = new MissionPlanner(); int astronautsNeeded = newMissionPlan.GetAstronautsNeeded(numberOfDays, numberOfTasks); return(View(astronautsNeeded)); }
public void TestAstronautsNeeded() { var mission = new MissionPlanner(); var days = 3; var tasksToComplete = 1200; var result = mission.GetAstronautsNeeded(days, tasksToComplete); Assert.AreEqual(2, result); }
public MainPage() { _flightStick = new Controller.NiVekFlightStick(Dispatcher); this.InitializeComponent(); _flightRecorder = SLWIOC.Get <IFlightRecorder>(); var uasMgr = SLWIOC.Get <IConnectedUasManager>(); var missionPlanner = new MissionPlanner(uasMgr); _navigation = new LagoVista.Uas.Core.Services.Navigation(uasMgr, missionPlanner, _flightRecorder); _hudViewModel = new HudViewModel(uasMgr, _navigation, _flightRecorder, _flightStick.State); _timer = new Timer(Timer_callBack, null, 100, 100); }
public Mission(MissionType type, Factory factory) { this.type = type; this.factory = factory; this.acceptedMission = new SortedSet <Troop>(); this.maxTroopCount = 0; this.planner = new MissionPlanner(this); switch (type) { case MissionType.Capture: solver = new CaptureMissionSolver(this); break; default: break; } }
public LogAnalyzer(MissionPlanner.Utilities.LogAnalyzer.analysis analysis) { InitializeComponent(); textBox1.Text = String.Format(@"Log File {0} Size (kb) {1} No of lines {2} Duration {3} Vehicletype {4} Firmware Version {5} Firmware Hash {6} Hardware Type {7} Free Mem {8} Skipped Lines {9} ", analysis.logfile, analysis.sizekb, analysis.sizelines, analysis.duration, analysis.vehicletype, analysis.firmwareversion, analysis.firmwarehash, analysis.hardwaretype, analysis.freemem, analysis.skippedlines); foreach (var item in analysis.results) { textBox1.Text += "Test: " + item.name + " = " + item.status + " - " + item.message + "\r\n"; } }
public MAVLinkSerialPort(MissionPlanner.portproxy portproxy, int p) { // TODO: Complete member initialization this.portproxy = portproxy; this.p = p; }