From: curt Date: Thu, 1 Apr 2004 15:27:53 +0000 (+0000) Subject: Clean up various compiler warnings that have crept into the code. This X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2acdd02879a56d8b25eaef7dca4f90b96075df10;p=flightgear.git Clean up various compiler warnings that have crept into the code. This by no means get's them all, but it's a start. --- diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index ab293b98b..717f9a1e7 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -216,7 +216,7 @@ void FGAIAircraft::Run(double dt) { double user_heading = manager->get_user_heading(); double user_pitch = manager->get_user_pitch(); double user_yaw = manager->get_user_yaw(); - double user_speed = manager->get_user_speed(); + // double user_speed = manager->get_user_speed(); // calculate range to target in feet and nautical miles double lat_range = fabs(pos.lat() - user_latitude) * ft_per_deg_lat; diff --git a/src/AIModel/AIStorm.cxx b/src/AIModel/AIStorm.cxx index 532a3f106..8879216f4 100644 --- a/src/AIModel/AIStorm.cxx +++ b/src/AIModel/AIStorm.cxx @@ -105,7 +105,7 @@ void FGAIStorm::Run(double dt) { double user_heading = manager->get_user_heading(); double user_pitch = manager->get_user_pitch(); double user_yaw = manager->get_user_yaw(); - double user_speed = manager->get_user_speed(); + // double user_speed = manager->get_user_speed(); // calculate range to target in feet and nautical miles double lat_range = fabs(pos.lat() - user_latitude) * ft_per_deg_lat; diff --git a/src/AIModel/AIThermal.cxx b/src/AIModel/AIThermal.cxx index 7ceafcee9..0a38f4889 100644 --- a/src/AIModel/AIThermal.cxx +++ b/src/AIModel/AIThermal.cxx @@ -84,7 +84,7 @@ void FGAIThermal::Run(double dt) { ft_per_deg_lat = 366468.96 - 3717.12 * cos(pos.lat()/SG_RADIANS_TO_DEGREES); ft_per_deg_lon = 365228.16 * cos(pos.lat() / SG_RADIANS_TO_DEGREES); - double altitude_ft = altitude * SG_METER_TO_FEET; + // double altitude_ft = altitude * SG_METER_TO_FEET; //###########################// // do calculations for range // @@ -93,7 +93,7 @@ void FGAIThermal::Run(double dt) { // copy values from the AIManager double user_latitude = manager->get_user_latitude(); double user_longitude = manager->get_user_longitude(); - double user_altitude = manager->get_user_altitude(); + // double user_altitude = manager->get_user_altitude(); // calculate range to target in feet and nautical miles double lat_range = fabs(pos.lat() - user_latitude) * ft_per_deg_lat; diff --git a/src/Airports/calc_loc.cxx b/src/Airports/calc_loc.cxx index fe709c3d4..2d8bd6801 100644 --- a/src/Airports/calc_loc.cxx +++ b/src/Airports/calc_loc.cxx @@ -30,7 +30,7 @@ int main( int argc, char **argv ) { double rwy_lon = atof( argv[5] ); double rwy_hdg = atof( argv[6] ); double rwy_len = atof( argv[7] ) * SG_DEGREES_TO_RADIANS; - double rwy_wid = atof( argv[8] ); + // double rwy_wid = atof( argv[8] ); if ( dir == "FOR" ) { rwy_hdg += 180.0; diff --git a/src/Autopilot/xmlauto.cxx b/src/Autopilot/xmlauto.cxx index 217d0e1a8..9aa550c55 100644 --- a/src/Autopilot/xmlauto.cxx +++ b/src/Autopilot/xmlauto.cxx @@ -34,6 +34,8 @@ FGPIDController::FGPIDController( SGPropertyNode *node ): debug( false ), y_n( 0.0 ), r_n( 0.0 ), + y_scale( 1.0 ), + r_scale( 1.0 ), Kp( 0.0 ), alpha( 0.1 ), beta( 1.0 ), @@ -45,9 +47,7 @@ FGPIDController::FGPIDController( SGPropertyNode *node ): ep_n_1( 0.0 ), edf_n_1( 0.0 ), edf_n_2( 0.0 ), - u_n_1( 0.0 ), - r_scale( 1.0 ), - y_scale( 1.0 ) + u_n_1( 0.0 ) { int i; for ( i = 0; i < node->nChildren(); ++i ) { @@ -344,10 +344,10 @@ FGPISimpleController::FGPISimpleController( SGPropertyNode *node ): debug( false ), y_n( 0.0 ), r_n( 0.0 ), - u_min( 0.0 ), - u_max( 0.0 ), y_scale( 1.0 ), - r_scale ( 1.0 ) + r_scale ( 1.0 ), + u_min( 0.0 ), + u_max( 0.0 ) { int i; for ( i = 0; i < node->nChildren(); ++i ) { @@ -512,12 +512,12 @@ void FGPISimpleController::update( double dt ) { FGPredictor::FGPredictor ( SGPropertyNode *node ): - debug( false ), - ivalue( 0.0 ), last_value ( 999999999.9 ), average ( 0.0 ), seconds( 0.0 ), - filter_gain( 0.0 ) + filter_gain( 0.0 ), + debug( false ), + ivalue( 0.0 ) { int i; for ( i = 0; i < node->nChildren(); ++i ) { diff --git a/src/Cockpit/hud_tbi.cxx b/src/Cockpit/hud_tbi.cxx index c6130c867..3c0430c38 100644 --- a/src/Cockpit/hud_tbi.cxx +++ b/src/Cockpit/hud_tbi.cxx @@ -149,7 +149,7 @@ operator = (const fgTBI_instr & rhs ) else //if tsi enabled { - float factor = My_box.right / 6.0; + // float factor = My_box.right / 6.0; drawOneLine(cen_x-1.0, My_box.top, cen_x+1.0, My_box.top); drawOneLine(cen_x-1.0, My_box.top, cen_x-1.0, My_box.top+10.0); diff --git a/src/FDM/ExternalPipe/ExternalPipe.cxx b/src/FDM/ExternalPipe/ExternalPipe.cxx index d5b991817..297fde2a6 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.cxx +++ b/src/FDM/ExternalPipe/ExternalPipe.cxx @@ -43,6 +43,8 @@ FGExternalPipe::FGExternalPipe( double dt, string name ) { valid = true; + last_weight = 0.0; + last_cg_offset = -9999.9; buf = new char[sizeof(char) + sizeof(int) + sizeof(ctrls)]; @@ -168,6 +170,7 @@ void FGExternalPipe::init() { SG_LOG( SG_IO, SG_ALERT, "Write error to named pipe: " << fifo_name_1 ); } } + last_weight = weight; if ( cg_offset > -5.0 || cg_offset < 5.0 ) { sprintf( cmd, "1aircraft-cg-offset-inches=%.2f", cg_offset ); @@ -176,6 +179,7 @@ void FGExternalPipe::init() { SG_LOG( SG_IO, SG_ALERT, "Write error to named pipe: " << fifo_name_1 ); } } + last_cg_offset = cg_offset; SG_LOG( SG_IO, SG_INFO, "before sending reset command." ); @@ -221,7 +225,6 @@ void FGExternalPipe::update( double dt ) { last_weight = weight; double cg_offset = fgGetDouble( "/sim/aircraft-cg-offset-inches" ); - static double last_cg_offset = -9999.9; if ( fabs( cg_offset - last_cg_offset ) > 0.01 ) { char cmd[256]; sprintf( cmd, "1aircraft-cg-offset-inches=%.2f", cg_offset ); @@ -241,18 +244,24 @@ void FGExternalPipe::update( double dt ) { *((int *)ptr) = iterations; ptr += sizeof(int); memcpy( ptr, (char *)(&ctrls), length ); + cout << "writing control structure to remote fdm." << endl; result = write( pd1, buf, length + 1 ); if ( result == -1 ) { SG_LOG( SG_IO, SG_ALERT, "Write error to named pipe: " << fifo_name_1 ); + } else { + cout << " write successful = " << length + 1 << endl; } // Read fdm values length = sizeof(fdm); + cout << "about to read fdm data from remote fdm." << endl; result = read( pd2, (char *)(& fdm), length ); if ( result == -1 ) { SG_LOG( SG_IO, SG_ALERT, "Read error from named pipe: " << fifo_name_2 ); + } else { + cout << " read successful." << endl; } FGNetFDM2Props( &fdm, false ); #endif diff --git a/src/FDM/ExternalPipe/ExternalPipe.hxx b/src/FDM/ExternalPipe/ExternalPipe.hxx index 7043e53a5..04b5661b6 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.hxx +++ b/src/FDM/ExternalPipe/ExternalPipe.hxx @@ -44,6 +44,9 @@ private: FGNetFDM fdm; char *buf; + double last_weight; + double last_cg_offset; + public: // Constructor diff --git a/src/FDM/LaRCsim/c172_aero.c b/src/FDM/LaRCsim/c172_aero.c index 1b79a071c..0128040d8 100644 --- a/src/FDM/LaRCsim/c172_aero.c +++ b/src/FDM/LaRCsim/c172_aero.c @@ -207,7 +207,7 @@ static SCALAR interp(SCALAR *y_table, SCALAR *x_table, int Ntable, SCALAR x) void c172_aero( SCALAR dt, int Initialize ) { - static int init = 0; + // static int init = 0; static int fi=0; static SCALAR lastFlapHandle=0; static SCALAR Ai; diff --git a/src/FDM/LaRCsim/ls_matrix.c b/src/FDM/LaRCsim/ls_matrix.c index 28f91b2df..b2bc9c8d1 100644 --- a/src/FDM/LaRCsim/ls_matrix.c +++ b/src/FDM/LaRCsim/ls_matrix.c @@ -46,8 +46,12 @@ $Header$ $Log$ -Revision 1.1 2002/09/10 01:14:02 curt -Initial revision +Revision 1.2 2004/04/01 15:27:55 curt +Clean up various compiler warnings that have crept into the code. This +by no means get's them all, but it's a start. + +Revision 1.1.1.1 2002/09/10 01:14:02 curt +Initial revision of FlightGear-0.9.0 Revision 1.1.1.1 1999/06/17 18:07:34 curt Start of 0.7.x branch @@ -176,7 +180,7 @@ int nr_gaussj(double **a, int n, double **b, int m) { int *indxc, *indxr, *ipiv; - int i, icol, irow, j, k, l, ll; + int i, icol = 0, irow = 0, j, k, l, ll; double big, dum, pivinv, temp; int bexists = ((m != 0) || (b == 0)); diff --git a/src/FDM/MagicCarpet.cxx b/src/FDM/MagicCarpet.cxx index 885d69cc0..2e26a17a7 100644 --- a/src/FDM/MagicCarpet.cxx +++ b/src/FDM/MagicCarpet.cxx @@ -55,7 +55,7 @@ void FGMagicCarpet::update( double dt ) { if (is_suspended()) return; - int multiloop = _calc_multiloop(dt); + // int multiloop = _calc_multiloop(dt); double time_step = dt; diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index 166a861b5..d5f49c59b 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -212,7 +212,7 @@ float Airplane::getFuel(int tank) float Airplane::setFuel(int tank, float fuel) { - ((Tank*)_tanks.get(tank))->fill = fuel; + return ((Tank*)_tanks.get(tank))->fill = fuel; } float Airplane::getFuelDensity(int tank) diff --git a/src/FDM/YASim/FGFDM.cpp b/src/FDM/YASim/FGFDM.cpp index aa04eea8b..03d23eb87 100644 --- a/src/FDM/YASim/FGFDM.cpp +++ b/src/FDM/YASim/FGFDM.cpp @@ -515,7 +515,7 @@ Rotor* FGFDM::parseRotor(XMLAttributes* a, const char* type) { Rotor* w = new Rotor(); - float defDihed = 0; + // float defDihed = 0; float pos[3]; pos[0] = attrf(a, "x"); diff --git a/src/FDM/YASim/Rotor.cpp b/src/FDM/YASim/Rotor.cpp index 910c41970..4019ba622 100644 --- a/src/FDM/YASim/Rotor.cpp +++ b/src/FDM/YASim/Rotor.cpp @@ -665,7 +665,7 @@ void Rotor::compile() //_delta=omega*_delta; _delta*=maxpitchforce/(_max_pitch*omega*lentocenter*2*_weight_per_blade*.453); float phi=Math::atan2(2*omega*_delta,omega0*omega0-omega*omega); - float phi2=Math::abs(omega0-omega)<.000000001?pi/2:Math::atan(2*omega*_delta/(omega0*omega0-omega*omega)); + // float phi2=Math::abs(omega0-omega)<.000000001?pi/2:Math::atan(2*omega*_delta/(omega0*omega0-omega*omega)); float relamp=omega*omega/(2*_delta*Math::sqrt(sqr(omega0*omega0-omega*omega)+4*_delta*_delta*omega*omega)); if (!_no_torque) { @@ -699,7 +699,8 @@ void Rotor::compile() << " relamp: " << relamp << " delta: " <<_delta); - float lspeed[3],dirzentforce[3]; + // float lspeed[3]; + float dirzentforce[3]; float f=(!_ccw)?1:-1; //Math::mul3(f*speed,directions[1],lspeed); diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 89461511e..6253a2990 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -217,8 +217,8 @@ FGInput::makeDefault (bool status) void FGInput::doKey (int k, int modifiers, int x, int y) { - static SGPropertyNode *heading_enabled - = fgGetNode("/autopilot/locks/heading", true); + // static SGPropertyNode *heading_enabled + // = fgGetNode("/autopilot/locks/heading", true); // Sanity check. if (k < 0 || k >= MAX_KEYS) { diff --git a/src/Instrumentation/adf.cxx b/src/Instrumentation/adf.cxx index bdc051e66..b9af249a7 100644 --- a/src/Instrumentation/adf.cxx +++ b/src/Instrumentation/adf.cxx @@ -49,8 +49,8 @@ adjust_range (double transmitter_elevation_ft, double aircraft_altitude_ft, ADF::ADF () - : _last_frequency_khz(-1), - _time_before_search_sec(0), + : _time_before_search_sec(0), + _last_frequency_khz(-1), _transmitter_valid(false), _transmitter_elevation_ft(0), _transmitter_range_nm(0) diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 1d584e685..3f65e3e94 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -172,8 +172,9 @@ GPS::update (double delta_time_sec) double wp_latitude_deg = _wp_latitude_node->getDoubleValue(); double wp_course_deg = _wp_course_node->getDoubleValue(); - double wp_distance, wp_bearing_deg, wp_actual_radial_deg, - wp_course_deviation_deg, wp_course_error_m, wp_TTW; + double wp_distance, wp_bearing_deg, wp_course_deviation_deg, + wp_course_error_m, wp_TTW; + // double wp_actual_radial_deg; string wp_ID = _wp_ID_node->getStringValue(); // If the get-nearest-airport-node is true. diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 9bb24a554..6a6ba0b36 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -227,6 +227,11 @@ do_reinit (const SGPropertyNode * arg) return result; } +#if 0 + // + // these routines look useful ??? but are never used in the code ??? + // + /** * Built-in command: suspend one or more subsystems. * @@ -275,6 +280,8 @@ do_resume (const SGPropertyNode * arg) return result; } +#endif + /** * Built-in command: load flight. diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index ec0a9b035..093cc19ba 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -660,6 +660,11 @@ static double fgGetAirportElev( const string& id ) { } +#if 0 + // + // This function is never used, but maybe useful in the future ??? + // + // Preset lon/lat given an airport id static bool fgSetPosFromAirportID( const string& id ) { FGAirport a; @@ -687,6 +692,7 @@ static bool fgSetPosFromAirportID( const string& id ) { return false; } } +#endif // Set current tower position lon/lat given an airport id @@ -1438,8 +1444,6 @@ bool fgInitSubsystems() { // static const SGPropertyNode *altitude // = fgGetNode("/sim/presets/altitude-ft"); - FGLight *l = (FGLight *)(globals->get_subsystem("lighting")); - SG_LOG( SG_GENERAL, SG_INFO, "Initialize Subsystems"); SG_LOG( SG_GENERAL, SG_INFO, "========== =========="); @@ -1568,8 +1572,8 @@ bool fgInitSubsystems() { = fgGetNode("/sim/presets/longitude-deg"); static const SGPropertyNode *latitude = fgGetNode("/sim/presets/latitude-deg"); - static const SGPropertyNode *altitude - = fgGetNode("/sim/presets/altitude-ft"); + // static const SGPropertyNode *altitude + // = fgGetNode("/sim/presets/altitude-ft"); SGPath cloud_path(globals->get_fg_root()); #if 0 diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 019bacb45..bef186254 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -818,8 +818,8 @@ void fgUpdateTimeDepCalcs() { = fgGetNode( "/sim/freeze/replay", true ); static SGPropertyNode *replay_time = fgGetNode( "/sim/replay/time", true ); - static const SGPropertyNode *replay_end_time - = fgGetNode( "/sim/replay/end-time", true ); + // static const SGPropertyNode *replay_end_time + // = fgGetNode( "/sim/replay/end-time", true ); //SG_LOG(SG_FLIGHT,SG_INFO, "Updating time dep calcs()"); @@ -902,8 +902,8 @@ static void fgMainLoop( void ) { = fgGetNode("/sim/freeze/clock", true); static const SGPropertyNode *cur_time_override = fgGetNode("/sim/time/cur-time-override", true); - static const SGPropertyNode *replay_master - = fgGetNode("/sim/freeze/replay", true); + // static const SGPropertyNode *replay_master + // = fgGetNode("/sim/freeze/replay", true); // Update the elapsed time. static bool first_time = true; diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 206b2a308..2df1aaef8 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -874,7 +874,7 @@ fgSetupProxy( const char *arg ) { string options = arg; string host, port, auth; - int pos; + unsigned int pos; host = port = auth = ""; if ((pos = options.find("@")) != string::npos) diff --git a/src/Main/viewmgr.cxx b/src/Main/viewmgr.cxx index 1d8dd6ab9..f822043a3 100644 --- a/src/Main/viewmgr.cxx +++ b/src/Main/viewmgr.cxx @@ -51,7 +51,8 @@ FGViewMgr::init () bool at_model = false; int from_model_index = 0; int at_model_index = 0; - double damp_alt, damp_roll, damp_pitch, damp_heading; + // double damp_alt; + double damp_roll = 0.0, damp_pitch = 0.0, damp_heading = 0.0; double x_offset_m, y_offset_m, z_offset_m, fov_deg; double heading_offset_deg, pitch_offset_deg, roll_offset_deg; double target_x_offset_m, target_y_offset_m, target_z_offset_m; diff --git a/src/MultiPlayer/multiplayrxmgr.cxx b/src/MultiPlayer/multiplayrxmgr.cxx index fdc58ba99..474a09faf 100644 --- a/src/MultiPlayer/multiplayrxmgr.cxx +++ b/src/MultiPlayer/multiplayrxmgr.cxx @@ -233,7 +233,7 @@ void FGMultiplayRxMgr::ProcessData(void) { // Data received if (iBytes > 0) { - if (iBytes >= sizeof(MsgHdr)) { + if (iBytes >= (int)sizeof(MsgHdr)) { // Read header MsgHdr = (T_MsgHdr *)sMsg; diff --git a/src/MultiPlayer/multiplaytxmgr.cxx b/src/MultiPlayer/multiplaytxmgr.cxx index ad0413860..ff7079a80 100644 --- a/src/MultiPlayer/multiplaytxmgr.cxx +++ b/src/MultiPlayer/multiplaytxmgr.cxx @@ -64,7 +64,7 @@ const char sMULTIPLAYTXMGR_HID[] = MULTIPLAYTXMGR_HID; ******************************************************************/ FGMultiplayTxMgr::FGMultiplayTxMgr() { - int iPlayerCnt; // Count of players in player array + // int iPlayerCnt; // Count of players in player array // Initialise private members m_bInitialised = false; @@ -216,10 +216,10 @@ void FGMultiplayTxMgr::SendMyPosition(const sgMat4 PlayerPosMat4) { ******************************************************************/ void FGMultiplayTxMgr::SendTextMessage(const string &sMsgText) const { - bool bResult = false; + // bool bResult = false; T_MsgHdr MsgHdr; T_ChatMsg ChatMsg; - int iNextBlockPosition = 0; + unsigned int iNextBlockPosition = 0; char sMsg[sizeof(T_MsgHdr) + sizeof(T_ChatMsg)]; if (m_bInitialised) { diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx index 2be6cb291..14a256193 100644 --- a/src/Network/generic.cxx +++ b/src/Network/generic.cxx @@ -133,8 +133,7 @@ bool FGGeneric::gen_message() { string generic_sentence; char tmp[255]; - int v; - double d; + double val; for (unsigned int i = 0; i < _message.size(); i++) { @@ -143,9 +142,9 @@ bool FGGeneric::gen_message() { switch (_message[i].type) { case FG_INT: - v = _message[i].offset + + val = _message[i].offset + _message[i].prop->getIntValue() * _message[i].factor; - snprintf(tmp, 255, _message[i].format.c_str(), v); + snprintf(tmp, 255, _message[i].format.c_str(), (int)val); break; case FG_BOOL: @@ -154,9 +153,9 @@ bool FGGeneric::gen_message() { break; case FG_DOUBLE: - d = _message[i].offset + + val = _message[i].offset + _message[i].prop->getDoubleValue() * _message[i].factor; - snprintf(tmp, 255, _message[i].format.c_str(), d); + snprintf(tmp, 255, _message[i].format.c_str(), val); break; default: // SG_STRING diff --git a/src/Network/opengc.cxx b/src/Network/opengc.cxx index bade2f581..1cb2e3070 100644 --- a/src/Network/opengc.cxx +++ b/src/Network/opengc.cxx @@ -48,15 +48,6 @@ FGOpenGC::FGOpenGC() : wind_dir_node(fgGetNode("/environment/wind-from-heading-deg", true)), wind_speed_node(fgGetNode("/environment/wind-speed-kt", true)), mag_var_node(fgGetNode("/environment/magnetic-variation-deg", true)), - p_left_aileron(fgGetNode("surface-positions/left-aileron-pos-norm", true)), - p_right_aileron(fgGetNode("surface-positions/right-aileron-pos-norm", true)), - p_elevator(fgGetNode("surface-positions/elevator-pos-norm", true)), - p_elevator_trim(fgGetNode("surface-positions/elevator_trim-pos-norm", true)), - p_rudder(fgGetNode("surface-positions/rudder-pos-norm", true)), - p_flaps(fgGetNode("surface-positions/flap-pos-norm", true)), - p_flaps_cmd(fgGetNode("/controls/flaps", true)), - p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-radsec", true)), - p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-radsec", true)), p_latitude(fgGetNode("/position/latitude-deg", true)), p_longitude(fgGetNode("/position/longitude-deg", true)), p_alt_node(fgGetNode("/position/altitude-ft", true)), @@ -65,7 +56,16 @@ FGOpenGC::FGOpenGC() : egt0_node(fgGetNode("/engines/engine/egt-degf", true)), egt1_node(fgGetNode("/engines/engine[1]/egt-degf", true)), egt2_node(fgGetNode("/engines/engine[2]/egt-degf", true)), - egt3_node(fgGetNode("/engines/engine[3]/egt-degf", true)) + egt3_node(fgGetNode("/engines/engine[3]/egt-degf", true)), + p_left_aileron(fgGetNode("surface-positions/left-aileron-pos-norm", true)), + p_right_aileron(fgGetNode("surface-positions/right-aileron-pos-norm", true)), + p_elevator(fgGetNode("surface-positions/elevator-pos-norm", true)), + p_elevator_trim(fgGetNode("surface-positions/elevator_trim-pos-norm", true)), + p_rudder(fgGetNode("surface-positions/rudder-pos-norm", true)), + p_flaps(fgGetNode("surface-positions/flap-pos-norm", true)), + p_flaps_cmd(fgGetNode("/controls/flaps", true)), + p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-radsec", true)), + p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-radsec", true)) { } diff --git a/src/Replay/replay.cxx b/src/Replay/replay.cxx index 0395dc7b6..d19fc0b49 100644 --- a/src/Replay/replay.cxx +++ b/src/Replay/replay.cxx @@ -102,7 +102,8 @@ void FGReplay::unbind() { */ void FGReplay::update( double dt ) { - static SGPropertyNode *replay_master = fgGetNode( "/sim/freeze/replay" ); + static SGPropertyNode *replay_master + = fgGetNode( "/sim/freeze/replay", true ); if ( replay_master->getBoolValue() ) { // don't record the replay session diff --git a/src/Scenery/hitlist.cxx b/src/Scenery/hitlist.cxx index 0c2e00fa6..6d0182269 100644 --- a/src/Scenery/hitlist.cxx +++ b/src/Scenery/hitlist.cxx @@ -507,7 +507,7 @@ void FGHitList::Intersect( ssgBranch *scene, sgdMat4 m, sgdVec3 orig, sgdVec3 di // Determine scenery altitude via ssg. // returned results are in meters -static double hitlist1_time = 0.0; +// static double hitlist1_time = 0.0; bool fgCurrentElev( sgdVec3 abs_view_pos, double max_alt_m, sgdVec3 scenery_center, @@ -590,7 +590,7 @@ bool fgCurrentElev( sgdVec3 abs_view_pos, double max_alt_m, } -static double hitlist2_time = 0.0; +// static double hitlist2_time = 0.0; // Determine scenery altitude via ssg. // returned results are in meters diff --git a/src/Scripting/nasal-props.cxx b/src/Scripting/nasal-props.cxx index 1a16f8f91..b53895953 100644 --- a/src/Scripting/nasal-props.cxx +++ b/src/Scripting/nasal-props.cxx @@ -177,7 +177,7 @@ static naRef f_getChildren(naContext c, naRef args) if(!naIsString(name)) return naNil(); vector children = (*node)->getChildren(naStr_data(name)); - for(int i=0; igetDoubleValue(); double current = _pressure_out_node->getDoubleValue(); - double delta = target - current; + // double delta = target - current; _pressure_out_node->setDoubleValue(fgGetLowPass(current, target, dt)); } } diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 045e214b7..b7378aeef 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -70,8 +70,8 @@ FGLight::FGLight () _diffuse_tbl( NULL ), _specular_tbl( NULL ), _sky_tbl( NULL ), - _sun_rotation( 0.0 ), _prev_sun_angle(-9999.0), + _sun_rotation( 0.0 ), _dt_total( 0.0 ) { } @@ -163,7 +163,7 @@ void FGLight::update( double dt ) { void FGLight::update_sky_color () { // if the 4th field is 0.0, this specifies a direction ... - const GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 }; + // const GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 }; const GLfloat base_sky_color[4] = { 0.31, 0.43, 0.69, 1.0 }; const GLfloat base_fog_color[4] = { 0.84, 0.87, 1.0, 1.0 };