AP_Soaring: Use constexpr instead of define for constants

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
This commit is contained in:
Ryan Friedman 2024-11-22 08:44:55 -07:00 committed by Peter Barker
parent 1b4ac6ae89
commit fe8e0d0c96

View File

@ -23,10 +23,10 @@
#include "Variometer.h" #include "Variometer.h"
#include "SpeedToFly.h" #include "SpeedToFly.h"
#define INITIAL_THERMAL_RADIUS 80.0 static constexpr float INITIAL_THERMAL_RADIUS = 80.0;
#define INITIAL_STRENGTH_COVARIANCE 0.0049 static constexpr float INITIAL_STRENGTH_COVARIANCE = 0.0049;
#define INITIAL_RADIUS_COVARIANCE 400.0 static constexpr float INITIAL_RADIUS_COVARIANCE = 400.0;
#define INITIAL_POSITION_COVARIANCE 400.0 static constexpr float INITIAL_POSITION_COVARIANCE = 400.0;
class SoaringController { class SoaringController {