Attachment 'brouter-profile-viaggio.txt'
Download 1 # "quaelnix-gravel.brf" -- Version 04.09.2022
2 # This customizeable profile, developed by quaelnix, is designed for gravel cyclists who want to avoid traffic as much
3 # as possible, but still get to their destination efficiently - taking into account the capabilities of a gravel bike.
4
5 ---context:global
6
7 assign turnInstructionRoundabouts true # %turnInstructionRoundabouts% | Special turn-by-turn directions for roundabouts | boolean
8 assign considerTurnRestrictions true
9 assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn-by-turn directions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=oruxmaps-style]
10
11 assign processUnusedTags true
12 assign validForBikes true
13
14 # +++ Kinematic model parameters (travel time computation)
15 assign totalMass = 90 # %totalMass% | Mass (kg) of the bike + biker | number
16 assign maxSpeed = 25 # %maxSpeed% | Absolute maximum speed (km/h) | number
17 assign S_C_x = 0.370 # %S_C_x% | Drag coefficient times reference area (m^2) times half air density (kg/m^3)
18 assign C_r = 0.005 # %C_r% | Rolling resistance coefficient (dimensionless)
19 assign bikerPower = 40 # %bikerPower% | Average power (W) provided by the biker | number
20
21 assign consider_traffic_estimate false # %consider_traffic_estimate% | Enable to consider traffic estimates | boolean
22 assign assume_wet_conditions false # %assume_wet_conditions% | Enable to assume wet conditions | boolean
23 assign prefer_unpaved_paths false # %prefer_unpaved_paths% | Enable to prefer unpaved paths | boolean
24 assign consider_elevation true # %consider_elevation% | Enable to consider elevation | boolean
25
26 assign downhillcost switch consider_elevation 40 0
27 assign downhillcutoff 1.5
28 assign uphillcost switch consider_elevation 80 0
29 assign uphillcutoff 1.5
30
31 ---context:way
32
33 assign cycleway_right if reversedirection=yes
34 then if cycleway:left=track|lane|shared_lane then 1 else 0
35 else if cycleway:right=track|lane|shared_lane then 1 else 0
36
37 assign any_cycleway or bicycle_road=yes or cycleway=track|lane|shared_lane|shared cycleway_right
38
39 assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
40
41 assign turncost switch junction=roundabout 1 65
42
43 assign initialclassifier switch route=ferry 2 1
44 assign initialcost switch route=ferry 5000 0
45
46 assign nobikeaccess not switch bicycle= ( not access=no|private ) ( not bicycle=no|private|dismount )
47 assign nofootaccess not switch foot= ( not access=no|private ) ( not foot=no|private )
48
49 assign badoneway
50 switch not reversedirection=yes oneway=-1
51 switch oneway=yes|reversible not oneway:bicycle=no
52 or junction=roundabout oneway:bicycle=yes
53
54 assign onewaypenalty
55 switch or ( not badoneway ) ( or cycleway=opposite|opposite_lane|opposite_track oneway:bicycle=no ) 1
56 5
57
58 assign smoothnesspenalty =
59 switch smoothness=excellent 1.0
60 switch smoothness=good 1.1
61 switch smoothness=intermediate 1.3
62 switch smoothness=bad 1.5
63 switch smoothness=very_bad 2.8
64 switch smoothness=horrible 3.2
65 switch smoothness=very_horrible 5.0
66 switch smoothness=impassable 100
67 # estimate smoothness off surface
68 switch any_cycleway
69 switch cycleway:surface=asphalt 1.1
70 switch cycleway:surface=fine_gravel|compacted 1.2 # Splitt,verdichtete Oberflaesche
71 switch cycleway:surface=concrete|paving_stones 1.3 # Beton, flache Pflastersteine
72 switch cycleway:surface=paved 1.4 # befestigte (harte) Oberfläche
73 switch cycleway:surface=gravel 1.5 # (grober) Schotter
74 switch cycleway:surface=unpaved 1.6 # Schotter, Sand, Kies, unbefestigt
75 switch cycleway:surface=cobblestone|sett 1.7 # Kopfsteinpflaster
76 1.6
77 switch surface=asphalt 1.1
78 switch concrete=plates|lanes 1.2 # Betonplattenwege, Betonspurplatten
79 switch surface=fine_gravel|compacted 1.2 # Splitt, verdichtete Oberflaesche
80 switch surface=concrete|paving_stones|wood|metal 1.3 # Beton, flache Pflastersteine, Holz, Metall
81 switch surface=paved 1.4 # befestigte (harte) Oberfläche
82 switch surface=gravel 1.5 # (grober) Schotter
83 switch surface=cobblestone|sett 1.7 # Kopfsteinpflaster
84 switch surface=grass_paver 1.8 # Rasengittersteine
85 switch surface=pebblestone 1.9 # Kies
86 switch highway=track
87 # estimate smoothness off tracktype
88 switch tracktype=grade1 1.2
89 switch tracktype=grade2 1.4
90 switch tracktype=grade3 1.6
91 switch tracktype=grade4 2.0
92 switch tracktype=grade5 2.2
93 3.6 # assume the worst
94 # estimate smoothness off highway type
95 switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link 1.0
96 switch highway=service|unclassified|living_street|residential 1.1
97 switch highway=cycleway 1.2
98 # handle non-specific tags last
99 switch surface=unpaved 1.6 # Schotter, Sand, Kies, unbefestigt
100 switch surface=ground|grass|dirt|earth|mud|clay|sand 2.0 # naturbelassene Oberfläche, Gras, Dreck, ...
101 # default smoothness
102 1.6
103
104 assign footwaypenalty
105 switch bicycle=yes|designated
106 switch segregated=yes 1.8
107 2.6
108 switch not footway=sidewalk 3.2
109 4.9
110
111 assign cyclewaypenalty
112 switch not foot=yes|designated 1.0
113 switch segregated=yes 1.2
114 2.4
115
116 assign pathpenalty
117 switch bicycle=yes|designated
118 switch not foot=yes|designated 1.1
119 switch segregated=yes 1.8
120 2.4
121 switch foot=designated 4.9
122 # neither designated foot- nor cycle path
123 switch lesser smoothnesspenalty 1.6 1.1
124 3.0
125
126 assign stepspenalty
127 switch ramp:stroller=yes 15
128 switch ramp:bicycle=yes 25
129 switch surface=paving_stones 50
130 300
131
132 assign tracktypepenalty
133 switch tracktype=grade1 1.0
134 switch tracktype=grade2 1.1
135 switch tracktype=grade3 1.2
136 switch tracktype=grade4 1.4
137 switch tracktype=grade5 1.8
138 switch highway=track 1.3
139 1.0
140
141 assign is_paved
142 or highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link
143 or highway=road|unclassified|residential|living_street|service
144 or surface=asphalt|concrete|paved|paving_stones|sett
145 or smoothness=excellent|good
146 tracktype=grade1
147
148 assign bad_when_wet
149 and ( surface=ground|grass|dirt|earth|mud|clay|sand ) ( not tracktype=grade1|grade2 )
150
151 assign wetnesspenalty
152 switch ( or ( or bad_when_wet ( greater smoothnesspenalty 1.5 ) ) ( greater tracktypepenalty 1.1 ) ) 2 1
153
154 assign smoothnesspenalty
155 multiply smoothnesspenalty ( switch and prefer_unpaved_paths is_paved 1.6 1 )
156
157 assign smoothnesspenalty
158 multiply smoothnesspenalty ( switch and prefer_unpaved_paths ( lesser smoothnesspenalty 1.6 ) 0.84 1 )
159
160 assign hikingpenalty
161 if sac_scale= then 1.0 else if sac_scale=hiking then 2.5 else 50
162
163 assign mtbpenalty
164 if mtb:scale= then 1.0 else if mtb:scale=0- then 1.2 else
165 if mtb:scale=0 then 1.5 else if mtb:scale=0+ then 3.0 else 9.0
166
167 assign notcycleroutepenalty switch any_cycleroute 1.0 1.03
168 assign notcyclewaypenalty switch any_cycleway 1.0 1.06
169
170 assign trafficpenalty
171 switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link
172 switch estimated_traffic_class=1|2 1.2
173 switch estimated_traffic_class=3 1.4
174 switch estimated_traffic_class=4 1.6
175 switch estimated_traffic_class=5 1.8
176 switch estimated_traffic_class=6|7 2.0
177 1.0
178 1.0
179
180 assign maxspeedpenalty
181 switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link
182 switch maxspeed=50 1.0
183 switch maxspeed=60 1.1
184 switch maxspeed=70 1.3
185 switch maxspeed=80 1.4
186 switch maxspeed=90 1.5
187 switch maxspeed=100 1.6
188 1.0
189 1.0
190
191 assign costfactor
192 multiply notcycleroutepenalty multiply notcyclewaypenalty
193 multiply switch consider_traffic_estimate trafficpenalty 1
194 multiply switch assume_wet_conditions wetnesspenalty 1
195 multiply onewaypenalty multiply smoothnesspenalty
196 multiply hikingpenalty multiply mtbpenalty
197 multiply tracktypepenalty
198 multiply maxspeedpenalty
199 switch or highway=motorway|motorway_link motorroad=yes 10000
200 switch and nobikeaccess nofootaccess 10000
201 switch highway=proposed|abandoned 10000
202 switch highway= switch not route=ferry 100 5
203 switch highway=trunk|trunk_link 100
204 switch highway=bridleway 50
205 switch highway=pedestrian switch not bicycle=yes 8 3
206 switch or vehicle=no|private bicycle=no|private|dismount 6.0
207 switch highway=primary|primary_link 5.5
208 switch highway=secondary|secondary_link 5.2
209 switch highway=tertiary|tertiary_link 3.8
210 switch highway=corridor 3.2
211 switch highway=road 2.8
212 switch highway=unclassified switch not any_cycleroute 2.6 1.4
213 switch highway=living_street 2.5
214 switch highway=service 2.4
215 switch highway=residential switch not maxspeed=30 2.2 1.8
216 switch highway=path pathpenalty
217 switch highway=steps stepspenalty
218 switch highway=footway footwaypenalty
219 switch highway=cycleway cyclewaypenalty
220 1.0
221
222 # way priorities used for voice hint generation
223
224 assign priorityclassifier =
225 if ( highway=motorway ) then 30
226 else if ( highway=motorway_link ) then 29
227 else if ( highway=trunk ) then 28
228 else if ( highway=trunk_link ) then 27
229 else if ( highway=primary ) then 23
230 else if ( highway=primary_link ) then 23
231 else if ( highway=secondary ) then 22
232 else if ( highway=secondary_link ) then 22
233 else if ( highway=tertiary ) then 21
234 else if ( highway=tertiary_link ) then 21
235 else if ( highway=residential|living_street ) then 15
236 else if ( highway=unclassified ) then 8
237 else if ( highway=service ) then 8
238 else if ( highway=cycleway ) then 8
239 else if ( bicycle=designated ) then 8
240 else if ( highway=track|road|path )
241 then if or surface=asphalt|paved|concrete|wood|metal tracktype=grade1 then 8 else 6
242 else if ( highway=steps ) then 2
243 else if ( highway=pedestrian ) then 2
244 else 0
245
246 # some more classifying bits used for voice hint generation...
247
248 assign isbadoneway = not equal onewaypenalty 0
249 assign isgoodoneway = if reversedirection=yes then oneway=-1
250 else if oneway= then junction=roundabout else oneway=yes|true|1
251 assign isroundabout = junction=roundabout
252 assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
253 assign isgoodforcars = if greater priorityclassifier 6 then true
254 else if highway=residential|living_street|service then true
255 else if ( and highway=track tracktype=grade1 ) then true
256 else false
257
258 # ... encoded into a bitmask
259
260 assign classifiermask
261 # add isbadoneway # no voice hint if 1 of the 2 possibilities is badoneway
262 add multiply isgoodoneway 2
263 add multiply isroundabout 4
264 add multiply islinktype 8
265 multiply isgoodforcars 16
266
267 ---context:node
268
269 assign nobikeaccess not switch bicycle= ( not access=no|private ) ( not bicycle=no|private|dismount )
270 assign nofootaccess not switch foot= ( not access=no|private ) ( not foot=no|private )
271
272 assign railwaypenalty
273 switch railway=crossing|level_crossing 25
274 0
275
276 assign barrierpenalty
277 switch barrier= 0
278 switch barrier=gate|swing_gate 50
279 switch barrier=block|bollard 59
280 switch barrier=cycle_barrier 87
281 139
282
283 assign trafficcalmingpenalty
284 switch traffic_calming= 0
285 25
286
287 assign initialcost
288 add barrierpenalty
289 add railwaypenalty
290 add trafficcalmingpenalty
291 switch and nobikeaccess nofootaccess 1000000
292 switch nobikeaccess 200
293 0
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.