From 5a1e0d92f48ac03a9387b05ef0d86f49914f9330 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 24 Aug 2009 17:57:32 +0200 Subject: [PATCH] fix gcc warnings Mostly comment out unused variables. --- src/FDM/YASim/Rotor.cpp | 14 +++++++------- src/FDM/YASim/yasim-test.cpp | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/FDM/YASim/Rotor.cpp b/src/FDM/YASim/Rotor.cpp index f81ea73a3..2a93a4457 100644 --- a/src/FDM/YASim/Rotor.cpp +++ b/src/FDM/YASim/Rotor.cpp @@ -818,7 +818,7 @@ void Rotor::calcLiftFactor(float* v, float rho, State *s) _f_ge=1+_diameter/_ground_effect_altitude*_ground_effect_constant; // Now calculate translational lift - float v_vert = Math::dot3(v,_normal); + // float v_vert = Math::dot3(v,_normal); float help[3]; Math::cross3(v,_normal,help); float v_horiz = Math::mag3(help); @@ -1181,7 +1181,7 @@ void Rotor::compile() * _diameter * _rel_blade_center * _rel_blade_center /(0.5*0.5); float speed=_rotor_rpm/60*_diameter*_rel_blade_center*pi; float lentocenter=_diameter*_rel_blade_center*0.5; - float lentoforceattac=_diameter*_rel_len_hinge*0.5; + // float lentoforceattac=_diameter*_rel_len_hinge*0.5; float zentforce=rotorpartmass*speed*speed/lentocenter; float pitchaforce=_force_at_pitch_a/_number_of_parts*.453*9.81; // was pounds of force, now N, devided by _number_of_parts @@ -1196,8 +1196,8 @@ void Rotor::compile() float relamp=(omega*omega/(2*_delta*Math::sqrt(sqr(omega0*omega0-omega*omega) +4*_delta*_delta*omega*omega)))*_cyclic_factor; - float relamp_theoretical=(omega*omega/(2*delta_theoretical*Math::sqrt(sqr(omega0*omega0-omega*omega) - +4*delta_theoretical*delta_theoretical*omega*omega)))*_cyclic_factor; + //float relamp_theoretical=(omega*omega/(2*delta_theoretical*Math::sqrt(sqr(omega0*omega0-omega*omega) + // +4*delta_theoretical*delta_theoretical*omega*omega)))*_cyclic_factor; _phi=Math::acos(_rel_len_hinge); _phi-=Math::atan(_delta3); if (!_no_torque) @@ -1528,7 +1528,7 @@ void Rotorgear::calcForces(float* torqueOut) total_torque+=r->getTorque()*omegan; } float max_torque_of_engine=0; - SGPropertyNode * node=fgGetNode("/rotors/gear", true); + // SGPropertyNode * node=fgGetNode("/rotors/gear", true); if (_engineon) { max_torque_of_engine=_max_power_engine*_max_rel_torque; @@ -1599,7 +1599,7 @@ void Rotorgear::calcForces(float* torqueOut) for(j=0; j<_rotors.size(); j++) { Rotor* r = (Rotor*)_rotors.get(j); for(i=0; i_rotorparts.size(); i++) { - float torque_scalar=0; + // float torque_scalar=0; Rotorpart* rp = (Rotorpart*)r->_rotorparts.get(i); float torque[3]; rp->getAccelTorque(_ddt_omegarel,torque); @@ -1619,7 +1619,7 @@ void Rotorgear::addRotor(Rotor* rotor) void Rotorgear::compile() { - float wgt = 0; + // float wgt = 0; for(int j=0; j<_rotors.size(); j++) { Rotor* r = (Rotor*)_rotors.get(j); r->compile(); diff --git a/src/FDM/YASim/yasim-test.cpp b/src/FDM/YASim/yasim-test.cpp index 9c6a4f352..f94ab9e74 100644 --- a/src/FDM/YASim/yasim-test.cpp +++ b/src/FDM/YASim/yasim-test.cpp @@ -35,11 +35,11 @@ static const float KTS2MPS = 0.514444444444; // numbers: "aoa lift drag LD" (aoa in degrees, lift and drag in // G's). You can use this in gnuplot like so (assuming the output is // in a file named "dat": -// -// plot "dat" using 1:2 with lines title 'lift', \ -// "dat" using 1:3 with lines title 'drag', \ -// "dat" using 1:4 with lines title 'LD' -// +/* + plot "dat" using 1:2 with lines title 'lift', \ + "dat" using 1:3 with lines title 'drag', \ + "dat" using 1:4 with lines title 'LD' +*/ void yasim_graph(Airplane* a, float alt, float kts) { Model* m = a->getModel();