const double FGAIBallistic::slugs_to_lbs = 32.1740485564;
FGAIBallistic::FGAIBallistic(object_type ot) :
-FGAIBase(ot),
- _elevation(0),
+ FGAIBase(ot),
+ _height(0.0),
+ _ht_agl_ft(0.0),
+ _azimuth(0.0),
+ _elevation(0.0),
+ _rotation(0.0),
+ _formate_to_ac(false),
_aero_stabilised(false),
_drag_area(0.007),
_life_timer(0.0),
-_gravity(32.1740485564),
+ _gravity(32.1740485564),
_buoyancy(0),
+ _wind(true),
+ _mass(0),
_random(false),
- _ht_agl_ft(0),
_load_resistance(0),
_solid(false),
+ _force_stabilised(false),
+ _slave_to_ac(false),
+ _slave_load_to_ac(false),
+ _contents_lb(0),
_report_collision(false),
_report_impact(false),
-_wind(true),
+ _external_force(false),
_impact_report_node(fgGetNode("/ai/models/model-impact", true)),
- _force_stabilised(false),
-_external_force(false),
-_slave_to_ac(false),
-_slave_load_to_ac(false),
-_formate_to_ac(false),
-_contents_lb(0),
-_mass(0),
-_height(0),
-_old_height(0)
+ _old_height(0)
{
no_roll = false;
//calculate velocity due to external force
double force_speed_north_deg_sec = 0;
double force_speed_east_deg_sec = 0;
- double vs_force_fps = 0;
+// double vs_force_fps = 0;
double hs_force_fps = 0;
double v_force_acc_fpss = 0;
double force_speed_north_fps = 0;
double accel = ac->getPerformance()->acceleration();
double vTaxi = ac->getPerformance()->vTaxi();
double vRotate = ac->getPerformance()->vRotate();
- double vTakeoff = ac->getPerformance()->vTakeoff();
+// double vTakeoff = ac->getPerformance()->vTakeoff();
double vClimb = ac->getPerformance()->vClimb();
// Acceleration = dV / dT
// Acceleration X dT = dV
// dT = dT / Acceleration
//d = (Vf^2 - Vo^2) / (2*a)
- double accelTime = (vRotate - vTaxi) / accel;
+// double accelTime = (vRotate - vTaxi) / accel;
//cerr << "Using " << accelTime << " as total acceleration time" << endl;
double accelDistance = (vRotate*vRotate - vTaxi*vTaxi) / (2*accel);
//cerr << "Using " << accelDistance << " " << accel << " " << vRotate << endl;
void FGAIFlightPlan::createClimb(FGAIAircraft *ac, bool firstFlight, FGAirport *apt, double speed, double alt, const string &fltType)
{
waypoint *wpt;
- bool planLoaded = false;
+// bool planLoaded = false;
string fPLName;
double vClimb = ac->getPerformance()->vClimb();
//}
} else {
//cerr << "Creating direct forward departure route fragment" << endl;
- double lat2, lon2, az2;
+ double lat2 = 0.0, lon2 = 0.0, az2 = 0.0;
waypoint *wpt;
geo_direct_wgs_84 ( 0, lat, lon, heading,
2, &lat2, &lon2, &az2 );
_old_range = _wp_range;
setWPNames();
- if ((_wp_range < sp_turn_radius_nm) || _missed || _waiting && !_new_waypoint) {
+ if ((_wp_range < sp_turn_radius_nm) || _missed || (_waiting && !_new_waypoint)) {
if (_next_name == "END") {
++subsubmodel_iterator;
}
- submodel_iterator = submodels.begin();
+ //submodel_iterator = submodels.begin();
- while (submodel_iterator != submodels.end()) {
- int id = (*submodel_iterator)->id;
+ //while (submodel_iterator != submodels.end()) {
+ //int id = (*submodel_iterator)->id;
//SG_LOG(SG_GENERAL, SG_DEBUG,"after pushback "
// << " id " << id
// << " name " << (*submodel_iterator)->name
// << " sub id " << (*submodel_iterator)->sub_id);
- ++submodel_iterator;
- }
+ //++submodel_iterator;
+ //}
}
// end of submodel.cxx