X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fnative_ctrls.cxx;h=2ad871f834f28387b39baebd9cb1eea00661e054;hb=a0588272dc51ef0b2630f981cf1a913665cdc87a;hp=16a2da980aec1b32514b02ccd1d8b43f3f3ffc6b;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 16a2da980..2ad871f83 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -29,7 +29,6 @@ #include #include // endian tests -#include #include
#include // ground elevation @@ -39,7 +38,7 @@ #if defined( _MSC_VER ) # include #elif defined( __MINGW32__ ) -# include +# include #else # include // htonl() ntohl() #endif @@ -205,12 +204,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, 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 - // of the current view point which could change substantially if - // the user is switching views. - net->hground = cur_fdm_state->get_ground_elev_ft() * SG_FEET_TO_METER; + net->hground = fgGetDouble("/position/ground-elev-m"); net->magvar = fgGetDouble("/environment/magnetic-variation-deg"); net->icing = fgGetBool("/hazards/icing/wing"); @@ -469,7 +463,6 @@ bool FGNativeCtrls::process() { int length = sizeof(FGNetCtrls); if ( get_direction() == SG_IO_OUT ) { - // cout << "size of cur_fdm_state = " << length << endl; FGProps2NetCtrls( &net_ctrls, true, true );