added max_speed to the profiles (#3089)
This commit is contained in:
@@ -8,11 +8,14 @@ namespace osrm
|
||||
namespace extractor
|
||||
{
|
||||
|
||||
const constexpr auto DEFAULT_MAX_SPEED = 180 / 3.6; // 180kmph -> m/s
|
||||
|
||||
struct ProfileProperties
|
||||
{
|
||||
ProfileProperties()
|
||||
: traffic_signal_penalty(0), u_turn_penalty(0), continue_straight_at_waypoint(true),
|
||||
use_turn_restrictions(false), left_hand_driving(false)
|
||||
: traffic_signal_penalty(0), u_turn_penalty(0),
|
||||
max_speed_for_map_matching(DEFAULT_MAX_SPEED), continue_straight_at_waypoint(true),
|
||||
use_turn_restrictions(false), left_hand_driving(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,10 +33,18 @@ struct ProfileProperties
|
||||
traffic_signal_penalty = boost::numeric_cast<int>(traffic_signal_penalty_ * 10.);
|
||||
}
|
||||
|
||||
double GetMaxSpeedForMapMatching() const { return max_speed_for_map_matching; }
|
||||
|
||||
void SetMaxSpeedForMapMatching(const double max_speed_for_map_matching_)
|
||||
{
|
||||
max_speed_for_map_matching = max_speed_for_map_matching_;
|
||||
}
|
||||
|
||||
//! penalty to cross a traffic light in deci-seconds
|
||||
int traffic_signal_penalty;
|
||||
//! penalty to do a uturn in deci-seconds
|
||||
int u_turn_penalty;
|
||||
double max_speed_for_map_matching;
|
||||
bool continue_straight_at_waypoint;
|
||||
bool use_turn_restrictions;
|
||||
bool left_hand_driving;
|
||||
|
||||
Reference in New Issue
Block a user