Skip to content

Wrong calculation of the effectiveMinimumGap in followingDriverModel.cpp

In sim/src/components/AlgorithmAFDM/src/followingDriverModel.cpp the effectiveMinimumGap within the Trigger()-method has an error in the bracket placement.

Here the current code snippet (For clarification I added the units of each variable)

auto effectiveMinimumGap(m) = minDistance(m) + ownVehicleInformation.absoluteVelocity(m/s)*tGapWish(s) + (ownVehicleInformation.absoluteVelocity(m/s)*vDelta(m/s))/2) * std::sqrt(maxAcceleration(m/s²) * decelerationWish(m/s²));

It should be the following: auto effectiveMinimumGap(m) = minDistance(m) + ownVehicleInformation.absoluteVelocity(m/s)*tGapWish(s) + ownVehicleInformation.absoluteVelocity(m/s)*vDelta(m/s) / (2 * std::sqrt(maxAcceleration(m/s²) * decelerationWish(m/s²)));

Edited by Christoph Kochendoerfer