This commit is contained in:
Timur A. Fatkhullin
2025-07-15 23:36:40 +03:00
parent 46e4b1e95f
commit 7e8d7eaa6b
2 changed files with 60 additions and 7 deletions

View File

@@ -219,6 +219,14 @@ int main(int argc, char* argv[])
std::cout << "(MINALT) time to zone: " << std::chrono::hh_mm_ss(tm) << " (" << now1 << ")\n";
}
tm = minalt_pz.timeFrom(tdata);
if (std::isinf(tm.count())) {
std::cout << "(MINALT) time from zone: the object never reaches the zone!\n";
} else {
auto now1 = now + std::chrono::duration_cast<decltype(now)::duration>(tm);
std::cout << "(MINALT) time from zone: " << std::chrono::hh_mm_ss(tm) << " (" << now1 << ")\n";
}
std::cout << "\n";
ra1 = "17:00:00"_hms;
@@ -235,13 +243,27 @@ int main(int argc, char* argv[])
tdata = {ra_o, dec_o, ha1, az1, alt1, 0.0, 0.0};
jd.mjd += 1.0;
res = erfa.icrs2obs(ra1, dec1, jd, ra_o, dec_o, ha1, az1, alt1, eor);
std::cout << "RA_app (+24h) = " << ra_o.sexagesimal(true) << "\n";
tm = maxalt_pz.timeTo(tdata);
if (std::isinf(tm.count())) {
std::cout << "(MAXALT) time to zone: the object never reaches the zone!\n";
} else {
// auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(tm);
auto now1 = now + std::chrono::duration_cast<decltype(now)::duration>(tm);
// auto now1 = now + ns;
std::cout << "(MAXALT) time to zone: " << std::chrono::hh_mm_ss(tm) << " (" << now1 << ")\n";
}
tm = maxalt_pz.timeFrom(tdata);
if (std::isinf(tm.count())) {
std::cout << "(MAXALT) time from zone: the object never reaches the zone!\n";
} else {
auto now1 = now + std::chrono::duration_cast<decltype(now)::duration>(tm);
std::cout << "(MAXALT) time from zone: " << std::chrono::hh_mm_ss(tm) << " (" << now1 << ")\n";
}
return ecode;
}