Browse Source

use one second resolution

Sven Czarnian 3 years ago
parent
commit
1936b3649b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/types/Inbound.cpp

+ 4 - 4
src/types/Inbound.cpp

@@ -278,24 +278,24 @@ void Inbound::update(EuroScopePlugIn::CRadarTarget& target) {
 
     Time flightTime = 0_s;
     while (0.0_m < distanceToNextWaypoint) {
-        Length distance = groundSpeed * 10_s;
+        Length distance = groundSpeed * 1_s;
 
         if (altitude > destination.altitude()) {
             /* new descend required based on 3° glide */
             if (((altitude - destination.altitude()).convert(feet) / 1000.0f * 3.0f) > distanceToNextWaypoint.convert(nauticmile)) {
                 const auto oldGS = groundSpeed;
-                const auto descendRate = oldGS * 10_s * std::sinf(0.0523599f);
+                const auto descendRate = oldGS * 1_s * std::sinf(0.0523599f);
                 altitude -= descendRate;
 
                 const auto newGS = this->groundSpeed(altitude, this->indicatedAirspeed(altitude), heading);
                 groundSpeed = std::min(groundSpeed, newGS);
 
-                distance = (groundSpeed + oldGS) * 0.5f * 10_s;
+                distance = (groundSpeed + oldGS) * 0.5f * 11_s;
             }
         }
 
         distanceToNextWaypoint -= distance;
-        flightTime += 10_s;
+        flightTime += 1_s;
     }
 
     auto currentUtc = UtcTime::currentUtc();