]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks to navaid database loading.
authorcurt <curt>
Tue, 25 Apr 2000 17:33:13 +0000 (17:33 +0000)
committercurt <curt>
Tue, 25 Apr 2000 17:33:13 +0000 (17:33 +0000)
src/Main/fg_init.cxx
src/Navaids/ilslist.cxx
src/Navaids/navlist.cxx

index 1cdbaa1267b1a35bd0acfce4ddbf729ad7a8c835..95176fce794199dfe1f0ed94fe3032838017c1f4 100644 (file)
@@ -455,6 +455,8 @@ bool fgInitSubsystems( void ) {
 #endif
 
     // Initialize vor/ndb/ils/fix list management and query systems
+    FG_LOG(FG_GENERAL, FG_INFO, "Loading Navaids");
+
     current_navlist = new FGNavList;
     FGPath p_nav( current_options.get_fg_root() );
     p_nav.append( "Navaids/default.nav" );
index 8c43d7c647766a0bc503d0879443517e521b8c8b..fa68f4f7486bfd62d5cb1f5b9814ed6fc52c9865 100644 (file)
@@ -72,6 +72,9 @@ bool FGILSList::init( FGPath path ) {
 
 #else
 
+    double min = 1000000.0;
+    double max = 0.0;
+
     while ( ! in.eof() && ils.get_ilstype() != '[' ) {
         in >> ils;
        /* cout << "id = " << n.get_ident() << endl;
@@ -85,8 +88,18 @@ bool FGILSList::init( FGPath path ) {
            ilslist[ils.get_locfreq()].push_back(ils);
        }
         in >> skipcomment;
+
+       if ( ils.get_locfreq() < min ) {
+           min = ils.get_locfreq();
+       }
+       if ( ils.get_locfreq() > max ) {
+           max = ils.get_locfreq();
+       }
     }
 
+    cout << "min freq = " << min << endl;
+    cout << "max freq = " << max << endl;
+
 #endif
 
     return true;
index f439044b50cc18e97ddeae4fb69793375d82bfa2..55c788fe19d545a149748ccfdbff4afe2362d6fe 100644 (file)
@@ -72,6 +72,9 @@ bool FGNavList::init( FGPath path ) {
 
 #else
 
+    double min = 100000;
+    double max = 0;
+
     while ( ! in.eof() && n.get_type() != '[' ) {
         in >> n;
        /* cout << "id = " << n.get_ident() << endl;
@@ -85,8 +88,20 @@ bool FGNavList::init( FGPath path ) {
            navaids[n.get_freq()].push_back(n);
        }
         in >> skipcomment;
+
+       if ( n.get_type() != 'N' ) {
+           if ( n.get_freq() < min ) {
+               min = n.get_freq();
+           }
+           if ( n.get_freq() > max ) {
+               max = n.get_freq();
+           }
+       }
     }
 
+    cout << "min freq = " << min << endl;
+    cout << "max freq = " << max << endl;
+
 #endif
 
     return true;