- *wp = new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, target );
- return 1;
- }
-
- // check for airport id
- const FGAirport *apt = fgFindAirportID( target );
- if (apt) {
- SG_LOG( SG_GENERAL, SG_INFO, "Adding waypoint (airport) = " << target );
- *wp = new SGWayPoint( apt->getLongitude(), apt->getLatitude(), alt, SGWayPoint::WGS84, target );
- return 2;
- }
-
- // check for fix id
- FGFix f;
- if ( globals->get_fixlist()->query( target, &f ) ) {
- SG_LOG( SG_GENERAL, SG_INFO, "Adding waypoint (fix) = " << target );
- *wp = new SGWayPoint( f.get_lon(), f.get_lat(), alt, SGWayPoint::WGS84, target );
- return 3;
- }
-
- // Try finding a nav matching the ID
- double lat, lon;
- // The base lon/lat are determined by the last WP,
- // or the current pos if the WP list is empty.
- const int wps = this->size();
+ return new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, target );
+ }