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) {