+// load the carrier navaids file
+
+ string file, name;
+ path = "";
+ path = globals->get_fg_root() ;
+ path.append( "Navaids/carrier_nav.dat" );
+
+ file = path.str();
+ SG_LOG( SG_GENERAL, SG_INFO, "opening file: " << path.str() );
+
+ sg_gzifstream incarrier( path.str() );
+
+ if ( !incarrier.is_open() ) {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
+ exit(-1);
+ }
+
+ // skip first two lines
+ //incarrier >> skipeol;
+ //incarrier >> skipeol;
+
+#ifdef __MWERKS__
+ char c = 0;
+ while ( incarrier.get(c) && c != '\0' ) {
+ incarrier.putback(c);
+#else
+ while ( ! incarrier.eof() ) {
+#endif
+
+ FGNavRecord *r = new FGNavRecord;
+ incarrier >> (*r);
+ carrierlist->add ( r );
+ /*cout << " carrier lon: "<< r->get_lon() ;
+ cout << " carrier lat: "<< r->get_lat() ;
+ cout << " freq: " << r->get_freq() ;
+ cout << " carrier name: "<< r->get_name() << endl;*/
+
+ //if ( r->get_type() > 95 ) {
+ // break;}
+ } // end while
+
+// end loading the carrier navaids file
+
+// load the channel/freqency file
+ string channel, freq;
+ path="";
+ path = globals->get_fg_root();
+ path.append( "Navaids/TACAN_freq.dat" );
+
+ SG_LOG( SG_GENERAL, SG_INFO, "opening file: " << path.str() );
+
+ sg_gzifstream inchannel( path.str() );
+
+ if ( !inchannel.is_open() ) {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
+ exit(-1);
+ }
+
+ // skip first line
+ inchannel >> skipeol;
+
+#ifdef __MWERKS__
+ char c = 0;
+ while ( inchannel.get(c) && c != '\0' ) {
+ in.putback(c);
+#else
+ while ( ! inchannel.eof() ) {
+#endif
+
+ FGTACANRecord *r = new FGTACANRecord;
+ inchannel >> (*r);
+ channellist->add ( r );
+ //cout << "channel = " << r->get_channel() ;
+ //cout << " freq = " << r->get_freq() << endl;
+
+ } // end while
+
+
+ // end ReadChanFile
+