From 52d9dc14715e25757f772f7a9e0fc37625c1d3de Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 14 Jul 2022 18:22:24 +0200 Subject: [PATCH] AP_Soaring: make function const --- libraries/AP_Soaring/Variometer.cpp | 2 +- libraries/AP_Soaring/Variometer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Soaring/Variometer.cpp b/libraries/AP_Soaring/Variometer.cpp index 9cf95179d9..eb1ca5493e 100644 --- a/libraries/AP_Soaring/Variometer.cpp +++ b/libraries/AP_Soaring/Variometer.cpp @@ -126,7 +126,7 @@ float Variometer::calculate_aircraft_sinkrate(float phi) const return _aspd_filt_constrained * (C1 + C2 / (cosphi * cosphi)); } -float Variometer::calculate_circling_time_constant(float thermal_bank) +float Variometer::calculate_circling_time_constant(float thermal_bank) const { // Calculate a time constant to use to filter quantities over a full thermal orbit. // This is used for rejecting variation in e.g. climb rate, or estimated climb rate diff --git a/libraries/AP_Soaring/Variometer.h b/libraries/AP_Soaring/Variometer.h index c8abb1193e..0678884ee9 100644 --- a/libraries/AP_Soaring/Variometer.h +++ b/libraries/AP_Soaring/Variometer.h @@ -78,7 +78,7 @@ public: float get_exp_thermalling_sink(void) const {return _expected_thermalling_sink;}; - float calculate_circling_time_constant(const float thermal_bank); + float calculate_circling_time_constant(const float thermal_bank) const; private: const PolarParams &_polarParams;