Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence)
Surface::calcForce() now does reverse incidence rotation of force vector properly.
This commit is contained in:
parent
e7dec994b8
commit
aa27b38666
1 changed files with 4 additions and 2 deletions
|
@ -225,8 +225,10 @@ void Surface::calcForce(float* v, float rho, float* out, float* torque)
|
||||||
Math::add3(lwind, out, out);
|
Math::add3(lwind, out, out);
|
||||||
|
|
||||||
// Reverse the incidence rotation to get back to surface
|
// Reverse the incidence rotation to get back to surface
|
||||||
// coordinates.
|
// coordinates. Since out[] is now the force vector and is
|
||||||
out[2] -= incidence * out[0];
|
// roughly parallel with Z, the small-angle approximation
|
||||||
|
// must change its X component.
|
||||||
|
out[0] -= incidence * out[2];
|
||||||
|
|
||||||
// Convert back to external coordinates
|
// Convert back to external coordinates
|
||||||
Math::tmul33(_orient, out, out);
|
Math::tmul33(_orient, out, out);
|
||||||
|
|
Loading…
Add table
Reference in a new issue