use one second resolution

This commit is contained in:
Sven Czarnian
2021-11-25 22:27:34 +01:00
parent 8390cd5309
commit 1936b3649b

View File

@@ -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();