]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Glue.cpp
Fix for bug 1304 - crash loading XML route
[flightgear.git] / src / FDM / YASim / Glue.cpp
index 8922363da0a83720b596bfc0b8a3753ea91d6795..90e9fdb249efe32262ec770009b9a74595034e97 100644 (file)
@@ -2,11 +2,12 @@
 #include "Glue.hpp"
 namespace yasim {
 
-void Glue::calcAlphaBeta(State* s, float* alpha, float* beta)
+void Glue::calcAlphaBeta(State* s, float* wind, float* alpha, float* beta)
 {
     // Convert the velocity to the aircraft frame.
     float v[3];
-    Math::vmul33(s->orient, s->v, v);
+    Math::sub3(s->v, wind, v);
+    Math::vmul33(s->orient, v, v);
 
     // By convention, positive alpha is an up pitch, and a positive
     // beta is yawed to the right.