68 lines
2.4 KiB
C++
68 lines
2.4 KiB
C++
#include <iostream>
|
|
|
|
#include "../mcc_ccte_erfa_new.h"
|
|
#include "../mcc_coord.h"
|
|
|
|
using namespace mcc;
|
|
|
|
typedef MccGenericSkyPoint<mcc::ccte::erfa::MccCCTE_ERFA> skypt_t;
|
|
|
|
|
|
static skypt_t::ccte_t::engine_state_t saoras{.meteo{.temperature = 0.0, .humidity = 0.5, .pressure = 1010.0},
|
|
.wavelength = 0.5,
|
|
.lat = 43.646711_degs,
|
|
.lon = 41.440732_degs,
|
|
.elev = 2100.0};
|
|
|
|
// skypt_t::cctEngine.setStateERFA(saoras);
|
|
|
|
static_assert(mcc_angle_c<double>, "!!!!!!!!!!!!");
|
|
|
|
int main()
|
|
{
|
|
skypt_t::cctEngine.setStateERFA(saoras);
|
|
|
|
skypt_t pt;
|
|
MccSkyRADEC_ICRS icrs(0.0, 0.0);
|
|
|
|
pt = icrs;
|
|
|
|
MccSkyRADEC_OBS radec_obs{0.0, 0.0};
|
|
MccSkyAZALT azalt{0, 0};
|
|
MccSkyAZZD azzd{0, 0};
|
|
|
|
pt.to(radec_obs, azalt, azzd);
|
|
|
|
std::cout << "FROM ICRS TO OBSERVED:\n";
|
|
std::cout << "RA_ICRS = " << icrs.x().sexagesimal(true) << "\n";
|
|
std::cout << "DEC_ICRS = " << icrs.y().sexagesimal() << "\n";
|
|
std::cout << "OBS COORD EPOCH: " << radec_obs.epoch().UTC() << "\n";
|
|
std::cout << "RA_OBS = " << radec_obs.x().sexagesimal(true) << "\n";
|
|
std::cout << "DEC_OBS = " << radec_obs.y().sexagesimal() << "\n";
|
|
std::cout << "AZ = " << azalt.x().sexagesimal() << "\n";
|
|
std::cout << "ALT = " << azalt.y().sexagesimal() << "\n";
|
|
std::cout << "ZD = " << azzd.y().sexagesimal() << "\n";
|
|
|
|
|
|
// radec_obs = {10.2387983_degs, "43:21:34.5465"_dms};
|
|
pt = radec_obs;
|
|
pt.to(icrs);
|
|
|
|
std::cout << "\n\nFROM OBSERVED TO ICRS:\n";
|
|
std::cout << "OBS COORD EPOCH: " << radec_obs.epoch().UTC() << "\n";
|
|
std::cout << "RA_OBS = " << radec_obs.x().sexagesimal(true) << "\n";
|
|
std::cout << "DEC_OBS = " << radec_obs.y().sexagesimal() << "\n";
|
|
std::cout << "RA_ICRS = " << icrs.x().sexagesimal(true) << "\n";
|
|
std::cout << "DEC_ICRS = " << icrs.y().sexagesimal() << "\n";
|
|
|
|
pt.to(azzd);
|
|
std::cout << "\n\nFROM OBSERVED TO OBSERVED:\n";
|
|
std::cout << "OBS COORD EPOCH: " << radec_obs.epoch().UTC() << "\n";
|
|
std::cout << "RA_OBS = " << radec_obs.x().sexagesimal(true) << "\n";
|
|
std::cout << "DEC_OBS = " << radec_obs.y().sexagesimal() << "\n";
|
|
std::cout << "AZ = " << azzd.x().sexagesimal() << "\n";
|
|
std::cout << "ZD = " << azzd.y().sexagesimal() << "\n";
|
|
|
|
return 0;
|
|
}
|