diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index cae87ff48..89a4ef0bb 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -199,6 +199,9 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, net->turbulence_norm = fgGetDouble("/environment/turbulence/magnitude-norm"); + net->temp_c = fgGetDouble("/environment/temperature-degc"); + net->press_inhg = fgGetDouble("/environment/pressure-sea-level-inhg"); + // cur_fdm_state->get_ground_elev_ft() is what we want ... this // reports the altitude of the aircraft. // "/environment/ground-elevation-m" reports the ground elevation @@ -260,7 +263,9 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, htond(net->wind_speed_kt); htond(net->wind_dir_deg); htond(net->turbulence_norm); - htond(net->hground); + htond(net->temp_c); + htond(net->press_inhg); + htond(net->hground); htond(net->magvar); net->speedup = htonl(net->speedup); net->freeze = htonl(net->freeze); @@ -316,6 +321,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, htond(net->wind_speed_kt); htond(net->wind_dir_deg); htond(net->turbulence_norm); + htond(net->temp_c); + htond(net->press_inhg); htond(net->hground); htond(net->magvar); net->speedup = htonl(net->speedup); @@ -391,6 +398,11 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, node->setDoubleValue( "turbulence/magnitude-norm", net->turbulence_norm ); node->setBoolValue( "magnetic-variation-deg", net->magvar ); + node->setDoubleValue( "/environment/temperature-degc", + net->temp_c ); + node->setDoubleValue( "/environment/pressure-sea-level-inhg", + net->press_inhg ); + // ground elevation ??? fgSetInt( "/sim/speed-up", net->speedup ); diff --git a/src/Network/net_ctrls.hxx b/src/Network/net_ctrls.hxx index d44b9362f..c536de60c 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 = 17; +const int FG_NET_CTRLS_VERSION = 18; // Define a structure containing the control parameters @@ -96,6 +96,10 @@ public: double wind_dir_deg; double turbulence_norm; + // temp and pressure + double temp_c; + double press_inhg; + // other information about environment double hground; // ground elevation (meters) double magvar; // local magnetic variation in degs.