From 12b2022503fa2c4165752d575c014859e1aeb38c Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Sun, 4 Mar 2018 22:18:45 +0100 Subject: [PATCH] YASim add error message, solver shall not quit silently. --- src/FDM/YASim/Airplane.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index 51a92b56c..231a4f401 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -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