YASIM: rename method getMAC to getMACLength
This commit is contained in:
parent
c3bfeb4ba0
commit
43af435085
3 changed files with 6 additions and 6 deletions
|
@ -320,7 +320,7 @@ float Airplane::compileWing(Wing* w)
|
|||
_wingsN->getNode("wing-area", true)->setFloatValue(w->getArea());
|
||||
_wingsN->getNode("aspect-ratio", true)->setFloatValue(w->getAspectRatio());
|
||||
_wingsN->getNode("standard-mean-chord", true)->setFloatValue(w->getSMC());
|
||||
_wingsN->getNode("mac", true)->setFloatValue(w->getMAC());
|
||||
_wingsN->getNode("mac", true)->setFloatValue(w->getMACLength());
|
||||
_wingsN->getNode("mac-x", true)->setFloatValue(w->getMACx());
|
||||
_wingsN->getNode("mac-y", true)->setFloatValue(w->getMACy());
|
||||
}
|
||||
|
@ -547,8 +547,8 @@ void Airplane::compile()
|
|||
aeroWgt += compileWing(_wing);
|
||||
|
||||
// convert % to absolute x coordinates
|
||||
_cgDesiredFront = _wing->getMACx() - _wing->getMAC()*_cgDesiredMin;
|
||||
_cgDesiredAft = _wing->getMACx() - _wing->getMAC()*_cgDesiredMax;
|
||||
_cgDesiredFront = _wing->getMACx() - _wing->getMACLength()*_cgDesiredMin;
|
||||
_cgDesiredAft = _wing->getMACx() - _wing->getMACLength()*_cgDesiredMax;
|
||||
if (baseN != 0) {
|
||||
SGPropertyNode_ptr n = fgGetNode("/fdm/yasim/model", true);
|
||||
n->getNode("cg-x-range-front", true)->setFloatValue(_cgDesiredFront);
|
||||
|
@ -1034,7 +1034,7 @@ float Airplane::getCGMAC()
|
|||
if (_wing) {
|
||||
float cg[3];
|
||||
_model.getBody()->getCG(cg);
|
||||
return (_wing->getMACx() - cg[0]) / _wing->getMAC();
|
||||
return (_wing->getMACx() - cg[0]) / _wing->getMACLength();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
float getArea() const { return _wingspan*_meanChord; };
|
||||
float getAspectRatio() const { return _aspectRatio; };
|
||||
float getSMC() const { return _meanChord; };
|
||||
float getMAC() const { return _mac; }; // get length of MAC
|
||||
float getMACLength() const { return _mac; }; // get length of MAC
|
||||
float getMACx() const { return _macX; }; // get x-coord of MAC leading edge
|
||||
float getMACy() const { return _base[1]+_macRootDistance; }; // get y-coord of MAC leading edge
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ int main(int argc, char** argv)
|
|||
float MAC = 0, MACx = 0, MACy = 0;
|
||||
Wing* wing = a->getWing();
|
||||
if (wing) {
|
||||
MAC = a->getWing()->getMAC();
|
||||
MAC = a->getWing()->getMACLength();
|
||||
MACx = a->getWing()->getMACx();
|
||||
MACy = a->getWing()->getMACy();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue