diff --git a/brouter-core/src/main/java/btools/router/OsmTrack.java b/brouter-core/src/main/java/btools/router/OsmTrack.java index 9e283b4..c732a03 100644 --- a/brouter-core/src/main/java/btools/router/OsmTrack.java +++ b/brouter-core/src/main/java/btools/router/OsmTrack.java @@ -528,6 +528,23 @@ public final class OsmTrack .append( "\n" ); } } + + if ( turnInstructionMode == 6 ) // orux style + { + for( VoiceHint hint: voiceHints.list ) + { + sb.append( " " ) + .append( hint.selev == Short.MIN_VALUE ? "" : "" + (hint.selev / 4.) + "" ) + .append( "\n" + + "\n" + + "" ).append("" + hint.getOruxAction() ) + .append( "\n" + + "\n" + + "\n" + + "" ); + } + } for( int i=0; i<=pois.size() - 1; i++ ) { diff --git a/brouter-core/src/main/java/btools/router/VoiceHint.java b/brouter-core/src/main/java/btools/router/VoiceHint.java index 1e15bac..c3ec1a4 100644 --- a/brouter-core/src/main/java/btools/router/VoiceHint.java +++ b/brouter-core/src/main/java/btools/router/VoiceHint.java @@ -158,6 +158,27 @@ public class VoiceHint default : throw new IllegalArgumentException( "unknown command: " + cmd ); } } + + public int getOruxAction() + { + switch ( cmd ) + { + case TU : return 1003; + case TSHL : return 1019; + case TL : return 1000; + case TSLL : return 1017; + case KL : return 1015; // ? + case C : return 1002; + case KR : return 1014; // ? + case TSLR : return 1016; + case TR : return 1001; + case TSHR : return 1018; + case TRU : return 1003; + case RNDB : return 1008 + roundaboutExit; + case RNLB : return 1008 + roundaboutExit; + default : throw new IllegalArgumentException( "unknown command: " + cmd ); + } + } public void calcCommand() { diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index 2463b7b..1227146 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -62,6 +62,9 @@ assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobbl assign turncost = if junction=roundabout then 0 else 90 +assign initialclassifier = + if route=ferry then 1 + else 0 assign initialcost switch route=ferry 10000 0 diff --git a/misc/profiles2/hiking-beta.brf b/misc/profiles2/hiking-beta.brf index 25159d2..aa359b0 100644 --- a/misc/profiles2/hiking-beta.brf +++ b/misc/profiles2/hiking-beta.brf @@ -109,6 +109,10 @@ assign issidewalk not or sidewalk= or sidewalk=none sidewalk=no assign turncost switch or shortest_way is_ldhr 0 turncost_value #v1.5 +assign initialclassifier = + if route=ferry then 1 + else 0 + assign initialcost switch route=ferry 10000 diff --git a/misc/profiles2/moped.brf b/misc/profiles2/moped.brf index 5a5a260..fb4033b 100644 --- a/misc/profiles2/moped.brf +++ b/misc/profiles2/moped.brf @@ -23,6 +23,10 @@ assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osman assign turncost = if junction=roundabout then 0 else 90 +assign initialclassifier = + if route=ferry then 1 + else 0 + assign initialcost switch route=ferry 20000 0 diff --git a/misc/profiles2/shortest.brf b/misc/profiles2/shortest.brf index 4295e29..31153cb 100644 --- a/misc/profiles2/shortest.brf +++ b/misc/profiles2/shortest.brf @@ -17,6 +17,10 @@ assign nodeaccessgranted or any_cycleroute lcn=yes assign turncost 0 +assign initialclassifier = + if route=ferry then 1 + else 0 + assign initialcost switch route=ferry 10000 0 #