Load ground ATC frequency data, and map all stations by bucket index
This commit is contained in:
parent
ef3b5a4d61
commit
6fef4d457b
1 changed files with 6 additions and 2 deletions
|
@ -61,6 +61,9 @@ bool FGCommList::init( SGPath path ) {
|
||||||
temp.append( "ATC/default.tower" );
|
temp.append( "ATC/default.tower" );
|
||||||
LoadComms(temp);
|
LoadComms(temp);
|
||||||
temp = path;
|
temp = path;
|
||||||
|
temp.append( "ATC/default.ground" );
|
||||||
|
LoadComms(temp);
|
||||||
|
temp = path;
|
||||||
temp.append( "ATC/default.approach" );
|
temp.append( "ATC/default.approach" );
|
||||||
LoadComms(temp);
|
LoadComms(temp);
|
||||||
return true;
|
return true;
|
||||||
|
@ -94,12 +97,13 @@ bool FGCommList::LoadComms(SGPath path) {
|
||||||
commlist_freq[a.freq].push_back(a);
|
commlist_freq[a.freq].push_back(a);
|
||||||
|
|
||||||
// Push non-atis stations onto bucket map as well
|
// Push non-atis stations onto bucket map as well
|
||||||
if(a.type != ATIS) {
|
// In fact, push all stations onto bucket map for now so FGATCMgr::GetFrequency() works.
|
||||||
|
//if(a.type != ATIS) {
|
||||||
// get bucket number
|
// get bucket number
|
||||||
SGBucket bucket(a.lon, a.lat);
|
SGBucket bucket(a.lon, a.lat);
|
||||||
int bucknum = bucket.gen_index();
|
int bucknum = bucket.gen_index();
|
||||||
commlist_bck[bucknum].push_back(a);
|
commlist_bck[bucknum].push_back(a);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
fin >> skipcomment;
|
fin >> skipcomment;
|
||||||
|
|
Loading…
Reference in a new issue