コード例 #1
0
 public VehicleSensorManager(Vehicle v, NavigationMapManager m)
 {
     vehicle = v;
     navigationMap = m;
     realMap = navigationMap.getHazardModel();
     width = realMap.GetLength(0);
     height = realMap.GetLength(1);
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        public void simulationStepSetUp()
        {
            rover = new Vehicle(mapManager);

            simulationInProgress = true;
            stepSet = true;

            rover.startTraverse(startX,startY ,targetX,targetY);
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 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;
             }
         }
     }
 }