public VehicleSensorManager(Vehicle v, NavigationMapManager m) { vehicle = v; navigationMap = m; realMap = navigationMap.getHazardModel(); width = realMap.GetLength(0); height = realMap.GetLength(1); }
public void startSimulationDSTAR(int startX, int startY, int endX, int endY) { rover = new Vehicle(mapManager); System.Diagnostics.Stopwatch sw = System.Diagnostics.Stopwatch.StartNew(); rover.traverseMapDstar(startX, startY, endX, endY); sw.Stop(); rover.generatePathImage(); steps = rover.getSteps(); imageSource = rover.getPathImage(); timeTaken = sw.Elapsed.TotalSeconds + " Seconds"; stepTraverseStarted = false; }
public void simulationStepSetUp() { rover = new Vehicle(mapManager); simulationInProgress = true; stepSet = true; rover.startTraverse(startX,startY ,targetX,targetY); }
public void runCompareSimulation() { if (rover.reachedTarget()) { compareRover = new Vehicle(mapManager); compareRover.fullEnvironment(); compareRover.traverseCompare(startX, startY, targetX, targetY); compareRoverD = new Vehicle(mapManager); compareRoverD.fullEnvironment(); compareRoverD.traverseMapDstar(startX, startY, targetX, targetY); likenessDknownToA = comparePaths(compareRover.getPathPoints(), compareRoverD.getPathPoints()); likenessDunknownToA = comparePaths(compareRover.getPathPoints(), rover.getPathPoints()); likenessDunknownToDknown = comparePaths(compareRoverD.getPathPoints(), rover.getPathPoints()); compareCompleted = true; } }
public void nextStep(int startX , int startY , int endX , int endY) { if (pathGenerated == false) { if (stepTraverseStarted == false) { rover = new Vehicle(mapManager); rover.startTraverse(startX, startY, endX, endY); stepTraverseStarted = true; } else { rover.traverseMapDStep(); imageSource = rover.getPathImage(); if (rover.reachedTarget()) { pathGenerated = true; } } } }