1
0
Fork 0

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.
This commit is contained in:
Julian Smith 2020-10-24 18:18:49 +01:00
parent 3591bd8631
commit 2e35b01c89

View file

@ -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(