Fixed incorrect speed unit conversion
This commit is contained in:
parent
dd19da3af0
commit
65f84442e0
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue