SG_LOG(SG_AUTOPILOT, SG_INFO, "loaded initial waypoints:" << _route.size());
}
- weightOnWheels = fgGetNode("/gear/gear[0]/wow", false);
+ weightOnWheels = fgGetNode("/gear/gear[0]/wow", true);
// check airbone flag agrees with presets
}
_route.clear(); // clear out the existing, first
// SID
- SID* sid;
+ flightgear::SID* sid;
WayptRef sidTrans;
boost::tie(sid, sidTrans) = _departure->selectSID(_destination->geod(), runway);
FGRunway* r = _departure->getRunwayByIdent(runwayId);
string sidId = departure->getStringValue("sid");
- SID* sid = _departure->findSIDWithIdent(sidId);
+ flightgear::SID* sid = _departure->findSIDWithIdent(sidId);
if (!sid) {
// valid runway, but no SID selected/found, so just the runway node for now
if (!sidId.empty() && (sidId != "(none)")) {
}
int index = aIndex;
- if ((aIndex == -1) || (aIndex > _route.size())) {
+ if ((aIndex == -1) || (aIndex > (int) _route.size())) {
index = _route.size();
}
void FGRouteMgr::currentWaypointChanged()
{
- Waypt* cur = currentWaypt();
+ Waypt* cur = (_currentIndex<numWaypts()) ? currentWaypt() : NULL;
Waypt* next = nextWaypt();
wp0->getChild("id")->setStringValue(cur ? cur->ident() : "");