_orient[3] = 0; _orient[4] = 1; _orient[5] = 0;
_orient[6] = 0; _orient[7] = 0; _orient[8] = 1;
+ _chord = 0;
_incidence = 0;
_slatPos = _spoilerPos = _flapPos = 0;
_slatDrag = _spoilerDrag = _flapDrag = 1;
// Airfoil lift (pre-stall and zero-alpha) torques "up" (negative
// torque) around the Y axis, while flap lift pushes down. Both
// forces are considered to act at one third chord from the
- // center. Convert to local (i.e. airplane) coordiantes and store
+ // edge. Convert to local (i.e. airplane) coordiantes and store
// into "torque".
torque[0] = 0;
- torque[1] = 0.33 * _chord * (flapLift - (_cz*_cz0 + stallLift));
+ torque[1] = 0.1667f * _chord * (flapLift - (_cz*_cz0 + stallLift));
torque[2] = 0;
Math::tmul33(_orient, torque, torque);
Math::tmul33(_orient, out, out);
// Add in the units to make a real force:
- float scale = 0.5*rho*vel*vel*_c0;
+ float scale = 0.5f*rho*vel*vel*_c0;
Math::mul3(scale, out, out);
Math::mul3(scale, torque, torque);
}
return 1;
// (note mask: we want to use the "positive" stall angle here)
- float scale = 0.5*_peaks[fwdBak]/_stalls[i&2];
+ float scale = 0.5f*_peaks[fwdBak]/_stalls[i&2];
// Before the stall
if(alpha <= stallAlpha)