1
0
Fork 0

- Fix compiler warnings.

This commit is contained in:
Durk Talsma 2010-09-27 17:48:38 +02:00
parent d5e0bc3b89
commit df00df3feb
9 changed files with 45 additions and 47 deletions

View file

@ -648,7 +648,7 @@ bool FGAIAircraft::leadPointReached(FGAIFlightPlan::waypoint* curr) {
// << dist_to_go << ": Lead distance "
// << lead_dist << " " << curr->name
// << " Ground target speed " << groundTargetSpeed << endl;
double bearing;
double bearing = 0;
if (speed > 50) { // don't do bearing calculations for ground traffic
bearing = getBearing(fp->getBearing(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr));
if (bearing < minBearing) {

View file

@ -46,6 +46,7 @@ _azimuth(0.0),
_elevation(0.0),
_rotation(0.0),
_formate_to_ac(false),
_elapsed_time(0),
_aero_stabilised(false),
_drag_area(0.007),
_life_timer(0.0),
@ -61,13 +62,12 @@ _slave_to_ac(false),
_slave_load_to_ac(false),
_contents_lb(0),
_report_collision(false),
_report_expiry(false),
_report_impact(false),
_external_force(false),
_report_expiry(false),
_impact_report_node(fgGetNode("/ai/models/model-impact", true)),
_old_height(0),
_elapsed_time(0),
hs(0)
hs(0),
_old_height(0)
{
no_roll = false;

View file

@ -53,11 +53,12 @@ const double FGAIBase::lbs_to_slugs = 0.031080950172; //conversion factor
using namespace simgear;
FGAIBase::FGAIBase(object_type ot) :
_name(""),
_parent(""),
props( NULL ),
model_removed( fgGetNode("/ai/models/model-removed", true) ),
manager( NULL ),
fp( NULL ),
_impact_lat(0),
_impact_lon(0),
_impact_elev(0),
@ -65,12 +66,9 @@ FGAIBase::FGAIBase(object_type ot) :
_impact_pitch(0),
_impact_roll(0),
_impact_speed(0),
_refID( _newAIModelID() ),
_otype(ot),
_initialized(false),
_parent(""),
_name("")
_initialized(false)
{
tgt_heading = hdg = tgt_altitude_ft = tgt_speed = 0.0;

View file

@ -45,14 +45,14 @@ FGAIEscort::FGAIEscort() :
FGAIShip(otEscort),
_relbrg (0),
_stn_truebrg(0),
_parent_speed(0),
_stn_limit(0),
_stn_angle_limit(0),
_stn_speed(0),
_stn_height(0),
_max_speed(0),
_interval(0),
_stn_truebrg(0),
_stn_height(0),
_stn_speed(0),
_stn_angle_limit(0),
_stn_limit(0),
_max_speed(0),
_MPControl(false),
_patrol(false),
_stn_deg_true(false)

View file

@ -419,13 +419,13 @@ void FGAIFlightPlan::createTakeOff(FGAIAircraft * ac, bool firstFlight,
double vTaxi = ac->getPerformance()->vTaxi();
double vRotate = ac->getPerformance()->vRotate();
double vTakeoff = ac->getPerformance()->vTakeoff();
double vClimb = ac->getPerformance()->vClimb();
//double vClimb = ac->getPerformance()->vClimb();
double accelMetric = (accel * SG_NM_TO_METER) / 3600;
double vTaxiMetric = (vTaxi * SG_NM_TO_METER) / 3600;
double vRotateMetric = (vRotate * SG_NM_TO_METER) / 3600;
double vTakeoffMetric = (vTakeoff * SG_NM_TO_METER) / 3600;
double vClimbMetric = (vClimb * SG_NM_TO_METER) / 3600;
//double vClimbMetric = (vClimb * SG_NM_TO_METER) / 3600;
// Acceleration = dV / dT
// Acceleration X dT = dV
// dT = dT / Acceleration
@ -558,7 +558,7 @@ void FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
// Create a slow descent path that ends 250 lateral to the runway.
double initialTurnRadius = getTurnRadius(vDescent, true);
double finalTurnRadius = getTurnRadius(vApproach, true);
//double finalTurnRadius = getTurnRadius(vApproach, true);
// get length of the downwind leg for the intended runway
double distanceOut = apt->getDynamics()->getApproachController()->getRunway(rwy->name())->getApproachDistance(); //12 * SG_NM_TO_METER;
@ -801,7 +801,7 @@ void FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
if (reposition) {
double tempDistance;
double minDistance = HUGE_VAL;
//double minDistance = HUGE_VAL;
string wptName;
tempDistance = SGGeodesy::distanceM(current, initialTarget);
time_t eta =
@ -836,7 +836,7 @@ void FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
const string & fltType)
{
double vTouchdown = ac->getPerformance()->vTouchdown();
double vTaxi = ac->getPerformance()->vTaxi();
//double vTaxi = ac->getPerformance()->vTaxi();
//string rwyClass = getRunwayClassFromTrafficType(fltType);
//double heading = ac->getTrafficRef()->getCourse();

View file

@ -40,11 +40,11 @@ _speed_kt(0),
_range_ft(0),
_relbrg (0),
_parent_speed(0),
_dt_count(0),
_next_run(0),
_parent_x_offset(0),
_parent_y_offset(0),
_parent_z_offset(0),
_dt_count(0),
_next_run(0),
_break_count(0)
{
@ -285,7 +285,7 @@ bool FGAIGroundVehicle::getPitch() {
double rear_elev_m = 0;
double elev_front = 0;
double elev_rear = 0;
double max_alt = 10000;
//double max_alt = 10000;
if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodFront, 3000),
elev_front, &_material, 0)){
@ -480,7 +480,7 @@ void FGAIGroundVehicle::AdvanceFP(){
void FGAIGroundVehicle::setTowSpeed(){
double diff = _range_ft - _x_offset;
//double diff = _range_ft - _x_offset;
double x = 0;
if (_range_ft > _x_offset * 3) x = 50;
@ -537,7 +537,7 @@ void FGAIGroundVehicle::RunGroundVehicle(double dt){
string parent_next_name = _selected_ac->getStringValue("waypoint/name-next");
bool parent_waiting = _selected_ac->getBoolValue("waypoint/waiting");
bool parent_restart = _selected_ac->getBoolValue("controls/restart");
//bool parent_restart = _selected_ac->getBoolValue("controls/restart");
if (parent_next_name == "END" && fp->getNextWaypoint()->name != "END" ){
SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name

View file

@ -43,35 +43,35 @@
FGAIShip::FGAIShip(object_type ot) :
FGAIBase(ot),
_waiting(false),
_new_waypoint(true),
_tunnel(false),
_initial_tunnel(false),
_restart(false),
_hdg_constant(0.01),
_limit(100),
_elevation_m(0),
_elevation_ft(0),
_tow_angle(0),
_missed_count(0),
_wp_range(0),
_dt_count(0),
_next_run(0),
_roll_constant(0.001),
_roll_factor(-0.0083335),
_old_range(0),
_range_rate(0),
_missed_time_sec(30),
_day(86400),
_lead_angle(0),
_xtrack_error(0),
_tunnel(false),
_initial_tunnel(false),
_curr_alt(0),
_prev_alt(0),
_until_time(""),
_fp_init(false),
_missed(false),
_waiting(false),
_new_waypoint(true),
_missed_count(0),
_wait_count(0),
_missed_time_sec(30),
_day(86400),
_wp_range(0),
_old_range(0),
_range_rate(0),
_roll_constant(0.001),
_hdg_constant(0.01),
_roll_factor(-0.0083335),
_restart(false)
_missed(false)
{
invisible = false;
}

View file

@ -204,7 +204,7 @@ void FGSubmodelMgr::update(double dt)
if (trigger && (*submodel_iterator)->count != 0) {
int id = (*submodel_iterator)->id;
//int id = (*submodel_iterator)->id;
string name = (*submodel_iterator)->name;
SG_LOG(SG_GENERAL, SG_DEBUG,
@ -338,7 +338,7 @@ void FGSubmodelMgr::transform(submodel *sm)
IC.mass = sm->weight * lbs_to_slugs;
int id = sm->id;
int sub_id = sm->sub_id;
//int sub_id = sm->sub_id;
string name = sm->name;

View file

@ -375,7 +375,7 @@ void FGTrafficManager::readTimeTableFromFile(SGPath infileName)
string arrTimeGen = tokens[6];
string repeat = "WEEK";
string requiredAircraft = tokens[9];
if (weekdays.size() != 7) {
SG_LOG(SG_GENERAL, SG_ALERT, "Found misconfigured weekdays string" << weekdays);
exit(1);
@ -611,7 +611,7 @@ void FGTrafficManager::endElement(const char *name)
if (fgGetBool("/sim/traffic-manager/dumpdata") == true) {
SG_LOG(SG_GENERAL, SG_ALERT, "Traffic Dump AC," << homePort << "," << registration << "," << requiredAircraft
<< "," << acType << "," << livery << ","
<< airline << "," << offset << "," << radius << "," << flighttype << "," << isHeavy << "," << mdl);
<< airline << "," << m_class << "," << offset << "," << radius << "," << flighttype << "," << isHeavy << "," << mdl);
}
//scheduledAircraft.push_back(new FGAISchedule(mdl,
// livery,