src/utils/Config.cpp
double Config::safeDistance(const double relativeSpeed) {
  if (relativeSpeed < 0) {
    return minSafeDistance;
  }

  return std::min(maxDistance, std::max(minSafeDistance, relativeSpeed - 0.5 * Config::maxAcceleration));
}
/**
 * Distance that we can stop the car in 1 second with 60% of max brake with 1 meter error
 */
Distance that we can stop the car in 1 second with 60% of max brake with 1 meter error
Distance that we can stop the car in 1 second with 60% of max brake with 1 meter error
double Config::safeDistance(const double relativeSpeed) {
  if (relativeSpeed < 0) {
    return minSafeDistance;
  }
  return std::min(maxDistance, std::max(minSafeDistance, relativeSpeed - 0.5 * Config::maxAcceleration));
}
double Config :: safeDistance ( const double relativeSpeed ) { if ( relativeSpeed < 0 ) { return minSafeDistance ; } return std :: min ( maxDistance , std :: max ( minSafeDistance , relativeSpeed - 0.5 * Config :: maxAcceleration ) ) ; }
Distance that we can stop the car in 1 second with 60% of max brake with 1 meter error
Distance that we can stop the car in 1 second with 60% of max brake with 1 meter error