From 4aaafec0c98e5fe45c3f288aeb807e12e16fe997 Mon Sep 17 00:00:00 2001 From: Alberto Nidasio <alberto.nidasio@skywarder.eu> Date: Fri, 29 Apr 2022 10:01:08 +0200 Subject: [PATCH] [Constants] Added MSL_PRESSURE and MSL_TEMPERATURE --- src/shared/utils/Constants.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shared/utils/Constants.h b/src/shared/utils/Constants.h index 418175edc..ddc1e8109 100644 --- a/src/shared/utils/Constants.h +++ b/src/shared/utils/Constants.h @@ -34,10 +34,13 @@ static constexpr const float RADIANS_TO_DEGREES = 180.0f / PI; static constexpr const float g = 9.80665f; // [m^s^2] -constexpr float a = 0.0065f; // Troposphere temperature gradient [deg/m] -constexpr float R = 287.05f; // Air gas constant [J/Kg/K] -constexpr float n = g / (R * a); -constexpr float nInv = (R * a) / g; +static constexpr float a = 0.0065f; // Troposphere temperature gradient [deg/m] +static constexpr float R = 287.05f; // Air gas constant [J/Kg/K] +static constexpr float n = g / (R * a); +static constexpr float nInv = (R * a) / g; + +static constexpr const float MSL_PRESSURE = 101325.0f; // [Pa] +static constexpr const float MSL_TEMPERATURE = 288.15f; // [Kelvin] } // namespace Constants -- GitLab