# "quaelnix-gravel.brf" -- Version 04.09.2022 # This customizeable profile, developed by quaelnix, is designed for gravel cyclists who want to avoid traffic as much # as possible, but still get to their destination efficiently - taking into account the capabilities of a gravel bike. ---context:global assign turnInstructionRoundabouts true # %turnInstructionRoundabouts% | Special turn-by-turn directions for roundabouts | boolean assign considerTurnRestrictions true 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] assign processUnusedTags true assign validForBikes true # +++ Kinematic model parameters (travel time computation) assign totalMass = 90 # %totalMass% | Mass (kg) of the bike + biker | number assign maxSpeed = 25 # %maxSpeed% | Absolute maximum speed (km/h) | number assign S_C_x = 0.370 # %S_C_x% | Drag coefficient times reference area (m^2) times half air density (kg/m^3) assign C_r = 0.005 # %C_r% | Rolling resistance coefficient (dimensionless) assign bikerPower = 40 # %bikerPower% | Average power (W) provided by the biker | number assign consider_traffic_estimate false # %consider_traffic_estimate% | Enable to consider traffic estimates | boolean assign assume_wet_conditions false # %assume_wet_conditions% | Enable to assume wet conditions | boolean assign prefer_unpaved_paths false # %prefer_unpaved_paths% | Enable to prefer unpaved paths | boolean assign consider_elevation true # %consider_elevation% | Enable to consider elevation | boolean assign downhillcost switch consider_elevation 40 0 assign downhillcutoff 1.5 assign uphillcost switch consider_elevation 80 0 assign uphillcutoff 1.5 ---context:way assign cycleway_right if reversedirection=yes then if cycleway:left=track|lane|shared_lane then 1 else 0 else if cycleway:right=track|lane|shared_lane then 1 else 0 assign any_cycleway or bicycle_road=yes or cycleway=track|lane|shared_lane|shared cycleway_right assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes assign turncost switch junction=roundabout 1 65 assign initialclassifier switch route=ferry 2 1 assign initialcost switch route=ferry 5000 0 assign nobikeaccess not switch bicycle= ( not access=no|private ) ( not bicycle=no|private|dismount ) assign nofootaccess not switch foot= ( not access=no|private ) ( not foot=no|private ) assign badoneway switch not reversedirection=yes oneway=-1 switch oneway=yes|reversible not oneway:bicycle=no or junction=roundabout oneway:bicycle=yes assign onewaypenalty switch or ( not badoneway ) ( or cycleway=opposite|opposite_lane|opposite_track oneway:bicycle=no ) 1 5 assign smoothnesspenalty = switch smoothness=excellent 1.0 switch smoothness=good 1.1 switch smoothness=intermediate 1.3 switch smoothness=bad 1.5 switch smoothness=very_bad 2.8 switch smoothness=horrible 3.2 switch smoothness=very_horrible 5.0 switch smoothness=impassable 100 # estimate smoothness off surface switch any_cycleway switch cycleway:surface=asphalt 1.1 switch cycleway:surface=fine_gravel|compacted 1.2 # Splitt,verdichtete Oberflaesche switch cycleway:surface=concrete|paving_stones 1.3 # Beton, flache Pflastersteine switch cycleway:surface=paved 1.4 # befestigte (harte) Oberfläche switch cycleway:surface=gravel 1.5 # (grober) Schotter switch cycleway:surface=unpaved 1.6 # Schotter, Sand, Kies, unbefestigt switch cycleway:surface=cobblestone|sett 1.7 # Kopfsteinpflaster 1.6 switch surface=asphalt 1.1 switch concrete=plates|lanes 1.2 # Betonplattenwege, Betonspurplatten switch surface=fine_gravel|compacted 1.2 # Splitt, verdichtete Oberflaesche switch surface=concrete|paving_stones|wood|metal 1.3 # Beton, flache Pflastersteine, Holz, Metall switch surface=paved 1.4 # befestigte (harte) Oberfläche switch surface=gravel 1.5 # (grober) Schotter switch surface=cobblestone|sett 1.7 # Kopfsteinpflaster switch surface=grass_paver 1.8 # Rasengittersteine switch surface=pebblestone 1.9 # Kies switch highway=track # estimate smoothness off tracktype switch tracktype=grade1 1.2 switch tracktype=grade2 1.4 switch tracktype=grade3 1.6 switch tracktype=grade4 2.0 switch tracktype=grade5 2.2 3.6 # assume the worst # estimate smoothness off highway type switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link 1.0 switch highway=service|unclassified|living_street|residential 1.1 switch highway=cycleway 1.2 # handle non-specific tags last switch surface=unpaved 1.6 # Schotter, Sand, Kies, unbefestigt switch surface=ground|grass|dirt|earth|mud|clay|sand 2.0 # naturbelassene Oberfläche, Gras, Dreck, ... # default smoothness 1.6 assign footwaypenalty switch bicycle=yes|designated switch segregated=yes 1.8 2.6 switch not footway=sidewalk 3.2 4.9 assign cyclewaypenalty switch not foot=yes|designated 1.0 switch segregated=yes 1.2 2.4 assign pathpenalty switch bicycle=yes|designated switch not foot=yes|designated 1.1 switch segregated=yes 1.8 2.4 switch foot=designated 4.9 # neither designated foot- nor cycle path switch lesser smoothnesspenalty 1.6 1.1 3.0 assign stepspenalty switch ramp:stroller=yes 15 switch ramp:bicycle=yes 25 switch surface=paving_stones 50 300 assign tracktypepenalty switch tracktype=grade1 1.0 switch tracktype=grade2 1.1 switch tracktype=grade3 1.2 switch tracktype=grade4 1.4 switch tracktype=grade5 1.8 switch highway=track 1.3 1.0 assign is_paved or highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link or highway=road|unclassified|residential|living_street|service or surface=asphalt|concrete|paved|paving_stones|sett or smoothness=excellent|good tracktype=grade1 assign bad_when_wet and ( surface=ground|grass|dirt|earth|mud|clay|sand ) ( not tracktype=grade1|grade2 ) assign wetnesspenalty switch ( or ( or bad_when_wet ( greater smoothnesspenalty 1.5 ) ) ( greater tracktypepenalty 1.1 ) ) 2 1 assign smoothnesspenalty multiply smoothnesspenalty ( switch and prefer_unpaved_paths is_paved 1.6 1 ) assign smoothnesspenalty multiply smoothnesspenalty ( switch and prefer_unpaved_paths ( lesser smoothnesspenalty 1.6 ) 0.84 1 ) assign hikingpenalty if sac_scale= then 1.0 else if sac_scale=hiking then 2.5 else 50 assign mtbpenalty if mtb:scale= then 1.0 else if mtb:scale=0- then 1.2 else if mtb:scale=0 then 1.5 else if mtb:scale=0+ then 3.0 else 9.0 assign notcycleroutepenalty switch any_cycleroute 1.0 1.03 assign notcyclewaypenalty switch any_cycleway 1.0 1.06 assign trafficpenalty switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link switch estimated_traffic_class=1|2 1.2 switch estimated_traffic_class=3 1.4 switch estimated_traffic_class=4 1.6 switch estimated_traffic_class=5 1.8 switch estimated_traffic_class=6|7 2.0 1.0 1.0 assign maxspeedpenalty switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link switch maxspeed=50 1.0 switch maxspeed=60 1.1 switch maxspeed=70 1.3 switch maxspeed=80 1.4 switch maxspeed=90 1.5 switch maxspeed=100 1.6 1.0 1.0 assign costfactor multiply notcycleroutepenalty multiply notcyclewaypenalty multiply switch consider_traffic_estimate trafficpenalty 1 multiply switch assume_wet_conditions wetnesspenalty 1 multiply onewaypenalty multiply smoothnesspenalty multiply hikingpenalty multiply mtbpenalty multiply tracktypepenalty multiply maxspeedpenalty switch or highway=motorway|motorway_link motorroad=yes 10000 switch and nobikeaccess nofootaccess 10000 switch highway=proposed|abandoned 10000 switch highway= switch not route=ferry 100 5 switch highway=trunk|trunk_link 100 switch highway=bridleway 50 switch highway=pedestrian switch not bicycle=yes 8 3 switch or vehicle=no|private bicycle=no|private|dismount 6.0 switch highway=primary|primary_link 5.5 switch highway=secondary|secondary_link 5.2 switch highway=tertiary|tertiary_link 3.8 switch highway=corridor 3.2 switch highway=road 2.8 switch highway=unclassified switch not any_cycleroute 2.6 1.4 switch highway=living_street 2.5 switch highway=service 2.4 switch highway=residential switch not maxspeed=30 2.2 1.8 switch highway=path pathpenalty switch highway=steps stepspenalty switch highway=footway footwaypenalty switch highway=cycleway cyclewaypenalty 1.0 # way priorities used for voice hint generation assign priorityclassifier = if ( highway=motorway ) then 30 else if ( highway=motorway_link ) then 29 else if ( highway=trunk ) then 28 else if ( highway=trunk_link ) then 27 else if ( highway=primary ) then 23 else if ( highway=primary_link ) then 23 else if ( highway=secondary ) then 22 else if ( highway=secondary_link ) then 22 else if ( highway=tertiary ) then 21 else if ( highway=tertiary_link ) then 21 else if ( highway=residential|living_street ) then 15 else if ( highway=unclassified ) then 8 else if ( highway=service ) then 8 else if ( highway=cycleway ) then 8 else if ( bicycle=designated ) then 8 else if ( highway=track|road|path ) then if or surface=asphalt|paved|concrete|wood|metal tracktype=grade1 then 8 else 6 else if ( highway=steps ) then 2 else if ( highway=pedestrian ) then 2 else 0 # some more classifying bits used for voice hint generation... assign isbadoneway = not equal onewaypenalty 0 assign isgoodoneway = if reversedirection=yes then oneway=-1 else if oneway= then junction=roundabout else oneway=yes|true|1 assign isroundabout = junction=roundabout assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link assign isgoodforcars = if greater priorityclassifier 6 then true else if highway=residential|living_street|service then true else if ( and highway=track tracktype=grade1 ) then true else false # ... encoded into a bitmask assign classifiermask # add isbadoneway # no voice hint if 1 of the 2 possibilities is badoneway add multiply isgoodoneway 2 add multiply isroundabout 4 add multiply islinktype 8 multiply isgoodforcars 16 ---context:node assign nobikeaccess not switch bicycle= ( not access=no|private ) ( not bicycle=no|private|dismount ) assign nofootaccess not switch foot= ( not access=no|private ) ( not foot=no|private ) assign railwaypenalty switch railway=crossing|level_crossing 25 0 assign barrierpenalty switch barrier= 0 switch barrier=gate|swing_gate 50 switch barrier=block|bollard 59 switch barrier=cycle_barrier 87 139 assign trafficcalmingpenalty switch traffic_calming= 0 25 assign initialcost add barrierpenalty add railwaypenalty add trafficcalmingpenalty switch and nobikeaccess nofootaccess 1000000 switch nobikeaccess 200 0