dakk / libweatherrouting

A sailing weather routing library
https://dakk.github.io/libweatherrouting
GNU General Public License v3.0
24 stars 11 forks source link

Router accuracy & performance #16

Open ludohenin opened 4 days ago

ludohenin commented 4 days ago

@rgrente here is a trial I made, this is not completely out of the picture, it's quite linear as you were saying. I don't (yet) interpolate Gribs data. Comment on the track:

  1. lots of tacking
  2. useless exploration
    • I'm wondering if scanning the best route along the way and constrain the isochrones exploration around that route would make sense (I've seen router working this way)
  3. performance wise it took ~2min to generate it with 84 steps image
dakk commented 2 days ago

When saying that you are not interpolating GRIB what do you mean? Did you put a constant wind from south?

  1. no idea about the lots of tacking occuring at the beggining, anyway I don't know wind information
  2. it is useless only because you found wind along the route; if there's not wind between Africa and Canaries, you won't find a route. Anyway, a router that uses this technique is welcome in the repo if you want to implement it
  3. I know, I should take care of it; the main problem is that (if I remember correctly), for each phase of the isochrones calculation and for every point of the previous phase, it calculates new isochrones; so the resources required are somehow exponential. Points at each phase are already filtered, but I think it can be improved
ludohenin commented 1 day ago

By interpolating, I mean ... well interpolating twa & tws across gribs. The grid is quite large for degree based resolution (116km) and you can have significant gap between the surrounding forecast, it's better then to interpolate. This is not perfect as it's linear but better than not doing it.

         1      2           
        fi  i   ci          
         | =1.4 |           
      ---G--|---G--- fj 8   
    j ___|_ .   |           
  =8.3   |      |
      ---G------G--- cj 9   
         |      |    
dakk commented 1 day ago

Ok, got it. In #17 I also add an optimization for performances:

routing_obj.algorithm.setParamValue("subdiv", 2)

give it a try

ludohenin commented 1 day ago

Excellent 👍 , I've have a look during the week-end.