This commit is contained in:
2025-11-18 18:51:01 +03:00
parent 14e583a244
commit 273f239abb
5 changed files with 93 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ int main()
auto now = std::chrono::system_clock::now();
mcc::MccCelestialPoint cp{
.pair_kind = mcc::MccCoordPairKind::COORDS_KIND_RADEC_ICRS, .X = "10:20:30.44"_hms, .Y = "20:30:40.55"_dms};
.pair_kind = mcc::MccCoordPairKind::COORDS_KIND_RADEC_ICRS, .X = "17:20:30.44"_hms, .Y = "20:30:40.55"_dms};
mcc::MccEqtHrzCoords eqhrz;
eqhrz.time_point = now;
@@ -156,5 +156,50 @@ int main()
std::cout << a1.sexagesimal() << "\n" << a2.sexagesimal() << "\n";
std::cout << "\n\n";
std::memset(&eqhrz, 0, sizeof(eqhrz));
eqhrz.X = "12:13:10.08"_hms;
eqhrz.Y = "0:07:39.5"_dms;
eqhrz.X = "00:00:0.0"_hms;
eqhrz.Y = "00:00:00.0"_dms;
// eqhrz.pair_kind = mcc::MccCoordPairKind::COORDS_KIND_RADEC_APP;
// eqhrz.pair_kind = mcc::MccCoordPairKind::COORDS_KIND_RADEC_ICRS;
eqhrz.pair_kind = mcc::MccCoordPairKind::COORDS_KIND_AZZD;
eqhrz.time_point = std::chrono::system_clock::now();
erfa.transformCoordinates(eqhrz, &eqhrz);
// std::cout << "RA_ICRS = " << mcc::MccAngle(cp.X).sexagesimal(true) << "\n";
// std::cout << "DEC_ICRS = " << mcc::MccAngle(cp.Y).sexagesimal() << "\n\n";
std::cout << "time point = " << eqhrz.time_point << "\n";
std::cout << "RA_APP = " << mcc::MccAngle(eqhrz.RA_APP).sexagesimal(true) << "\n";
std::cout << "DEC_APP = " << mcc::MccAngle(eqhrz.DEC_APP).sexagesimal() << "\n";
std::cout << "HA = " << mcc::MccAngle(eqhrz.HA).sexagesimal(true) << "\n";
std::cout << "AZ = " << mcc::MccAngle(eqhrz.AZ).sexagesimal() << "\n";
std::cout << "ZD = " << mcc::MccAngle(eqhrz.ZD).sexagesimal() << "\n";
std::cout << "ALT = " << mcc::MccAngle(eqhrz.ALT).sexagesimal() << "\n";
// std::cout << "\n";
// std::cout << "\n";
// state.meteo = {10.0, 0.5, 0.0}; // refraction must be 0!!!
// erfa.setStateERFA(state);
// eqhrz.X = "00:00:0.0"_hms;
// eqhrz.Y = "60:00:00.0"_dms;
// // restore useful quantities
// state.meteo = {10.0, 0.5, 1010.0};
// erfa.setStateERFA(state);
return 0;
}