float speed = sqrt(pow(car->speed[0], 2) + pow(car->speed[1], 2) + pow(car->speed[2], 2));
switch (CarInfo->modeSpeed)
{
case 1:
sprintf(buffer, "%.0f MpS", ceil(speed * 50));
break;
case 2:
sprintf(buffer, "%.0f KpH", ceil(speed * 150));
break;
case 3:
sprintf(buffer, "%.0f MpH", ceil(speed * 111.847));
break;
default:
break;
}