X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Aircraft%2Faircraft.cxx;h=61b217f8fd7b56723406363bb75f0d1255d38ebe;hb=c74350c4fe126328ced5e080a4d262d0bcba5369;hp=21c9a3518d15d13c26f979f82330c2a029065111;hpb=ad3ae513488acc0364815218dbfd22dc13bf9eab;p=flightgear.git diff --git a/Aircraft/aircraft.cxx b/Aircraft/aircraft.cxx index 21c9a3518..61b217f8f 100644 --- a/Aircraft/aircraft.cxx +++ b/Aircraft/aircraft.cxx @@ -25,7 +25,7 @@ #include #include "aircraft.hxx" -#include +#include #include // This is a record containing all the info for the aircraft currently @@ -35,7 +35,7 @@ fgAIRCRAFT current_aircraft; // Initialize an Aircraft structure void fgAircraftInit( void ) { - fgPrintf( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure\n" ); + FG_LOG( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure" ); current_aircraft.flight = &cur_flight_params; current_aircraft.controls = &controls; @@ -48,24 +48,29 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) { f = a->flight; - fgPrintf( FG_FLIGHT, FG_DEBUG, - "Pos = (%.2f,%.2f,%.2f) (Phi,Theta,Psi)=(%.2f,%.2f,%.2f)\n", - FG_Longitude * 3600.0 * RAD_TO_DEG, - FG_Latitude * 3600.0 * RAD_TO_DEG, - FG_Altitude, FG_Phi, FG_Theta, FG_Psi); - - double elevator = controls.get_elevator(); - double aileron = controls.get_aileron(); - double rudder = controls.get_rudder(); - double throttle = controls.get_throttle( 0 ); - - fgPrintf( FG_FLIGHT, FG_DEBUG, - "Kts = %.0f Elev = %.2f, Aileron = %.2f, Rudder = %.2f Power = %.2f\n", - FG_V_equiv_kts, elevator, aileron,rudder, throttle ); + FG_LOG( FG_FLIGHT, FG_DEBUG, + "Pos = (" + << (FG_Longitude * 3600.0 * RAD_TO_DEG) << "," + << (FG_Latitude * 3600.0 * RAD_TO_DEG) << "," + << FG_Altitude + << ") (Phi,Theta,Psi)=(" + << FG_Phi << "," << FG_Theta << "," << FG_Psi << ")" ); + + FG_LOG( FG_FLIGHT, FG_DEBUG, + "Kts = " << FG_V_equiv_kts + << " Elev = " << controls.get_elevator() + << " Aileron = " << controls.get_aileron() + << " Rudder = " << controls.get_rudder() + << " Power = " << controls.get_throttle( 0 ) ); } // $Log$ +// Revision 1.4 1998/11/06 21:17:31 curt +// Converted to new logstream debugging facility. This allows release +// builds with no messages at all (and no performance impact) by using +// the -DFG_NDEBUG flag. +// // Revision 1.3 1998/10/25 14:08:37 curt // Turned "struct fgCONTROLS" into a class, with inlined accessor functions. //