1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include "routing/routing_settings.hpp"
namespace routing
{
// RoutingSettings ---------------------------------------------------------------------------------
RoutingSettings::RoutingSettings(bool matchRoute, bool soundDirection, double matchingThresholdM,
bool keepPedestrianInfo, bool showTurnAfterNext)
: m_matchRoute(matchRoute)
, m_soundDirection(soundDirection)
, m_matchingThresholdM(matchingThresholdM)
, m_keepPedestrianInfo(keepPedestrianInfo)
, m_showTurnAfterNext(showTurnAfterNext)
{
}
RoutingSettings GetRoutingSettings(VehicleType vehicleType)
{
switch (vehicleType)
{
case VehicleType::Pedestrian:
return {true /* m_matchRoute */, false /* m_soundDirection */,
20. /* m_matchingThresholdM */, true /* m_keepPedestrianInfo */,
false /* m_showTurnAfterNext */};
case VehicleType::Transit:
return {true /* m_matchRoute */, false /* m_soundDirection */,
40. /* m_matchingThresholdM */, true /* m_keepPedestrianInfo */,
false /* m_showTurnAfterNext */};
case VehicleType::Bicycle:
return {true /* m_matchRoute */, true /* m_soundDirection */,
30. /* m_matchingThresholdM */, false /* m_keepPedestrianInfo */,
false /* m_showTurnAfterNext */};
case VehicleType::Count:
CHECK(false, ("Can't create GetRoutingSettings for", vehicleType));
case VehicleType::Car:
return {true /* m_matchRoute */, true /* m_soundDirection */,
50. /* m_matchingThresholdM */, false /* m_keepPedestrianInfo */,
true /* m_showTurnAfterNext */};
}
UNREACHABLE();
}
} // namespace routing
|