-
-FGFixList *current_fixlist;
-
-
-// Constructor
-FGFixList::FGFixList( void ) {
-}
-
-
-// Destructor
-FGFixList::~FGFixList( void ) {
-}
-
-
-// load the navaids and build the map
-bool FGFixList::init( SGPath path ) {
- fixlist.erase( fixlist.begin(), fixlist.end() );
-
- sg_gzifstream in( path.str() );
- if ( !in.is_open() ) {
- SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
- exit(-1);
- }
-
- // toss the first two lines of the file
- in >> skipeol;
- in >> skipeol;
-
- // read in each remaining line of the file
-
-#ifdef __MWERKS__
- char c = 0;
- while ( in.get(c) && c != '\0' ) {
- in.putback(c);
-#else
- while ( ! in.eof() ) {
-#endif
-
- FGFix fix;
- in >> fix;
- if ( fix.get_lat() > 95.0 ) {
- break;
- }
-
- /* cout << "ident=" << fix.get_ident()
- << ", lat=" << fix.get_lat()
- << ", lon=" << fix.get_lon() << endl; */
-
- fixlist[fix.get_ident()] = fix;
- in >> skipcomment;
- }
- return true;
-}
-
-
-// query the database for the specified fix, lon and lat are in
-// degrees, elev is in meters
-bool FGFixList::query( const string& ident, FGFix *fix ) {
- *fix = fixlist[ident];
- if ( ! fix->get_ident().empty() ) {
- return true;
- } else {
- return false;
- }
+FGFix::FGFix(PositionedID aGuid, const std::string& aIdent, const SGGeod& aPos) :
+ FGPositioned(aGuid, FIX, aIdent, aPos)
+{