YASim: add initalizer to Wing.hpp, cleanup constructor.
This commit is contained in:
parent
b4743b3830
commit
37c43ab6dc
2 changed files with 43 additions and 79 deletions
|
@ -7,47 +7,12 @@ static const float RAD2DEG = 57.2957795131;
|
|||
Wing::Wing( Version * version ) :
|
||||
_version(version)
|
||||
{
|
||||
_mirror = false;
|
||||
_base[0] = _base[1] = _base[2] = 0;
|
||||
_length = 0;
|
||||
_chord = 0;
|
||||
_taper = 0;
|
||||
_sweep = 0;
|
||||
_dihedral = 0;
|
||||
_stall = 0;
|
||||
_stallWidth = 0;
|
||||
_stallPeak = 0;
|
||||
_twist = 0;
|
||||
_camber = 0;
|
||||
_incidence = 0;
|
||||
_inducedDrag = 1;
|
||||
_dragScale = 1;
|
||||
_liftRatio = 1;
|
||||
_flap0Start = 0;
|
||||
_flap0End = 0;
|
||||
_flap0Lift = 0;
|
||||
_flap0Drag = 0;
|
||||
_flap1Start = 0;
|
||||
_flap1End = 0;
|
||||
_flap1Lift = 0;
|
||||
_flap1Drag = 0;
|
||||
_spoilerStart = 0;
|
||||
_spoilerEnd = 0;
|
||||
_spoilerLift = 0;
|
||||
_spoilerDrag = 0;
|
||||
_slatStart = 0;
|
||||
_slatEnd = 0;
|
||||
_slatAoA = 0;
|
||||
_slatDrag = 0;
|
||||
_meanChord = 0;
|
||||
_wingspan = 0;
|
||||
_aspectRatio = 1;
|
||||
|
||||
}
|
||||
|
||||
Wing::~Wing()
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<_surfs.size(); i++) {
|
||||
for(int i=0; i<_surfs.size(); i++) {
|
||||
SurfRec* s = (SurfRec*)_surfs.get(i);
|
||||
delete s->surface;
|
||||
delete s;
|
||||
|
@ -57,8 +22,7 @@ Wing::~Wing()
|
|||
void Wing::setIncidence(float incidence)
|
||||
{
|
||||
_incidence = incidence;
|
||||
int i;
|
||||
for(i=0; i<_surfs.size(); i++)
|
||||
for(int i=0; i<_surfs.size(); i++)
|
||||
((SurfRec*)_surfs.get(i))->surface->setIncidence(incidence);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,55 +106,55 @@ private:
|
|||
Vector _slatSurfs;
|
||||
Vector _spoilerSurfs;
|
||||
|
||||
bool _mirror;
|
||||
bool _mirror {false};
|
||||
|
||||
float _base[3];
|
||||
float _length;
|
||||
float _chord;
|
||||
float _taper;
|
||||
float _sweep;
|
||||
float _dihedral;
|
||||
float _base[3] {0,0,0};
|
||||
float _length {0};
|
||||
float _chord {0};
|
||||
float _taper {1};
|
||||
float _sweep {0};
|
||||
float _dihedral {0};
|
||||
|
||||
// calculated from above
|
||||
float _tip[3];
|
||||
float _meanChord; // std. mean chord
|
||||
float _mac; // mean aerodynamic chord length
|
||||
float _macRootDistance; // y-distance of mac from root
|
||||
float _macX; // x-coordinate of mac (leading edge)
|
||||
float _netSpan;
|
||||
float _wingspan;
|
||||
float _aspectRatio;
|
||||
float _tip[3] {0,0,0};
|
||||
float _meanChord {0}; // std. mean chord
|
||||
float _mac {0}; // mean aerodynamic chord length
|
||||
float _macRootDistance {0}; // y-distance of mac from root
|
||||
float _macX {0}; // x-coordinate of mac (leading edge)
|
||||
float _netSpan {0};
|
||||
float _wingspan {0};
|
||||
float _aspectRatio {1};
|
||||
|
||||
float _stall;
|
||||
float _stallWidth;
|
||||
float _stallPeak;
|
||||
float _twist;
|
||||
float _camber;
|
||||
float _incidence;
|
||||
float _inducedDrag;
|
||||
float _stall {0};
|
||||
float _stallWidth {0};
|
||||
float _stallPeak {0};
|
||||
float _twist {0};
|
||||
float _camber {0};
|
||||
float _incidence {0};
|
||||
float _inducedDrag {1};
|
||||
|
||||
float _dragScale;
|
||||
float _liftRatio;
|
||||
float _dragScale {1};
|
||||
float _liftRatio {1};
|
||||
|
||||
float _flap0Start;
|
||||
float _flap0End;
|
||||
float _flap0Lift;
|
||||
float _flap0Drag;
|
||||
float _flap0Start {0};
|
||||
float _flap0End {0};
|
||||
float _flap0Lift {0};
|
||||
float _flap0Drag {0};
|
||||
|
||||
float _flap1Start;
|
||||
float _flap1End;
|
||||
float _flap1Lift;
|
||||
float _flap1Drag;
|
||||
float _flap1Start {0};
|
||||
float _flap1End {0};
|
||||
float _flap1Lift {0};
|
||||
float _flap1Drag {0};
|
||||
|
||||
float _spoilerStart;
|
||||
float _spoilerEnd;
|
||||
float _spoilerLift;
|
||||
float _spoilerDrag;
|
||||
float _spoilerStart {0};
|
||||
float _spoilerEnd {0};
|
||||
float _spoilerLift {0};
|
||||
float _spoilerDrag {0};
|
||||
|
||||
float _slatStart;
|
||||
float _slatEnd;
|
||||
float _slatAoA;
|
||||
float _slatDrag;
|
||||
float _slatStart {0};
|
||||
float _slatEnd {0};
|
||||
float _slatAoA {0};
|
||||
float _slatDrag {0};
|
||||
|
||||
Version * _version;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue