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;
}
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;
getline( in, n.name );
@ -166,7 +166,13 @@ operator >> ( istream& in, FGNavRecord& n )
n.apt_id = n.name.substr(0, pos);
}
// Ranges are included with the latest data format, no need to
// assign our own defaults, unless the range is not set for some
// reason.
if ( n.range < 0.1 ) {
// assign default ranges
if ( n.type == 2 || n.type == 3 ) {
n.range = FG_NAV_DEFAULT_RANGE;
} else if ( n.type == 4 || n.type == 5 || n.type == 6 ) {
@ -176,6 +182,7 @@ operator >> ( istream& in, FGNavRecord& n )
} else {
n.range = FG_LOC_DEFAULT_RANGE;
}
}
// transmitted ident (same as ident unless modeling a fault)
n.trans_ident = n.ident;