From 6e635692e21ebabbe76da7ce71ad8a4d483e16df Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 24 Nov 2003 21:08:44 +0000 Subject: [PATCH] Add support for passing alpha/beta values. --- src/Network/native_fdm.cxx | 8 ++++++++ src/Network/net_fdm.hxx | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Network/native_fdm.cxx b/src/Network/native_fdm.cxx index 665004948..550fb49bb 100644 --- a/src/Network/native_fdm.cxx +++ b/src/Network/native_fdm.cxx @@ -133,6 +133,8 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) { net->phi = cur_fdm_state->get_Phi(); net->theta = cur_fdm_state->get_Theta(); net->psi = cur_fdm_state->get_Psi(); + net->alpha = cur_fdm_state->get_Alpha(); + net->beta = cur_fdm_state->get_Beta(); net->phidot = cur_fdm_state->get_Phi_dot_degps() * SG_DEGREES_TO_RADIANS; net->thetadot = cur_fdm_state->get_Theta_dot_degps() * SG_DEGREES_TO_RADIANS; @@ -219,6 +221,8 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) { htonf(net->phi); htonf(net->theta); htonf(net->psi); + htonf(net->alpha); + htonf(net->beta); htonf(net->phidot); htonf(net->thetadot); @@ -292,6 +296,8 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) { htonf(net->phi); htonf(net->theta); htonf(net->psi); + htonf(net->alpha); + htonf(net->beta); htonf(net->phidot); htonf(net->thetadot); @@ -367,6 +373,8 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) { cur_fdm_state->_set_Euler_Angles( net->phi, net->theta, net->psi ); + cur_fdm_state->_set_Alpha( net->alpha ); + cur_fdm_state->_set_Beta( net->beta ); cur_fdm_state->_set_Euler_Rates( net->phidot, net->thetadot, net->psidot ); diff --git a/src/Network/net_fdm.hxx b/src/Network/net_fdm.hxx index f40e7ddf4..0294d08fb 100644 --- a/src/Network/net_fdm.hxx +++ b/src/Network/net_fdm.hxx @@ -32,7 +32,7 @@ #include // time_t -const int FG_NET_FDM_VERSION = 15; +const int FG_NET_FDM_VERSION = 16; // Define a structure containing the top level flight dynamics model @@ -62,6 +62,8 @@ public: float phi; // roll (radians) float theta; // pitch (radians) float psi; // yaw or true heading (radians) + float alpha; // angle of attack + float beta; // side slip angle // Velocities float phidot; // roll rate (radians/sec) -- 2.39.5