in order to drive the flap sound effects and animation.
}
net->num_wheels = htonl(net->num_wheels);
-
// 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->warp = ntohl(net->warp);
node->setDoubleValue("wow", net->wow[i] );
}
+ fgSetDouble("/surface-positions/flap-pos-norm", net->flap_deflection);
+
/* these are ignored for now ... */
/*
if ( net->cur_time ) {
#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
int num_tanks; // Max number of fuel tanks
double fuel_quantity[FG_MAX_TANKS];
- // Gear status
+ // Gear and flaps status
int num_wheels;
bool wow[FG_MAX_WHEELS];
+ double flap_deflection; // normalized from 0 = up to 1 = full deflection
// Environment
time_t cur_time; // current unix time