YASim Surface move initialization
This commit is contained in:
parent
efde524685
commit
f9334d8c39
2 changed files with 25 additions and 48 deletions
|
@ -7,35 +7,12 @@ int Surface::s_idGenerator = 0;
|
|||
Surface::Surface( Version * version ) :
|
||||
_version(version)
|
||||
{
|
||||
// create id for surface
|
||||
_id = s_idGenerator++;
|
||||
// Start in a "sane" mode, so unset stuff doesn't freak us out
|
||||
_c0 = 1;
|
||||
_cx = _cy = _cz = 1;
|
||||
_cz0 = 0;
|
||||
_peaks[0] = _peaks[1] = 1;
|
||||
int i;
|
||||
for(i=0; i<4; i++) {
|
||||
_stalls[i] = 0;
|
||||
_widths[i] = 0.01; // half a degree
|
||||
}
|
||||
|
||||
_orient[0] = 1; _orient[1] = 0; _orient[2] = 0;
|
||||
_orient[3] = 0; _orient[4] = 1; _orient[5] = 0;
|
||||
_orient[6] = 0; _orient[7] = 0; _orient[8] = 1;
|
||||
|
||||
_chord = 0;
|
||||
_incidence = 0;
|
||||
_twist = 0;
|
||||
_slatPos = _spoilerPos = _flapPos = 0;
|
||||
_slatDrag = _spoilerDrag = _flapDrag = 1;
|
||||
|
||||
_flapLift = 0;
|
||||
_flapEffectiveness = 1;
|
||||
_slatAlpha = 0;
|
||||
_spoilerLift = 1;
|
||||
_inducedDrag = 1;
|
||||
_stallAlpha = 0;
|
||||
_alpha = 0;
|
||||
_surfN = fgGetNode("/fdm/yasim/debug/surfaces", true);
|
||||
if (_surfN != 0) {
|
||||
_surfN = _surfN->getChild("surface", _id, true);
|
||||
|
|
|
@ -92,36 +92,36 @@ private:
|
|||
float flapLift(float alpha);
|
||||
float controlDrag(float lift, float drag);
|
||||
|
||||
float _chord; // X-axis size
|
||||
float _c0; // total force coefficient
|
||||
float _cx; // X-axis force coefficient
|
||||
float _cy; // Y-axis force coefficient
|
||||
float _cz; // Z-axis force coefficient
|
||||
float _cz0; // Z-axis force offset
|
||||
float _peaks[2]; // Stall peak coefficients (fwd, back)
|
||||
float _stalls[4]; // Stall angles (fwd/back, pos/neg)
|
||||
float _widths[4]; // Stall widths " "
|
||||
float _chord {0}; // X-axis size
|
||||
float _c0 {1}; // total force coefficient
|
||||
float _cx {1}; // X-axis force coefficient
|
||||
float _cy {1}; // Y-axis force coefficient
|
||||
float _cz {1}; // Z-axis force coefficient
|
||||
float _cz0 {0}; // Z-axis force offset
|
||||
float _peaks[2] {1, 1}; // Stall peak coefficients (fwd, back)
|
||||
float _stalls[4] {0, 0, 0, 0}; // Stall angles (fwd/back, pos/neg)
|
||||
float _widths[4] {0.01, 0.01, 0.01, 0.01}; // Stall widths " "
|
||||
float _pos[3]; // position in local coords
|
||||
float _orient[9]; // local->surface orthonormal matrix
|
||||
|
||||
float _slatAlpha;
|
||||
float _slatDrag;
|
||||
float _flapLift;
|
||||
float _flapDrag;
|
||||
float _flapEffectiveness;
|
||||
float _spoilerLift;
|
||||
float _spoilerDrag;
|
||||
float _slatAlpha {0};
|
||||
float _slatDrag {1};
|
||||
float _flapLift {0};
|
||||
float _flapDrag {1};
|
||||
float _flapEffectiveness {1};
|
||||
float _spoilerLift {1};
|
||||
float _spoilerDrag {1};
|
||||
|
||||
float _slatPos;
|
||||
float _flapPos;
|
||||
float _spoilerPos;
|
||||
float _incidence;
|
||||
float _twist;
|
||||
float _inducedDrag;
|
||||
float _slatPos {0};
|
||||
float _flapPos {0};
|
||||
float _spoilerPos {0};
|
||||
float _incidence {0};
|
||||
float _twist {0};
|
||||
float _inducedDrag {1};
|
||||
|
||||
// used during calculations
|
||||
float _stallAlpha;
|
||||
float _alpha;
|
||||
float _stallAlpha {0};
|
||||
float _alpha {0};
|
||||
|
||||
Version * _version;
|
||||
SGPropertyNode* _fxN;
|
||||
|
|
Loading…
Reference in a new issue