From 0db099d08cf13b8913e0b034c73c08081f9a5fa7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell <andrew@tridgell.net> Date: Sat, 23 Apr 2022 11:54:45 +1000 Subject: [PATCH] mavextra: added airspeed_tas method --- mavextra.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mavextra.py b/mavextra.py index ee7515a5..cccd2745 100644 --- a/mavextra.py +++ b/mavextra.py @@ -657,6 +657,10 @@ def eas2tas(alt_m, groundtemp=25.0): eas2tas_squared = SSL_AIR_DENSITY / (pressure / (ISA_GAS_CONSTANT * tempK)) return sqrt(eas2tas_squared) +def airspeed_tas(VFR_HUD,GLOBAL_POSITION_INT): + '''airspeed as true airspeed from VFR_HUD and GLOBAL_POSITION_INT''' + return eas2tas(GLOBAL_POSITION_INT.alt*0.001) * VFR_HUD.airspeed + def airspeed_ratio(VFR_HUD): '''recompute airspeed with a different ARSPD_RATIO''' from . import mavutil -- GitLab