1
0
Fork 0

Some warning fixes, mostly unused variables

This commit is contained in:
Torsten Dreyer 2011-12-25 14:41:47 +01:00
parent 0bb17d755c
commit ddb4fa050f
7 changed files with 34 additions and 34 deletions

View file

@ -1057,7 +1057,7 @@ void FGAIAircraft::updateHeading() {
// If on ground, calculate heading change directly // If on ground, calculate heading change directly
if (onGround()) { if (onGround()) {
double headingDiff = fabs(hdg-tgt_heading); double headingDiff = fabs(hdg-tgt_heading);
double bank_sense = 0.0; // double bank_sense = 0.0;
/* /*
double diff = fabs(hdg - tgt_heading); double diff = fabs(hdg - tgt_heading);
if (diff > 180) if (diff > 180)
@ -1077,9 +1077,9 @@ void FGAIAircraft::updateHeading() {
if (sum > 360.0) if (sum > 360.0)
sum -= 360.0; sum -= 360.0;
if (fabs(sum - tgt_heading) > 0.0001) { if (fabs(sum - tgt_heading) > 0.0001) {
bank_sense = -1.0; // bank_sense = -1.0;
} else { } else {
bank_sense = 1.0; // bank_sense = 1.0;
} }
//if (trafficRef) //if (trafficRef)
// cerr << trafficRef->getCallSign() << " Heading " // cerr << trafficRef->getCallSign() << " Heading "

View file

@ -639,21 +639,21 @@ void FGAIBallistic::slaveToAC(double dt){
if (invisible) if (invisible)
return; return;
double hdg, pch, rll, agl = 0; double hdg, pch, rll;//, agl = 0;
if (_pnode != 0) { if (_pnode != 0) {
setParentPos(); setParentPos();
hdg = _p_hdg_node->getDoubleValue(); hdg = _p_hdg_node->getDoubleValue();
pch = _p_pch_node->getDoubleValue(); pch = _p_pch_node->getDoubleValue();
rll = _p_rll_node->getDoubleValue(); rll = _p_rll_node->getDoubleValue();
agl = _p_agl_node->getDoubleValue(); // agl = _p_agl_node->getDoubleValue();
setOffsetPos(_parentpos, hdg, pch, rll); setOffsetPos(_parentpos, hdg, pch, rll);
setSpeed(_p_spd_node->getDoubleValue()); setSpeed(_p_spd_node->getDoubleValue());
}else { }else {
hdg = manager->get_user_heading(); hdg = manager->get_user_heading();
pch = manager->get_user_pitch(); pch = manager->get_user_pitch();
rll = manager->get_user_roll(); rll = manager->get_user_roll();
agl = manager->get_user_agl(); // agl = manager->get_user_agl();
setOffsetPos(userpos, hdg, pch, rll); setOffsetPos(userpos, hdg, pch, rll);
setSpeed(manager->get_user_speed()); setSpeed(manager->get_user_speed());
} }

View file

@ -755,8 +755,8 @@ readPanel (const SGPropertyNode * root)
int y = node->getIntValue("y", -1); int y = node->getIntValue("y", -1);
int real_w = node->getIntValue("w", -1); int real_w = node->getIntValue("w", -1);
int real_h = node->getIntValue("h", -1); int real_h = node->getIntValue("h", -1);
int w = node->getIntValue("w-base", -1); // int w = node->getIntValue("w-base", -1);
int h = node->getIntValue("h-base", -1); // int h = node->getIntValue("h-base", -1);
if (x == -1 || y == -1) { if (x == -1 || y == -1) {
SG_LOG( SG_COCKPIT, SG_ALERT, SG_LOG( SG_COCKPIT, SG_ALERT,
@ -764,15 +764,15 @@ readPanel (const SGPropertyNode * root)
return 0; return 0;
} }
float w_scale = 1.0; // float w_scale = 1.0;
float h_scale = 1.0; // float h_scale = 1.0;
if (real_w != -1) { if (real_w != -1) {
w_scale = float(real_w) / float(w); // w_scale = float(real_w) / float(w);
w = real_w; // w = real_w;
} }
if (real_h != -1) { if (real_h != -1) {
h_scale = float(real_h) / float(h); // h_scale = float(real_h) / float(h);
h = real_h; // h = real_h;
} }
SG_LOG( SG_COCKPIT, SG_BULK, "Reading instrument " << name ); SG_LOG( SG_COCKPIT, SG_BULK, "Reading instrument " << name );

View file

@ -138,7 +138,7 @@ void HUD::Ladder::draw(void)
//**************************************************************** //****************************************************************
//velocity vector reticle - computations //velocity vector reticle - computations
float xvvr, /* yvvr, */ Vxx = 0.0, Vyy = 0.0, Vzz = 0.0; float xvvr, /* yvvr, */ Vxx = 0.0, Vyy = 0.0, Vzz = 0.0;
float Axx = 0.0, Ayy = 0.0, Azz = 0.0, total_vel = 0.0, pot_slope, t1; float Axx = 0.0, Ayy = 0.0, Azz = 0.0, total_vel = 0.0, pot_slope; //, t1;
float up_vel, ground_vel, actslope = 0.0, psi = 0.0; float up_vel, ground_vel, actslope = 0.0, psi = 0.0;
float vel_x = 0.0, vel_y = 0.0, drift; float vel_x = 0.0, vel_y = 0.0, drift;
float alpha; float alpha;
@ -320,10 +320,10 @@ void HUD::Ladder::draw(void)
if (_energy_marker) { if (_energy_marker) {
if (total_vel < 5.0) { if (total_vel < 5.0) {
t1 = 0; // t1 = 0;
t2 = 0; t2 = 0;
} else { } else {
t1 = up_vel / total_vel; // t1 = up_vel / total_vel;
t2 = asin((Vxx * Axx + Vyy * Ayy + Vzz * Azz) / (9.81 * total_vel)); t2 = asin((Vxx * Axx + Vyy * Ayy + Vzz * Azz) / (9.81 * total_vel));
} }
pot_slope = ((t2 / 3) * SGD_RADIANS_TO_DEGREES) * _compression + vel_y; pot_slope = ((t2 / 3) * SGD_RADIANS_TO_DEGREES) * _compression + vel_y;

View file

@ -123,9 +123,9 @@ void HUD::Runway::draw()
} }
//Calculate the 2D points via gluProject //Calculate the 2D points via gluProject
int result = GL_TRUE; // int result = GL_TRUE;
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
result = simgear::project(_points3d[i][0], _points3d[i][1], _points3d[i][2], /*result = */simgear::project(_points3d[i][0], _points3d[i][1], _points3d[i][2],
_mm, _pm, _view, _mm, _pm, _view,
&_points2d[i][0], &_points2d[i][1], &_points2d[i][2]); &_points2d[i][0], &_points2d[i][1], &_points2d[i][2]);
} }

View file

@ -89,7 +89,7 @@ void HUD::Tape::draw(void) // (HUD_scale * pscale)
void HUD::Tape::draw_vertical(float value) void HUD::Tape::draw_vertical(float value)
{ {
float vmin = 0.0, vmax = 0.0; float vmin = 0.0;//, vmax = 0.0;
float marker_xs; float marker_xs;
float marker_xe; float marker_xe;
float marker_ye; float marker_ye;
@ -101,16 +101,16 @@ void HUD::Tape::draw_vertical(float value)
if (!_pointer) { if (!_pointer) {
vmin = value - _half_width_units; // width units == needle travel vmin = value - _half_width_units; // width units == needle travel
vmax = value + _half_width_units; // or picture unit span. // vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y; text_y = _center_y;
} else if (_pointer_type == MOVING) { } else if (_pointer_type == MOVING) {
vmin = _input.min(); vmin = _input.min();
vmax = _input.max(); // vmax = _input.max();
} else { // FIXED } else { // FIXED
vmin = value - _half_width_units; // width units == needle travel vmin = value - _half_width_units; // width units == needle travel
vmax = value + _half_width_units; // or picture unit span. // vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y; text_y = _center_y;
} }
@ -348,12 +348,12 @@ void HUD::Tape::draw_vertical(float value)
void HUD::Tape::draw_horizontal(float value) void HUD::Tape::draw_horizontal(float value)
{ {
float vmin = 0.0, vmax = 0.0; float vmin = 0.0;//, vmax = 0.0;
float marker_xs; float marker_xs;
float marker_xe; // float marker_xe;
float marker_ys; float marker_ys;
float marker_ye; float marker_ye;
float text_y = 0.0; // float text_y = 0.0;
float top = _y + _h; float top = _y + _h;
float right = _x + _w; float right = _x + _w;
@ -361,17 +361,17 @@ void HUD::Tape::draw_horizontal(float value)
if (!_pointer) { if (!_pointer) {
vmin = value - _half_width_units; // width units == needle travel vmin = value - _half_width_units; // width units == needle travel
vmax = value + _half_width_units; // or picture unit span. // vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y; // text_y = _center_y;
} else if (_pointer_type == MOVING) { } else if (_pointer_type == MOVING) {
vmin = _input.min(); vmin = _input.min();
vmax = _input.max(); // vmax = _input.max();
} else { // FIXED } else { // FIXED
vmin = value - _half_width_units; // width units == needle travel vmin = value - _half_width_units; // width units == needle travel
vmax = value + _half_width_units; // or picture unit span. // vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y; // text_y = _center_y;
} }
// left tick bar // left tick bar
@ -384,7 +384,7 @@ void HUD::Tape::draw_horizontal(float value)
marker_ys = _y; // Starting point for marker_ys = _y; // Starting point for
marker_ye = top; // tick y location calcs marker_ye = top; // tick y location calcs
marker_xe = right; // marker_xe = right;
marker_xs = _x + ((value - vmin) * factor()); marker_xs = _x + ((value - vmin) * factor());
if (option_top()) { if (option_top()) {

View file

@ -965,10 +965,10 @@ FGMultiplayMgr::Send()
} }
double sim_time = globals->get_sim_time_sec(); double sim_time = globals->get_sim_time_sec();
static double lastTime = 0.0; // static double lastTime = 0.0;
// SG_LOG(SG_GENERAL, SG_INFO, "actual dt=" << sim_time - lastTime); // SG_LOG(SG_GENERAL, SG_INFO, "actual dt=" << sim_time - lastTime);
lastTime = sim_time; // lastTime = sim_time;
FlightProperties ifce; FlightProperties ifce;