From 25920785b6765ab7d48dc67828cc54e61e7b5ce0 Mon Sep 17 00:00:00 2001 From: Bartok9 Date: Tue, 28 Jul 2026 05:22:29 -0400 Subject: [PATCH] fix(airlib): protect ImuSimple dt floor from Windows max macros Use parenthesized std::max when flooring sample dt for noise scaling. --- AirLib/include/sensors/imu/ImuSimple.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AirLib/include/sensors/imu/ImuSimple.hpp b/AirLib/include/sensors/imu/ImuSimple.hpp index 7165682e14..06a6462914 100644 --- a/AirLib/include/sensors/imu/ImuSimple.hpp +++ b/AirLib/include/sensors/imu/ImuSimple.hpp @@ -79,7 +79,7 @@ namespace airlib //ref: An introduction to inertial navigation, Oliver J. Woodman, Sec 3.2, pp 10-12 //https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.pdf - real_T sqrt_dt = static_cast(sqrt(std::max(dt, params_.min_sample_time))); + real_T sqrt_dt = static_cast(sqrt((std::max)(dt, params_.min_sample_time))); // Gyrosocpe //convert arw to stddev