YASIM: method name clarification (and indention)
This commit is contained in:
parent
0e6552cddf
commit
fb6f965db7
4 changed files with 33 additions and 28 deletions
|
@ -787,13 +787,13 @@ void Airplane::applyDragFactor(float factor)
|
|||
float applied = Math::pow(factor, SOLVE_TWEAK);
|
||||
_dragFactor *= applied;
|
||||
if(_wing)
|
||||
_wing->setDragScale(_wing->getDragScale() * applied);
|
||||
_wing->multiplyDragCoefficient(applied);
|
||||
if(_tail)
|
||||
_tail->setDragScale(_tail->getDragScale() * applied);
|
||||
_tail->multiplyDragCoefficient(applied);
|
||||
int i;
|
||||
for(i=0; i<_vstabs.size(); i++) {
|
||||
Wing* w = (Wing*)_vstabs.get(i);
|
||||
w->setDragScale(w->getDragScale() * applied);
|
||||
w->multiplyDragCoefficient(applied);
|
||||
}
|
||||
for(i=0; i<_fuselages.size(); i++) {
|
||||
Fuselage* f = (Fuselage*)_fuselages.get(i);
|
||||
|
|
|
@ -853,7 +853,7 @@ Wing* FGFDM::parseWing(XMLAttributes* a, const char* type, Version * version)
|
|||
w->setInducedDrag(0.7*attrf(a, "idrag", 1));
|
||||
|
||||
float effect = attrf(a, "effectiveness", 1);
|
||||
w->setDragScale(w->getDragScale()*effect);
|
||||
w->multiplyDragCoefficient(effect);
|
||||
|
||||
_currObj = w;
|
||||
return w;
|
||||
|
|
|
@ -253,7 +253,7 @@ void Wing::addSurface(Surface* s, float weight, float twist)
|
|||
_surfs.add(sr);
|
||||
}
|
||||
|
||||
void Wing::setDragScale(float scale)
|
||||
void Wing::setDragCoefficient(float scale)
|
||||
{
|
||||
_dragScale = scale;
|
||||
for(int i=0; i<_surfs.size(); i++) {
|
||||
|
@ -262,6 +262,11 @@ void Wing::setDragScale(float scale)
|
|||
}
|
||||
}
|
||||
|
||||
void Wing::multiplyDragCoefficient(float factor)
|
||||
{
|
||||
setDragCoefficient(_dragScale * factor);
|
||||
}
|
||||
|
||||
void Wing::setLiftRatio(float ratio)
|
||||
{
|
||||
_liftRatio = ratio;
|
||||
|
|
|
@ -90,8 +90,8 @@ public:
|
|||
|
||||
// The overall drag coefficient for the wing as a whole. Units are
|
||||
// arbitrary.
|
||||
void setDragScale(float scale);
|
||||
float getDragScale() const { return _dragScale; }
|
||||
void setDragCoefficient(float scale);
|
||||
void multiplyDragCoefficient(float factor);
|
||||
|
||||
// The ratio of force along the Z (lift) direction of each wing
|
||||
// segment to that along the X (drag) direction.
|
||||
|
|
Loading…
Add table
Reference in a new issue