Tweaks to navaid database loading.
This commit is contained in:
parent
b5420977d7
commit
ff8e6b9e28
3 changed files with 30 additions and 0 deletions
|
@ -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" );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue