Search code examples
javascriptgoogle-mapsgpsgeometry

Track optimisation over waypoints radius


I can't seem to solve the following problem :

Using Google map (and WSG84) I have a set of waypoints defining an air/sea route. (There is no roads : Just straight lines !). I can draw and estimate a route length easily because I have the coordinates of all waypoints but I'm trying to take into account any existing radius around each waypoints to optimize the fastest available route and get the shortest distance. A picture may illustrate this better.

Route optimisation
(source: ffvl.fr)

The blue line is easy to sort out. How can I get all intermediates points belonging to each waypoint's radius on the red line ?


Solution

  • For the record, Téo Bouvard's solution described Here with quasi Newtons methods was what I was looking for for such a long time.

    His question here look similar than mine.