Open nrenner opened 1 year ago
You could send all timode values greater zero (1..7) with format 'geojson'. All should return with a 'voicehint' section.
Adding an extra
turnInstructionMode
seems superfluous.
Yes, that is not a way. A new format "fit" would do the job. But I don't know if there is any interest in clients other than the web client.
What is the overhead of processing voice hints?
I'm unable to measure any meaningful performance difference between turning voice hint processing on or off for both short and long segments. Here is an example for a 50k route:
> export URL="http://localhost:17777/?lonlats=13.010935,52.40158|13.581065,52.534464\
&profile=trekking&alternativeidx=0&format=geojson"
> export CURL="curl --compressed -o /dev/null -s"
>
> hyperfine --warmup 2 --parameter-list timode 0,2 '$CURL "$URL&timode={timode}"'
Benchmark 1: $CURL "$URL&timode=0"
Time (mean ± σ): 2.931 s ± 0.024 s [User: 0.006 s, System: 0.005 s]
Range (min … max): 2.885 s … 2.964 s 10 runs
Benchmark 2: $CURL "$URL&timode=2"
Time (mean ± σ): 2.923 s ± 0.026 s [User: 0.004 s, System: 0.006 s]
Range (min … max): 2.889 s … 2.975 s 10 runs
Summary
'$CURL "$URL&timode=2"' ran
1.00 ± 0.01 times faster than '$CURL "$URL&timode=0"'
brouter-web has a new option for client-side export in the binary Garmin FIT format, using an external library (brouter-web#641).
The question now is, how to (automatically?) include voice hints for the FIT format?
Adding an extra
turnInstructionMode
seems superfluous. The need to choose aturnInstructionMode
only really exists because of the GPX format with multiple variants.A generic option would be the profile default
turnInstructionMode=1
(auto-choose), but that is just a placeholder and currently defaults to 0 (none).What is the overhead of processing voice hints? Can we send a
timode=1
parameter for all internal (geojson) brouter-web requests?