1
0
Fork 0

YASim add error message, solver shall not quit silently.

This commit is contained in:
Henning Stahlke 2018-03-04 22:18:45 +01:00
parent 25e34cc49c
commit 12b2022503

View file

@ -964,8 +964,14 @@ void Airplane::solveAirplane(bool verbose)
float liftFactor = awgt / (awgt+alift);
// Sanity:
if(dragFactor <= 0 || liftFactor <= 0)
if(dragFactor <= 0) {
_failureMsg = "dragFactor < 0 (drag > thrust)";
break;
}
if(liftFactor <= 0) {
_failureMsg = "liftFactor < 0";
break;
}
// And the elevator control in the approach. This works just
// like the tail incidence computation (it's solving for the