YASim add error message, solver shall not quit silently.
This commit is contained in:
parent
25e34cc49c
commit
12b2022503
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue