case FGPositioned::GS:
return FG_LOC_DEFAULT_RANGE;
- case FGPositioned::DME: return FG_DME_DEFAULT_RANGE;
- default: return FG_LOC_DEFAULT_RANGE;
+ case FGPositioned::DME:
+ return FG_DME_DEFAULT_RANGE;
+
+ case FGPositioned::TACAN:
+ case FGPositioned::MOBILE_TACAN:
+ return FG_TACAN_DEFAULT_RANGE;
+
+ default:
+ return FG_LOC_DEFAULT_RANGE;
}
}
int rawType;
aStream >> rawType;
- if (aStream.eof() || (rawType == 99)) {
+ if( aStream.eof() || (rawType == 99) || (rawType == 0) )
return 0; // happens with, eg, carrier_nav.dat
- }
double lat, lon, elev_ft, multiuse;
int freq, range;
SGGeod pos(SGGeod::fromDegFt(lon, lat, elev_ft));
name = simgear::strutils::strip(name);
-
+
// the type can be forced by our caller, but normally we use th value
// supplied in the .dat file
if (type == FGPositioned::INVALID) {
arp.first, arp.second);
}
- if (range < 0.01) {
+ if (range < 1) {
range = defaultNavRange(ident, type);
}
}
while ( ! incarrier.eof() ) {
+ incarrier >> skipcomment;
// force the type to be MOBILE_TACAN
readNavFromStream(incarrier, FGPositioned::MOBILE_TACAN);
- } // end while
+ }
return true;
}