_liftRatio = 1;
_cruiseAoA = 0;
_tailIncidence = 0;
+
+ _failureMsg = 0;
}
Airplane::~Airplane()
float fwd[3];
Math::sub3(f->front, f->back, fwd);
float len = Math::mag3(fwd);
+ if (len == 0) {
+ _failureMsg = "Zero length fuselage";
+ return 0;
+ }
float wid = f->width;
int segs = (int)Math::ceil(len/wid);
float segWgt = len*wid/segs;
_model.setGroundEffect(gepos, gespan, 0.15f);
}
+ // solve function below resets failure message
+ // so check if we have any problems and abort here
+ if (_failureMsg) return;
+
solveGear();
if(_wing && _tail) solve();
else