1
0
Fork 0

comment out unused variables and function and properly initialize variables

This commit is contained in:
Erik Hofman 2011-12-19 16:50:21 +01:00
parent d696f805cf
commit 1fb790eb60
12 changed files with 29 additions and 20 deletions

View file

@ -379,7 +379,7 @@ double FGAIAircraft::calcVerticalSpeed(double vert_ft, double dist_m, double spe
{
// err is negative when we passed too high
double vert_m = vert_ft * SG_FEET_TO_METER;
double err_m = err * SG_FEET_TO_METER;
//double err_m = err * SG_FEET_TO_METER;
//double angle = atan2(vert_m, dist_m);
double speedMs = (speed * SG_NM_TO_METER) / 3600;
//double vs = cos(angle) * speedMs; // Now in m/s

View file

@ -909,7 +909,7 @@ bool FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
FGAIWaypoint *wpt;
double aptElev = apt->getElevation();
//double aptElev = apt->getElevation();
double currElev = 0;
char buffer[12];
FGRunway * rwy = apt->getRunwayByIdent(activeRunway);

View file

@ -94,9 +94,9 @@ void FGATCManager::init() {
ai_ac.setTrafficRef(trafficRef);
string flightPlanName = airport + "-" + airport + ".xml";
double cruiseAlt = 100; // Doesn't really matter right now.
double courseToDest = 180; // Just use something neutral; this value might affect the runway that is used though...
time_t deptime = 0; // just make sure how flightplan processing is affected by this...
//double cruiseAlt = 100; // Doesn't really matter right now.
//double courseToDest = 180; // Just use something neutral; this value might affect the runway that is used though...
//time_t deptime = 0; // just make sure how flightplan processing is affected by this...
FGAirport *apt = FGAirport::findByIdent(airport);

View file

@ -110,10 +110,10 @@ void FGATCDialogNew::PopupDialog() {
}
void FGATCDialogNew::update(double dt) {
double onBoardRadioFreq0 =
fgGetDouble("/instrumentation/comm[0]/frequencies/selected-mhz");
double onBoardRadioFreq1 =
fgGetDouble("/instrumentation/comm[1]/frequencies/selected-mhz");
// double onBoardRadioFreq0 =
// fgGetDouble("/instrumentation/comm[0]/frequencies/selected-mhz");
// double onBoardRadioFreq1 =
// fgGetDouble("/instrumentation/comm[1]/frequencies/selected-mhz");
const char *dialog_name = "atc-dialog";
_gui = (NewGUI *)globals->get_subsystem("gui");
@ -163,4 +163,4 @@ void FGATCDialogNew::update(double dt) {
// PopupCallback(n);
cerr << "Selected transmission message" << n << endl;
} */
}
}

View file

@ -1341,7 +1341,7 @@ void FGStartupController::render(bool visible)
if (visible) {
group = new osg::Group;
FGScenery * local_scenery = globals->get_scenery();
double elevation_meters = 0.0;
//double elevation_meters = 0.0;
double elevation_feet = 0.0;

View file

@ -48,6 +48,7 @@ using std::endl;
FGATCDialog *current_atcdialog;
// For the command manager - maybe eventually this should go in the built in command list
#if 0
static bool do_ATC_dialog(const SGPropertyNode* arg) {
cerr << "Running ATCDCL do_ATC_dialog" << endl;
current_atcdialog->PopupDialog();
@ -58,6 +59,7 @@ static bool do_ATC_freq_search(const SGPropertyNode* arg) {
current_atcdialog->FreqDialog();
return(true);
}
#endif
ATCMenuEntry::ATCMenuEntry() {
stationid = "";

View file

@ -91,8 +91,8 @@ double FGTaxiNode::getElevationFt(double refelev)
double FGTaxiNode::getElevationM(double refelev)
{
double refelevFt = refelev * SG_METER_TO_FEET;
double retval = getElevationFt(refelevFt);
//double refelevFt = refelev * SG_METER_TO_FEET;
//double retval = getElevationFt(refelevFt);
//cerr << "Returning elevation : " << geod.getElevationM() << ". Ref elev (meters) = " << refelev << endl;
return geod.getElevationM();
}

View file

@ -1337,11 +1337,11 @@ void FGGroundNetwork::render(bool visible)
if (visible) {
group = new osg::Group;
FGScenery * local_scenery = globals->get_scenery();
double elevation_meters = 0.0;
// double elevation_meters = 0.0;
double elevation_feet = 0.0;
time_t now = time(NULL) + fgGetLong("/sim/time/warp");
//for ( FGTaxiSegmentVectorIterator i = segments.begin(); i != segments.end(); i++) {
double dx = 0;
//double dx = 0;
for (TrafficVectorIterator i = activeTraffic.begin(); i != activeTraffic.end(); i++) {
// Handle start point
int pos = i->getCurrentPosition() - 1;

View file

@ -75,7 +75,8 @@ void HUD::Runway::draw()
return;
glPushAttrib(GL_LINE_STIPPLE | GL_LINE_STIPPLE_PATTERN | GL_LINE_WIDTH);
float modelView[4][4], projMat[4][4];
float projMat[4][4]={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}};
float modelView[4][4];
bool anyLines;
//Get the current view
// FGViewer* curr_view = globals->get_viewmgr()->get_current_view();

View file

@ -135,7 +135,7 @@ double FORTRAN_DIM(const double &x, const double &y)
}
//#define set_warn(txt, err) printf("%s:%d %s\n", __func__, __LINE__, txt);
#define set_warn(txt, err) 1;
#define set_warn(txt, err)
// :13: single-knife attenuation, page 6
/*
@ -813,6 +813,7 @@ void qlra(int kst[], int klimx, int mdvarx, prop_type &prop, propv_type &propv)
* computers," Princeton Univ. Press, 1955) and the maximum error should be
* 4.5e-4.
*/
#if 1
static
double qerfi(double q)
{
@ -834,6 +835,7 @@ double qerfi(double q)
return v;
}
#endif
// :41: preparatory routine, page 20
@ -850,6 +852,7 @@ double qerfi(double q)
* surface impedance @zgnd
* It may be used with either the area prediction or the point-to-point mode.
*/
#if 1
static
void qlrps(double fmhz, double zsys, double en0, int ipol, double eps, double sgm, prop_type &prop)
@ -882,6 +885,7 @@ void qlrps(double fmhz, double zsys, double en0, int ipol, double eps, double sg
prop.Z_g_real = prop_zgnd.real();
prop.Z_g_imag = prop_zgnd.imag();
}
#endif
// :30: Function curv, page 15
@ -901,6 +905,7 @@ double curve(double const &c1, double const &c2, double const &x1, double const
// :28: Area variablity, page 14
#if 1
static
double avar(double zzt, double zzl, double zzc, prop_type &prop, propv_type &propv)
{
@ -1167,7 +1172,7 @@ double avar(double zzt, double zzl, double zzc, prop_type &prop, propv_type &pro
return avarv;
}
#endif
// :45: Find to horizons, page 24
/*
@ -1428,6 +1433,7 @@ double dlthx(double pfl[], const double &x1, const double &x2)
* pfl[0] = np, the number of points in the path
* pfl[1] = xi, the length of each increment
*/
#if 1
static
void qlrpfl(double pfl[], int klimx, int mdvarx, prop_type &prop, propv_type &propv)
{
@ -1498,6 +1504,7 @@ void qlrpfl(double pfl[], int klimx, int mdvarx, prop_type &prop, propv_type &pr
lrprop(0.0, prop);
}
#endif
//********************************************************

View file

@ -289,7 +289,7 @@ double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, i
int max_points = (int)floor(distance_m / point_distance);
double delta_last = fmod(distance_m, point_distance);
//double delta_last = fmod(distance_m, point_distance);
deque<double> elevations;
deque<string*> materials;

View file

@ -281,7 +281,6 @@ void FGLight::update_sky_color () {
_sky_color[3] = base_sky_color[3];
gamma_correct_rgb( _sky_color.data() );
sqrt_sky_brightness /= _scattering;
_cloud_color[0] = base_fog_color[0] * sky_brightness;
_cloud_color[1] = base_fog_color[1] * sky_brightness;
_cloud_color[2] = base_fog_color[2] * sky_brightness;