...
This commit is contained in:
@@ -2,30 +2,10 @@
|
||||
#include <iostream>
|
||||
|
||||
// #include "../mcc_coord.h"
|
||||
#include "../mcc_mount_astro_erfa.h"
|
||||
#include "../mcc_traits.h"
|
||||
#include "../mount_astrom.h"
|
||||
|
||||
template <typename T, typename U>
|
||||
concept ncr_c =
|
||||
std::is_lvalue_reference_v<T> && !std::is_const_v<T> && std::constructible_from<std::remove_reference_t<T>, U>;
|
||||
|
||||
|
||||
template <typename T>
|
||||
concept ae_c = requires(T t) {
|
||||
requires mcc::traits::mcc_systime_c<mcc::traits::mcc_func_arg1_t<decltype(&T::greg2jul)>>;
|
||||
requires mcc::traits::mcc_output_arg_c<mcc::traits::mcc_func_argN_t<decltype(&T::greg2jul), 2>>;
|
||||
// requires ncr_c<mcc::traits::mcc_func_argN_t<decltype(&T::greg2jul), 2>, double>;
|
||||
// requires std::constructible_from<mcc::traits::mcc_func_argN_t<decltype(&T::greg2jul), 2>, double>;
|
||||
};
|
||||
|
||||
|
||||
struct AE {
|
||||
// int greg2jul(mcc::traits::mcc_systime_c auto t, double f) {}
|
||||
int greg2jul(std::chrono::sys_time<std::chrono::nanoseconds> t, double& f)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
// BTA coords from maps.yandex.ru: 43.646711, 41.440732
|
||||
|
||||
@@ -136,8 +116,10 @@ int main(int argc, char* argv[])
|
||||
now = std::chrono::system_clock::now();
|
||||
|
||||
for (auto& el : mjds) {
|
||||
st = erfa::eraAtco13(1.343523, 0.32352345, 0.0, 0.0, 0.0, 0.0, ERFA_DJM0, el, 0.041, elong, phi, 2100.0, 0.0,
|
||||
0.0, 700.0, 10.0, 0.8, 0.5, &aob, &zob, &hob, &dob, &rob, &eo);
|
||||
st = mcc::astrom::erfa::eraAtco13(1.343523, 0.32352345, 0.0, 0.0, 0.0, 0.0, ERFA_DJM0, el, 0.041, elong, phi,
|
||||
2100.0, 0.0, 0.0, 700.0, 10.0, 0.8, 0.5, &aob, &zob, &hob, &dob, &rob, &eo);
|
||||
// st = erfa::eraAtco13(1.343523, 0.32352345, 0.0, 0.0, 0.0, 0.0, ERFA_DJM0, el, 0.041, elong, phi, 2100.0, 0.0,
|
||||
// 0.0, 700.0, 10.0, 0.8, 0.5, &aob, &zob, &hob, &dob, &rob, &eo);
|
||||
}
|
||||
std::cout << std::format(
|
||||
"comp time for {} coordinate transf = {}\n", N,
|
||||
@@ -161,8 +143,32 @@ int main(int argc, char* argv[])
|
||||
|
||||
std::cout << ra.sexagesimal(false, 4) << "\n";
|
||||
|
||||
std::cout << "\n\n\n";
|
||||
std::cout << "ae_c = " << std::boolalpha << ae_c<AE> << "\n";
|
||||
|
||||
std::cout << "\n\n\n\n";
|
||||
|
||||
mcc::astrom::erfa::MccMountAstromEngineERFA::engine_state_t state;
|
||||
state.lon = 41.440732_degs;
|
||||
state.lat = 43.646711_degs;
|
||||
state.elev = 2100.0;
|
||||
|
||||
state.meteo = {10.0, 0.5, 1010.0};
|
||||
|
||||
|
||||
mcc::astrom::erfa::MccMountAstromEngineERFA erfa(state);
|
||||
mcc::astrom::erfa::MccMountAstromEngineERFA::juldate_t jd{60861.72};
|
||||
|
||||
now = std::chrono::system_clock::now();
|
||||
erfa.greg2jul(now, jd);
|
||||
std::cout << "MJD(" << now << ") = " << jd.mjd << "\n";
|
||||
|
||||
|
||||
mcc::MccAngle ra1{"10:00:00", mcc::mcc_hms}, dec1{"68:25:10.43"}, ra_o, dec_o, ha1, az1, alt1;
|
||||
|
||||
std::cout << "RA = " << ra1.sexagesimal(true) << ", DEC = " << dec1.sexagesimal() << "\n";
|
||||
auto res = erfa.icrs2obs(ra1, dec1, 0, 0, 0, jd, ra_o, dec_o, ha1, az1, alt1, eo);
|
||||
std::cout << "ret code (icrs2obs) = " << erfa.errorString(res) << "\n";
|
||||
std::cout << "alt = " << alt1.sexagesimal() << "\n";
|
||||
std::cout << "az = " << az1.sexagesimal() << "\n";
|
||||
|
||||
return ecode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user