summaryrefslogtreecommitdiffhomepage
path: root/filter-kalman
diff options
context:
space:
mode:
Diffstat (limited to 'filter-kalman')
-rw-r--r--filter-kalman/kalman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp
index 5bd520ee..559f1ea5 100644
--- a/filter-kalman/kalman.cpp
+++ b/filter-kalman/kalman.cpp
@@ -76,7 +76,7 @@ void KalmanProcessNoiseScaler::update(KalmanFilter &kf, double dt)
{
alpha = T1 / T2;
alpha = std::sqrt(alpha);
- alpha = std::min(1000., std::max(0.001, alpha));
+ alpha = std::fmin(1000., std::fmax(0.001, alpha));
}
kf.process_noise_cov = alpha * base_cov;
//qDebug() << "alpha = " << alpha;