(i.e. "isValid" needs to be initialized unconditionally)
pos.setElevationFt(alt);
}
-FGAIFlightPlan::FGAIFlightPlan()
+FGAIFlightPlan::FGAIFlightPlan() :
+ sid(NULL),
+ repeat(false),
+ distance_to_go(0),
+ lead_distance(0),
+ leadInAngle(0),
+ start_time(0),
+ arrivalTime(0),
+ leg(0),
+ lastNodeVisited(0),
+ isValid(true)
{
- sid = 0;
- repeat = false;
- distance_to_go = 0;
- lead_distance = 0;
- start_time = 0;
- arrivalTime = 0;
- leg = 10;
- lastNodeVisited = 0;
- // taxiRoute = 0;
wpt_iterator = waypoints.begin();
- isValid = true;
}
-FGAIFlightPlan::FGAIFlightPlan(const string& filename)
+FGAIFlightPlan::FGAIFlightPlan(const string& filename) :
+ sid(NULL),
+ repeat(false),
+ distance_to_go(0),
+ lead_distance(0),
+ leadInAngle(0),
+ start_time(0),
+ arrivalTime(0),
+ leg(10),
+ lastNodeVisited(0),
+ isValid(parseProperties(filename))
{
- sid = 0;
- repeat = false;
- distance_to_go = 0;
- lead_distance = 0;
- start_time = 0;
- arrivalTime = 0;
- leg = 10;
- lastNodeVisited = 0;
-// taxiRoute = 0;
-
-
- isValid = parseProperties(filename);
}
const string& fltType,
const string& acType,
const string& airline) :
- departure(dep),
- arrival(arr)
+ sid(NULL),
+ repeat(false),
+ distance_to_go(0),
+ lead_distance(0),
+ leadInAngle(0),
+ start_time(start),
+ arrivalTime(0),
+ leg(10),
+ lastNodeVisited(0),
+ isValid(false),
+ departure(dep),
+ arrival(arr)
{
- sid = 0;
- repeat = false;
- distance_to_go = 0;
- lead_distance = 0;
- start_time = start;
- arrivalTime = 0;
- leg = 10;
- lastNodeVisited = 0;
- // taxiRoute = 0;
-
if (parseProperties(p)) {
isValid = true;
} else {
* schedule of Flights for an artificially controlled aircraft.
*****************************************************************************/
FGAISchedule::FGAISchedule()
+ : heavy(false),
+ radius(0),
+ groundOffset(0),
+ distanceToUser(0),
+ score(0),
+ runCount(0),
+ hits(0),
+ lastRun(0),
+ firstRun(false),
+ courseToDest(0),
+ initialized(false),
+ valid(false)
{
- firstRun = true;
-
- heavy = false;
- radius = 0;
- groundOffset = 0;
- distanceToUser = 0;
- valid = true;
- lastRun = 0;
- //score = 0;
}
const string& fltpe,
double rad,
double grnd)
+ : heavy(hvy),
+ radius(rad),
+ groundOffset(grnd),
+ distanceToUser(0),
+ score(0),
+ runCount(0),
+ hits(0),
+ lastRun(0),
+ firstRun(true),
+ courseToDest(0),
+ initialized(false),
+ valid(true)
{
modelPath = model;
livery = lvry;
airline = arln;
m_class = mclass;
flightType = fltpe;
- radius = rad;
- groundOffset = grnd;
- distanceToUser = 0;
- heavy = hvy;
/*for (FGScheduledFlightVecIterator i = flt.begin();
i != flt.end();
i++)
flights.push_back(new FGScheduledFlight((*(*i))));*/
- score = 0;
- firstRun = true;
- runCount = 0;
- hits = 0;
- lastRun = 0;
- initialized = false;
- valid = true;
}
FGAISchedule::FGAISchedule(const FGAISchedule &other)
inited(false),
doingInit(false),
waitingMetarTime(0.0),
+ cruiseAlt(0),
+ score(0),
+ runCount(0),
+ acCounter(0),
+ radius(0),
+ offset(0),
+ heavy(false),
enabled("/sim/traffic-manager/enabled"),
aiEnabled("/sim/ai/enabled"),
realWxEnabled("/environment/realwx/enabled"),
metarValid("/environment/metar/valid")
{
- //score = 0;
- //runCount = 0;
- acCounter = 0;
}
FGTrafficManager::~FGTrafficManager()