diff --git a/src/FDM/ExternalNet.cxx b/src/FDM/ExternalNet.cxx index 97374d84e..160dc2f83 100644 --- a/src/FDM/ExternalNet.cxx +++ b/src/FDM/ExternalNet.cxx @@ -149,8 +149,8 @@ static void net2global( FGNetFDM *net ) { } 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); @@ -213,6 +213,8 @@ static void net2global( FGNetFDM *net ) { node->setDoubleValue("wow", net->wow[i] ); } + fgSetDouble("/surface-positions/flap-pos-norm", net->flap_deflection); + /* these are ignored for now ... */ /* if ( net->cur_time ) { diff --git a/src/Network/net_fdm.hxx b/src/Network/net_fdm.hxx index e40b7916a..2363f2928 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 = 6; +const int FG_NET_FDM_VERSION = 7; // Define a structure containing the top level flight dynamics model @@ -88,9 +88,10 @@ public: 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