1
0
Fork 0

Newest data file format includes range for each transmitter. Load that data

and use it instead of our own hard coded defaults.
This commit is contained in:
curt 2006-01-24 17:13:28 +00:00
parent 0895721e68
commit fdd47f4b56

View file

@ -145,7 +145,7 @@ operator >> ( istream& in, FGNavRecord& n )
return in >> skipeol; return in >> skipeol;
} }
in >> n.lat >> n.lon >> n.elev_ft >> n.freq >> n.multiuse in >> n.lat >> n.lon >> n.elev_ft >> n.freq >> n.range >> n.multiuse
>> n.ident; >> n.ident;
getline( in, n.name ); getline( in, n.name );
@ -166,15 +166,22 @@ operator >> ( istream& in, FGNavRecord& n )
n.apt_id = n.name.substr(0, pos); n.apt_id = n.name.substr(0, pos);
} }
// assign default ranges // Ranges are included with the latest data format, no need to
if ( n.type == 2 || n.type == 3 ) { // assign our own defaults, unless the range is not set for some
n.range = FG_NAV_DEFAULT_RANGE; // reason.
} else if ( n.type == 4 || n.type == 5 || n.type == 6 ) {
n.range = FG_LOC_DEFAULT_RANGE; if ( n.range < 0.1 ) {
} else if ( n.type == 12 ) { // assign default ranges
n.range = FG_DME_DEFAULT_RANGE;
} else { if ( n.type == 2 || n.type == 3 ) {
n.range = FG_LOC_DEFAULT_RANGE; n.range = FG_NAV_DEFAULT_RANGE;
} else if ( n.type == 4 || n.type == 5 || n.type == 6 ) {
n.range = FG_LOC_DEFAULT_RANGE;
} else if ( n.type == 12 ) {
n.range = FG_DME_DEFAULT_RANGE;
} else {
n.range = FG_LOC_DEFAULT_RANGE;
}
} }
// transmitted ident (same as ident unless modeling a fault) // transmitted ident (same as ident unless modeling a fault)