Comment out unused code.
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.
// 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());
}
total_torque*=-1;
_ddt_omegarel=0;
+
+#if 0
float rel_torque_engine=1;
if (total_torque<=0)
rel_torque_engine=0;
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;
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) {
// 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));
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
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;
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));
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
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;
// 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()
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