...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user