From b8b3140cea1e869329ed1900cd7f16374912ca78 Mon Sep 17 00:00:00 2001 From: Sergey Sklyarov Date: Tue, 8 Jul 2025 15:08:16 +0300 Subject: [PATCH] Update RealMode.cs --- DroneSimulator/RealMode.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DroneSimulator/RealMode.cs b/DroneSimulator/RealMode.cs index 862d57b..39079e8 100644 --- a/DroneSimulator/RealMode.cs +++ b/DroneSimulator/RealMode.cs @@ -212,6 +212,7 @@ namespace DroneSimulator public static float Noise; public static float Lateness; public static bool RealSimulation; + public static float Temperature = 25.0f; private uint last = 0; @@ -226,7 +227,8 @@ namespace DroneSimulator public void Update(float value, uint time) { - value = Pressure - value * 12.15f; + //value = Pressure - value * 12.15f; + value = Pressure * MathF.Exp(-0.02896f * 9.81f * value / (8.314f * (Temperature + 273.15f))); if (!Enable) {