From 2e35b01c89ced82a984d79c2623f3c5370c6efee Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sat, 24 Oct 2020 18:18:49 +0100 Subject: [PATCH] src/FDM/YASim/FGFDM.cpp: show negative thrust in engines/engine[]/thrust-lbs We previously only showed the magnitude of the thrust; this patch uses the sign of first element of thrust vector. Makes things less confusing if an engine is stopped or otherwise causing drag rather than thrust. --- src/FDM/YASim/FGFDM.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FDM/YASim/FGFDM.cpp b/src/FDM/YASim/FGFDM.cpp index 2fbff83f8..06e1d7c68 100644 --- a/src/FDM/YASim/FGFDM.cpp +++ b/src/FDM/YASim/FGFDM.cpp @@ -466,6 +466,7 @@ void FGFDM::setOutputProperties(float dt) float tmp[3]; t->getThrust(tmp); float lbs = Math::mag3(tmp) * (KG2LBS/9.8); + if (tmp[0] < 0) lbs = -lbs; // Show negative thrust in properties. tp._prop_thrust->setFloatValue(lbs); // Deprecated name tp._thrust_lbs->setFloatValue(lbs); tp._fuel_flow_gph->setFloatValue(