Fixed incorrect speed unit conversion

This commit is contained in:
Praveen Kumar 2019-11-15 14:14:11 +05:30 committed by bernat
parent dd19da3af0
commit 65f84442e0
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ namespace PlannerConstants {
// Increase speed if on highway.
float speed_limit = vehicle->GetSpeedLimit() / 3.6f;
float dynamic_target_velocity = parameters.GetVehicleTargetVelocity(actor);
float dynamic_target_velocity = parameters.GetVehicleTargetVelocity(actor) / 3.6f;
if (speed_limit > HIGHWAY_SPEED) {
longitudinal_parameters = highway_longitudinal_parameters;

View File

@ -78,7 +78,7 @@ namespace traffic_manager {
percentage_decrease = percentage_decrease_from_speed_limit.GetValue(actor_id);
}
return speed_limit * (1 - percentage_decrease/100);
return speed_limit * (1.0f - percentage_decrease/100.0f);
}
bool Parameters::GetCollisionDetection(const ActorPtr &reference_actor, const ActorPtr &other_actor) {