1
0
Fork 0

YASim: update default for desired cg range.

This commit is contained in:
Henning Stahlke 2017-04-18 22:27:35 +02:00
parent 1302c167dd
commit ef9fa25b94
3 changed files with 6 additions and 10 deletions

View file

@ -57,10 +57,6 @@ Airplane::Airplane()
_failureMsg = 0;
_wingsN = 0;
_cgMax = -1e6;
_cgMin = 1e6;
_cgDesiredMax = 0.33f; // FIXME find reasonable default value
_cgDesiredMin = 0.1f; // FIXME find reasonable default value
}
Airplane::~Airplane()

View file

@ -195,10 +195,10 @@ private:
Control _approachElevator;
const char* _failureMsg;
float _cgMax; // hard limits for cg from gear position
float _cgMin; // hard limits for cg from gear position
float _cgDesiredMax; // desired cg max in %MAC from config
float _cgDesiredMin; // desired cg min in %MAC from config
float _cgMax = -1e6; // hard limits for cg from gear position
float _cgMin = 1e6; // hard limits for cg from gear position
float _cgDesiredMax = 0.3f; // desired cg max in %MAC from config
float _cgDesiredMin = 0.25f; // desired cg min in %MAC from config
float _cgDesiredFront; // calculated desired cg x max
float _cgDesiredAft; // calculated desired cg x min
bool _autoBallast = false;

View file

@ -259,7 +259,7 @@ void FGFDM::startElement(const char* name, const XMLAttributes &atts)
if( !_airplane.isVersionOrNewer( Version::YASIM_VERSION_CURRENT ) ) {
SG_LOG(SG_FLIGHT, SG_DEV_ALERT, "This aircraft does not use the latest yasim configuration version.");
}
_airplane.setDesiredCGRangeInPercentOfMAC(attrf(a, "cg-min", 0.1f), attrf(a, "cg-max", 0.3f)); //FIXME find reasonable defaults
_airplane.setDesiredCGRangeInPercentOfMAC(attrf(a, "cg-min", 0.25f), attrf(a, "cg-max", 0.3f)); //FIXME find reasonable defaults
if (attrb(a, "auto-ballast")) {
_airplane.setAutoBallast(true);
}