return;
}
- SGGeod pos(globals->get_aircraft_position());
+ SGGeod pos(globals->get_aircraft_position());
// On timeout, scan again
_time_before_search_sec -= delta_time_sec;
if ((_time_before_search_sec < 0 || _new_frequency) && _frequency_mhz >= 0)
double mobile_az2 = 0;
double mobile_bearing = 0;
double mobile_distance = 0;
-
- geo_inverse_wgs_84(pos, _mobilePos,
+ if (_mobile_valid) {
+ geo_inverse_wgs_84(pos, _mobilePos,
&mobile_bearing, &mobile_az2, &mobile_distance);
-
+ }
//calculate the bearing and range of the station from the aircraft
double az2 = 0;