public void planRoute() { MapperVicinity mv = mapperViewControl1.CurrentMapper; RoutePlanner routePlanner = mapperViewControl1.CurrentRoutePlanner; RoutePlan plan = routePlanner.planRoute(); bestHeadingLabel.Content = "Best Heading abs=" + (plan.bestHeading.HasValue ? Math.Round((double)plan.bestHeading).ToString() : "N/A") + " rel (turn)=" + (plan.bestHeading.HasValue ? Math.Round((double)plan.bestHeading).ToString() : "N/A"); closestObstacleLabel.Content = "ClosestObstacle at " + (plan.closestObstacleMeters.HasValue ? (Math.Round((double)plan.closestObstacleMeters, 2).ToString() + " m") : "N/A"); legLengthLabel.Content = "Leg Length = " + (plan.legMeters.HasValue ? (Math.Round((double)plan.legMeters, 2).ToString() + " m") : "N/A (turn only)"); timeSpentLabel.Content = plan.timeSpentPlanning.ToString(); mapperViewControl1.RedrawMap(); }