UBCSailbot / raye-global-pathfinding

UBC Sailbot's Global Pathfinding Repository: A* pathfinding that creates sailing paths with minimized length and desirable wind speeds throughout.
MIT License
5 stars 1 forks source link

Add option for hardcoded latlons to be sent #64

Closed tylerlum closed 2 years ago

tylerlum commented 2 years ago

Exact waypoints (start around Kits Yacht club, waypoints about 20-30km apart)

49.275202, -123.160124 (near shore)

49.212129, -123.307560 (near Iona)

49.059004, -123.494778 (closer to island)

In here:

      auto result = run_pathfinder(planet, start_vertex, end_vertex, weather_factor, generate_new_grib, file_name,
                                   time_steps, use_csvs, output_csvs_folder, silent, verbose);

      if (vm.count("table")) {
        std::vector<std::pair<double, double>> waypoints;
        waypoints = PathfinderResultPrinter::GetVector(planet, result);
        try {
          connection.SetWaypointValues(waypoints);
          connection.Disconnect();
        }
        catch(NetworkTable::TimeoutException){
          std::cout << "Could not set waypoint values" << std::endl;
        }
      } else {
        std::cout << PathfinderResultPrinter::PrintKML(planet, result, weather_factor, file_name, time_steps, use_csvs, output_csvs_folder, pointToPrint, preserveKml);

Add something to replace waypoints = PathfinderResultPrinter::GetVector(planet, result); with something hardcoded.