#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.
// out the middle of the western hemisphere.
class Glue {
public:
- static void calcAlphaBeta(State* s, float* alpha, float* beta);
+ static void calcAlphaBeta(State* s, float* wind, float* alpha, float* beta);
// Calculates the instantaneous rotation velocities about each
// axis.
// orientation
float alpha, beta;
- Glue::calcAlphaBeta(s, &alpha, &beta);
+ Glue::calcAlphaBeta(s, wind, &alpha, &beta);
_set_Alpha(alpha);
_set_Beta(beta);