1
0
Fork 0

Fix some compiler warnings.

Comment out unused code.
This commit is contained in:
ThorstenB 2012-01-02 23:13:51 +01:00
parent aab04f44bd
commit dac00efbc7
6 changed files with 23 additions and 16 deletions

View file

@ -251,6 +251,7 @@ void FGAIShip::unbind() {
props->untie("velocities/speed-kts");
}
void FGAIShip::update(double dt) {
//SG_LOG(SG_AI, SG_ALERT, "updating Ship: " << _name <<hdg<<pitch<<roll);
// For computation of rotation speeds we just use finite differences here.
@ -265,7 +266,7 @@ void FGAIShip::update(double dt) {
// local frame
SGQuatd ec2body = ec2hl*hl2body;
// The cartesian position of the ship in the wgs84 world
SGVec3d cartPos = SGVec3d::fromGeod(pos);
//SGVec3d cartPos = SGVec3d::fromGeod(pos);
// The simulation time this transform is meant for
aip.setReferenceTime(globals->get_sim_time_sec());

View file

@ -1543,6 +1543,8 @@ void Rotorgear::calcForces(float* torqueOut)
}
total_torque*=-1;
_ddt_omegarel=0;
#if 0
float rel_torque_engine=1;
if (total_torque<=0)
rel_torque_engine=0;
@ -1551,6 +1553,7 @@ void Rotorgear::calcForces(float* torqueOut)
rel_torque_engine=1/max_torque_of_engine*total_torque;
else
rel_torque_engine=0;
#endif
//add the rotor brake and the gear fritcion
float dt=0.1f;

View file

@ -727,9 +727,11 @@ static double gps_min(const double &a, const double &b) {
return(a <= b ? a : b);
}
#if 0
static double gps_max(const double &a, const double &b) {
return(a >= b ? a : b);
}
#endif
void KLN89::UpdateMapHeading() {
switch(_mapOrientation) {
@ -762,8 +764,8 @@ void KLN89::DrawMap(bool draw_avs) {
// TODO - use an aligned projection when either DTK or TK up!
FGATCAlignedProjection mapProj(SGGeod::fromRad(_gpsLon, _gpsLat), _mapHeading);
double meter_per_pix = (_mapOrientation == 0 ? mapScaleMeters / 20.0f : mapScaleMeters / 29.0f);
SGGeod bottomLeft = mapProj.ConvertFromLocal(SGVec3d(gps_max(-57.0 * meter_per_pix, -50000), gps_max((_mapOrientation == 0 ? -20.0 * meter_per_pix : -11.0 * meter_per_pix), -25000), 0.0));
SGGeod topRight = mapProj.ConvertFromLocal(SGVec3d(gps_min(54.0 * meter_per_pix, 50000), gps_min((_mapOrientation == 0 ? 20.0 * meter_per_pix : 29.0 * meter_per_pix), 25000), 0.0));
// SGGeod bottomLeft = mapProj.ConvertFromLocal(SGVec3d(gps_max(-57.0 * meter_per_pix, -50000), gps_max((_mapOrientation == 0 ? -20.0 * meter_per_pix : -11.0 * meter_per_pix), -25000), 0.0));
// SGGeod topRight = mapProj.ConvertFromLocal(SGVec3d(gps_min(54.0 * meter_per_pix, 50000), gps_min((_mapOrientation == 0 ? 20.0 * meter_per_pix : 29.0 * meter_per_pix), 25000), 0.0));

View file

@ -456,9 +456,9 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(
bool flip = false;
bool texcoord_flip = false;
#if 0
osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance);
#if 0
OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
#endif
@ -482,10 +482,11 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(
osg::Vec2Array* texcoords1 = intensityMap==0 ? new osg::Vec2Array : 0;
osg::Vec4Array* colors = new osg::Vec4Array;
#if 0
osg::Vec3 bottom = origin;
osg::Vec3 dx = xAxis*(width/((float)(noSteps-2)));
osg::Vec3 dy = yAxis*(height/((float)(noSteps-1)));
#endif
osg::Vec3 top = origin + yAxis*height;
osg::Vec3 screenCenter = origin + widthVector*0.5f + heightVector*0.5f;
@ -495,7 +496,7 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(
for(int i=0;i<noSteps;++i)
{
osg::Vec3 cursor = bottom+dy*(float)i;
//osg::Vec3 cursor = bottom+dy*(float)i;
for(int j=0;j<noSteps;++j)
{
osg::Vec2 texcoord(double(i)/double(noSteps-1), double(j)/double(noSteps-1));

View file

@ -1552,7 +1552,6 @@ void point_to_point(double elev[],
double zc, zr;
double q = eno;
long ja, jb, i, np;
double dkm, xkm;
double fs;
prop.h_g[0] = tht_m; // Tx height above ground level
@ -1564,8 +1563,10 @@ void point_to_point(double elev[],
zc = qerfi(conf);
zr = qerfi(rel);
np = (long)elev[0];
dkm = (elev[1] * elev[0]) / 1000.0;
xkm = elev[1] / 1000.0;
#if 0
double dkm = (elev[1] * elev[0]) / 1000.0;
double xkm = elev[1] / 1000.0;
#endif
ja = (long)(3.0 + 0.1 * elev[0]);
jb = np - ja + 6;

View file

@ -330,10 +330,10 @@ void FGLight::update_sky_color () {
// calculate fog color adjusted for sunrise/sunset effects
void FGLight::update_adj_fog_color () {
double pitch = globals->get_current_view()->getPitch_deg()
* SGD_DEGREES_TO_RADIANS;
double pitch_offset = globals->get_current_view()-> getPitchOffset_deg()
* SGD_DEGREES_TO_RADIANS;
// double pitch = globals->get_current_view()->getPitch_deg()
// * SGD_DEGREES_TO_RADIANS;
// double pitch_offset = globals->get_current_view()-> getPitchOffset_deg()
// * SGD_DEGREES_TO_RADIANS;
double heading = globals->get_current_view()->getHeading_deg()
* SGD_DEGREES_TO_RADIANS;
double heading_offset = globals->get_current_view()->getHeadingOffset_deg()
@ -360,13 +360,12 @@ void FGLight::update_adj_fog_color () {
return;
}
double hor_rotation, vert_rotation;
static float gamma = system_gamma;
// first determine the difference between our view angle and local
// direction to the sun
vert_rotation = pitch + pitch_offset;
hor_rotation = -(_sun_rotation + SGD_PI) - heading + heading_offset;
//double vert_rotation = pitch + pitch_offset;
double hor_rotation = -(_sun_rotation + SGD_PI) - heading + heading_offset;
if (hor_rotation < 0 )
hor_rotation = fmod(hor_rotation, SGD_2PI) + SGD_2PI;
else