]> git.mxchange.org Git - flightgear.git/commitdiff
TACAN: fix receiving mobile TACAN.
authorThomas Geymayer <tomgey@gmail.com>
Fri, 28 Feb 2014 19:01:09 +0000 (20:01 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Fri, 28 Feb 2014 19:01:09 +0000 (20:01 +0100)
src/Instrumentation/tacan.cxx

index d1606b8e93e188eef8f9a21c1de4de5330c50ad1..5b1d358649a110a444cc8986ed762dc2b46b7021 100644 (file)
@@ -148,7 +148,7 @@ TACAN::update (double delta_time_sec)
     //calculate the bearing and range of the mobile from the aircraft
     double mobile_az2 = 0;
     double mobile_bearing = 0;
     //calculate the bearing and range of the mobile from the aircraft
     double mobile_az2 = 0;
     double mobile_bearing = 0;
-    double mobile_distance = 0;
+    double mobile_distance = SGLimitsd::max();
     if (_mobile_valid) {
         geo_inverse_wgs_84(pos, _mobilePos,
                        &mobile_bearing, &mobile_az2, &mobile_distance);
     if (_mobile_valid) {
         geo_inverse_wgs_84(pos, _mobilePos,
                        &mobile_bearing, &mobile_az2, &mobile_distance);
@@ -157,7 +157,7 @@ TACAN::update (double delta_time_sec)
     //calculate the bearing and range of the station from the aircraft
     double az2 = 0;
     double bearing = 0;
     //calculate the bearing and range of the station from the aircraft
     double az2 = 0;
     double bearing = 0;
-    double distance = 0;
+    double distance = SGLimitsd::max();
     if (_transmitter_valid) {
         geo_inverse_wgs_84(pos, _transmitter_pos,
                            &bearing, &az2, &distance);
     if (_transmitter_valid) {
         geo_inverse_wgs_84(pos, _transmitter_pos,
                            &bearing, &az2, &distance);