YASim: comment and variable rename
This commit is contained in:
parent
e4343f4f46
commit
a88a498d20
2 changed files with 9 additions and 5 deletions
|
@ -170,8 +170,10 @@ void Airplane::setElevatorControl(const char* propName)
|
|||
/// set property name for hstab trim
|
||||
void Airplane::setHstabTrimControl(const char* propName)
|
||||
{
|
||||
// there must be only one value for tail incidence but we need it in each
|
||||
// config, so we have a 2nd variable
|
||||
_tailIncidence = _addControlSetting(APPROACH, propName, 0);
|
||||
_ti2 = _addControlSetting(CRUISE, propName, 0);
|
||||
_tailIncidenceCopy = _addControlSetting(CRUISE, propName, 0);
|
||||
}
|
||||
|
||||
void Airplane::addControlSetting(Configuration cfg, const char* prop, float val)
|
||||
|
@ -909,7 +911,7 @@ void Airplane::solveAirplane()
|
|||
// no control mapping from XML parser, so we just create "local"
|
||||
// variables for solver instead of full mapping / property
|
||||
_tailIncidence = new ControlSetting;
|
||||
_ti2 = new ControlSetting;
|
||||
_tailIncidenceCopy = new ControlSetting;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
|
@ -942,13 +944,14 @@ void Airplane::solveAirplane()
|
|||
|
||||
// Do the same with the tail incidence
|
||||
float savedIncidence = _tailIncidence->val;
|
||||
_ti2->val = _tailIncidence->val += ARCMIN;
|
||||
// see setHstabTrimControl() for explanation
|
||||
_tailIncidenceCopy->val = _tailIncidence->val += ARCMIN;
|
||||
if (!_tail->setIncidence(_tailIncidence->val)) {
|
||||
_failureMsg = "Tail incidence out of bounds.";
|
||||
return;
|
||||
};
|
||||
runConfig(_cruiseConfig);
|
||||
_ti2->val = _tailIncidence->val = savedIncidence;
|
||||
_tailIncidenceCopy->val = _tailIncidence->val = savedIncidence;
|
||||
_tail->setIncidence(_tailIncidence->val);
|
||||
|
||||
float cpitch1 = _getPitch(_cruiseConfig);
|
||||
|
|
|
@ -244,7 +244,8 @@ private:
|
|||
float _dragFactor {1};
|
||||
float _liftRatio {1};
|
||||
ControlSetting* _tailIncidence {nullptr}; // added to approach config so solver can change it
|
||||
ControlSetting* _ti2 {nullptr}; // copy of _tailIncidence added to cruise config
|
||||
// Copy of _tailIncidence added to cruise config. See setHstabTrimControl() for explanation.
|
||||
ControlSetting* _tailIncidenceCopy {nullptr};
|
||||
ControlSetting* _approachElevator {nullptr};
|
||||
const char* _failureMsg {0};
|
||||
/// hard limits for cg from gear position
|
||||
|
|
Loading…
Add table
Reference in a new issue