From 7f5a0e35184677c21f1eafdfbe6438eb644cdbff Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 15 Apr 2011 00:15:18 +0200 Subject: [PATCH] Adrian Musceac: #303, YASim solver settings The internal solver of YASim which computes drag and lift coefficients now actually uses the values configured in the XML input file for approach fuel, cruise fuel and cruise glide angle. --- src/FDM/YASim/Airplane.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index 483da4269..f63eaaa5e 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -671,8 +671,8 @@ void Airplane::compile() t->handle = body->addMass(0, t->pos); totalFuel += t->cap; } - _cruiseWeight = _emptyWeight + totalFuel*0.5f; - _approachWeight = _emptyWeight + totalFuel*0.2f; + _cruiseWeight = _emptyWeight + totalFuel*_cruiseFuel; + _approachWeight = _emptyWeight + totalFuel*_approachFuel; body->recalc(); @@ -795,7 +795,7 @@ void Airplane::setupWeights(bool isApproach) void Airplane::runCruise() { - setupState(_cruiseAoA, _cruiseSpeed,_approachGlideAngle, &_cruiseState); + setupState(_cruiseAoA, _cruiseSpeed,_cruiseGlideAngle, &_cruiseState); _model.setState(&_cruiseState); _model.setAir(_cruiseP, _cruiseT, Atmosphere::calcStdDensity(_cruiseP, _cruiseT));