From 1936b3649b899035163c698ba37f1ce84541b6ce Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 25 Nov 2021 22:27:34 +0100 Subject: [PATCH] use one second resolution --- src/types/Inbound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/Inbound.cpp b/src/types/Inbound.cpp index a721cff..b16e11c 100644 --- a/src/types/Inbound.cpp +++ b/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();