This commit is contained in:
2025-04-29 18:31:41 +03:00
parent 18628aff28
commit e1421a1c2e
2 changed files with 13 additions and 5 deletions

View File

@@ -417,15 +417,15 @@ std::pair<std::chrono::duration<double>, std::chrono::duration<double>> mcc_time
auto C1C3 = C1_2 + C3_2;
auto D = C2_2 * C3_2 - C1C3 * (C2_2 - C1_2);
if (D < 0.0) {
if (D < 0.0) { // object never reach given azimuth
return {inf_dur, inf_dur};
}
auto cos_t1 = -(C2C3 + sqrt(D)) / C1C3;
auto cos_t2 = -(C2C3 - sqrt(D)) / C1C3;
auto cos_ha1 = -(C2C3 + sqrt(D)) / C1C3;
auto cos_ha2 = -(C2C3 - sqrt(D)) / C1C3;
auto sin_z1 = (C2 + C3 * cos_t1) / cos_az;
auto sin_z2 = (C2 + C3 * cos_t2) / cos_az;
auto sin_z1 = (C2 + C3 * cos_ha1) / cos_az;
auto sin_z2 = (C2 + C3 * cos_ha2) / cos_az;
auto ut1 = now + dut1;
auto tt = now + tai_utc + tt_tai;