17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

Sonar fixes

This commit is contained in:
2026-10-09 14:42:55 +02:00
parent 7a9e3754cc
commit 1c28809dd7
6 changed files with 28 additions and 15 deletions

View File

@@ -52,8 +52,9 @@ double jerk_limit(double const Curvature, double const Cant, double const Gauge,
if (rate(Top) <= Jerk)
return Top;
double low{0.0};
for (double speed = 10.0; speed <= Top; speed += 10.0)
for (int i = 1; i * 10.0 <= Top; ++i)
{
auto const speed{i * 10.0};
if (rate(speed) > Jerk)
{
double high{speed};