From a574116252f40e97e065fb49e79768b4120483cc Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 27 Jun 2003 18:21:04 +0000 Subject: [PATCH] Add /environment/turbulence-norm to the output structure. --- src/Network/native_ctrls.cxx | 8 ++++++-- src/Network/net_ctrls.hxx | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 6a4d858b2..9ecc0d109 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -171,6 +171,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool net_byte_order ) { net->wind_speed_kt = fgGetDouble("/environment/wind-speed-kt"); net->wind_dir_deg = fgGetDouble("/environment/wind-from-heading-deg"); + net->turbulence_norm = fgGetDouble("/environment/turbulence-norm"); // cur_fdm_state->get_ground_elev_ft() is what we want ... this // reports the altitude of the aircraft. @@ -223,6 +224,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool net_byte_order ) { net->master_avionics = htonl(net->master_avionics); htond(net->wind_speed_kt); htond(net->wind_dir_deg); + htond(net->turbulence_norm); htond(net->hground); htond(net->magvar); net->speedup = htonl(net->speedup); @@ -269,6 +271,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool net_byte_order ) { net->master_avionics = htonl(net->master_avionics); htond(net->wind_speed_kt); htond(net->wind_dir_deg); + htond(net->turbulence_norm); htond(net->hground); htond(net->magvar); net->speedup = htonl(net->speedup); @@ -324,8 +327,9 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool net_byte_order ) { node->setBoolValue( "master-avionics", net->master_avionics ); node = fgGetNode( "/environment", true ); - node->setBoolValue( "wind-speed-kt", net->wind_speed_kt ); - node->setBoolValue( "wind-from-heading-deg", net->wind_dir_deg ); + node->setDoubleValue( "wind-speed-kt", net->wind_speed_kt ); + node->setDoubleValue( "wind-from-heading-deg", net->wind_dir_deg ); + node->setDoubleValue( "turbulence-norm", net->turbulence_norm ); node->setBoolValue( "magnetic-variation-deg", net->magvar ); // ground elevation ??? diff --git a/src/Network/net_ctrls.hxx b/src/Network/net_ctrls.hxx index 553ca093e..cd93882bc 100644 --- a/src/Network/net_ctrls.hxx +++ b/src/Network/net_ctrls.hxx @@ -30,7 +30,7 @@ # error This library requires C++ #endif -const int FG_NET_CTRLS_VERSION = 13; +const int FG_NET_CTRLS_VERSION = 14; // Define a structure containing the control parameters @@ -83,6 +83,7 @@ public: // wind and turbulance double wind_speed_kt; double wind_dir_deg; + double turbulence_norm; // other information about environment double hground; // ground elevation (meters)