1
0
Fork 0

Added flap_deflection so that remote fdm can pass back actual flap deflection

in order to drive the flap sound effects and animation.
This commit is contained in:
curt 2002-06-03 23:35:43 +00:00
parent 04e083083d
commit 11766afb6c
2 changed files with 6 additions and 3 deletions

View file

@ -149,8 +149,8 @@ static void net2global( FGNetFDM *net ) {
} }
net->num_wheels = htonl(net->num_wheels); net->num_wheels = htonl(net->num_wheels);
// I don't need to convert the Wow flags, since they are one byte in size // I don't need to convert the Wow flags, since they are one byte in size
htond(net->flap_deflection);
net->cur_time = ntohl(net->cur_time); net->cur_time = ntohl(net->cur_time);
net->warp = ntohl(net->warp); net->warp = ntohl(net->warp);
@ -213,6 +213,8 @@ static void net2global( FGNetFDM *net ) {
node->setDoubleValue("wow", net->wow[i] ); node->setDoubleValue("wow", net->wow[i] );
} }
fgSetDouble("/surface-positions/flap-pos-norm", net->flap_deflection);
/* these are ignored for now ... */ /* these are ignored for now ... */
/* /*
if ( net->cur_time ) { if ( net->cur_time ) {

View file

@ -32,7 +32,7 @@
#include <time.h> // time_t #include <time.h> // time_t
const int FG_NET_FDM_VERSION = 6; const int FG_NET_FDM_VERSION = 7;
// Define a structure containing the top level flight dynamics model // Define a structure containing the top level flight dynamics model
@ -88,9 +88,10 @@ public:
int num_tanks; // Max number of fuel tanks int num_tanks; // Max number of fuel tanks
double fuel_quantity[FG_MAX_TANKS]; double fuel_quantity[FG_MAX_TANKS];
// Gear status // Gear and flaps status
int num_wheels; int num_wheels;
bool wow[FG_MAX_WHEELS]; bool wow[FG_MAX_WHEELS];
double flap_deflection; // normalized from 0 = up to 1 = full deflection
// Environment // Environment
time_t cur_time; // current unix time time_t cur_time; // current unix time