X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FAV400Sim.cxx;h=cbbe2b4950b6ef907f47c3b64d7950abe969d477;hb=cff6b2034de866df70a2b29feb3383ee8ccbbef6;hp=2d704a83ebe71b75a8e317818cf796f01d1d1433;hpb=12c5a631f6be4c945da88ac7ba1c3e1c6f992904;p=flightgear.git diff --git a/src/Network/AV400Sim.cxx b/src/Network/AV400Sim.cxx index 2d704a83e..cbbe2b495 100644 --- a/src/Network/AV400Sim.cxx +++ b/src/Network/AV400Sim.cxx @@ -29,21 +29,27 @@ # include "config.h" #endif +#include +#include +#include + #include #include #include #include -#include +#include #include
#include
#include "AV400Sim.hxx" FGAV400Sim::FGAV400Sim() { + fdm = new FlightProperties; } FGAV400Sim::~FGAV400Sim() { + delete fdm; } @@ -60,7 +66,7 @@ bool FGAV400Sim::gen_message() { double min; // create msg_a - double latd = cur_fdm_state->get_Latitude() * SGD_RADIANS_TO_DEGREES; + double latd = fdm->get_Latitude() * SGD_RADIANS_TO_DEGREES; if ( latd < 0.0 ) { latd = -latd; dir = 'S'; @@ -72,7 +78,7 @@ bool FGAV400Sim::gen_message() { sprintf( msg_a, "a%c %03d %04.0f\r\n", dir, deg, min); // create msg_b - double lond = cur_fdm_state->get_Longitude() * SGD_RADIANS_TO_DEGREES; + double lond = fdm->get_Longitude() * SGD_RADIANS_TO_DEGREES; if ( lond < 0.0 ) { lond = -lond; dir = 'W'; @@ -84,7 +90,7 @@ bool FGAV400Sim::gen_message() { sprintf( msg_b, "b%c %03d %04.0f\r\n", dir, deg, min); // create msg_c - double alt = cur_fdm_state->get_Altitude(); + double alt = fdm->get_Altitude(); if ( alt > 99999.0 ) { alt = 99999.0; } sprintf( msg_c, "c%05.0f\r\n", alt );