]> git.mxchange.org Git - flightgear.git/commitdiff
Add /environment/turbulence-norm to the output structure.
authorcurt <curt>
Fri, 27 Jun 2003 18:21:04 +0000 (18:21 +0000)
committercurt <curt>
Fri, 27 Jun 2003 18:21:04 +0000 (18:21 +0000)
src/Network/native_ctrls.cxx
src/Network/net_ctrls.hxx

index 6a4d858b2c04d5e4747616f04763baad046ae4a1..9ecc0d109712666fac261d9b608cedd3e9730c50 100644 (file)
@@ -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 ???
index 553ca093e2d15c297beb2729916cc628367da767..cd93882bcef0d3d320a81a0dd167292444364432 100644 (file)
@@ -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)