Add read-only max_turn_weight in ProfileProperties

This commit is contained in:
Michael Krasnyk
2017-03-20 14:34:25 +01:00
parent 851fcf0758
commit 78a199e2fb
3 changed files with 13 additions and 1 deletions
+7
View File
@@ -1,6 +1,8 @@
#ifndef PROFILE_PROPERTIES_HPP
#define PROFILE_PROPERTIES_HPP
#include "util/typedefs.hpp"
#include <algorithm>
#include <boost/assert.hpp>
#include <boost/numeric/conversion/cast.hpp>
@@ -66,6 +68,11 @@ struct ProfileProperties
double GetWeightMultiplier() const { return std::pow(10., weight_precision); }
double GetMaxTurnWeight() const
{
return std::numeric_limits<TurnPenalty>::max() / GetWeightMultiplier();
}
//! penalty to cross a traffic light in deci-seconds
std::int32_t traffic_signal_penalty;
//! penalty to do a uturn in deci-seconds