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

Added exponential scaling to weather factor to account for different planet sizes #63

Closed kpfgallagher closed 2 years ago

kpfgallagher commented 2 years ago

Previously, weather_factor, which scales weather cost against haversine cost, was fixed for all planet sizes. This would cause longer-than-optimal paths to be routed, as seen below in red. This change ensures that the weather factor is halved for each planet size larger than 10, and doubled for each planet size lower.

ScaledWeatherFactor Paths for planet size 11 & 12, shown before change in red, and after change in white