_turnRate(3.0), // degrees-per-second, so 180 degree turn takes 60 seconds
_overflightArmDistance(1.0),
_waypointAlertTime(30.0),
- _minRunwayLengthFt(0.0),
_requireHardSurface(true),
_cdiMaxDeflectionNm(3.0), // linear mode, 3nm at the peg
_driveAutopilot(true),
aOwner->tie(aCfg, "turn-rate-deg-sec", SGRawValuePointer<double>(&_turnRate));
aOwner->tie(aCfg, "turn-anticipation", SGRawValuePointer<bool>(&_enableTurnAnticipation));
aOwner->tie(aCfg, "wpt-alert-time", SGRawValuePointer<double>(&_waypointAlertTime));
- aOwner->tie(aCfg, "min-runway-length-ft", SGRawValuePointer<double>(&_minRunwayLengthFt));
aOwner->tie(aCfg, "hard-surface-runways-only", SGRawValuePointer<bool>(&_requireHardSurface));
aOwner->tie(aCfg, "cdi-max-deflection-nm", SGRawValuePointer<double>(&_cdiMaxDeflectionNm));
aOwner->tie(aCfg, "drive-autopilot", SGRawValuePointer<bool>(&_driveAutopilot));
SG_LOG(SG_INSTR, SG_INFO, "GPS waypoint index is now " << index);
if (index > 0) {
- _prevWaypt = _routeMgr->previousWaypt();
+ _prevWaypt = _routeMgr->wayptAtIndex(index - 1);
if (_prevWaypt->flag(WPT_DYNAMIC)) {
_wp0_position = _indicated_pos;
} else {
// check for wp1 being on active route - resume leg mode
if (_routeMgr->isRouteActive()) {
- int index = _routeMgr->findWayptIndex(_currentWaypt->position());
+ int index = _routeMgr->flightPlan()->findWayptIndex(_currentWaypt->position());
if (index >= 0) {
SG_LOG(SG_INSTR, SG_INFO, "GPS DTO, resuming LEG mode at wp:" << index);
_mode = "leg";
return;
}
- WayptRef next = _routeMgr->nextWaypt();
+ WayptRef next = _routeMgr->wayptAtIndex(_routeMgr->currentIndex() + 1);
if (!next || next->flag(WPT_DYNAMIC)) {
_anticipateTurn = false;
return;
FGPositioned::Filter* GPS::createFilter(FGPositioned::Type aTy)
{
if (aTy == FGPositioned::AIRPORT) {
- return new FGAirport::HardSurfaceFilter(_config.minRunwayLengthFt());
+ return new FGAirport::HardSurfaceFilter();
}
// if we were passed INVALID, assume it means 'all types interesting to a GPS'
string ident = _scratchNode->getStringValue("ident");
WayptRef wpt = new BasicWaypt(_scratchPos, ident, NULL);
- _routeMgr->insertWayptAtIndex(wpt, aIndex);
+ _routeMgr->flightPlan()->insertWayptAtIndex(wpt, aIndex);
}
void GPS::removeWaypointAtIndex(int aIndex)
throw sg_range_exception("GPS::removeWaypointAtIndex: index out of bounds");
}
- _routeMgr->removeWayptAtIndex(aIndex);
+ _routeMgr->removeLegAtIndex(aIndex);
}
void GPS::tieSGGeod(SGPropertyNode* aNode, SGGeod& aRef,