#pragma once /* MOUNT CONTROL COMPONENTS LIBRARY */ /* ASTROMETRY ENGINE BASED ON ERFA-LIBRARY */ #include // #include #include "mcc_astrom_iers.h" #include "mcc_mount_coord.h" namespace mcc::astrom::erfa { #include #include class MccMountAstromEngineERFA { public: typedef int engine_err_t; // meteo parameters (to compute refraction) struct meteo_t { typedef double temp_t; typedef double humid_t; typedef double press_t; temp_t temperature; // Temperature in C humid_t humidity; // humidity in % ([0.0, 1.0]) press_t pressure; // atmospheric presure in hPa=mB }; struct engine_state_t { meteo_t meteo{.temperature = 0.0, .humidity = 0.5, .pressure = 1010.0}; double wavelength = 0.55; // observed wavelength in mkm MccAngleLAT lat = "00:00:00"_dms; // site latitude MccAngleLON lon = "00:00:00"_dms; // site longitude mcc::astrom::iers::MccLeapSeconds _leapSeconds{}; mcc::astrom::iers::MccIersBulletinA _bulletinA{}; }; typedef std::chrono::system_clock::time_point time_point_t; struct juldate_t { static constexpr double MJD0 = ERFA_DJM0; double mjd{51544.5}; // J2000.0 }; typedef MccAngle coord_t; typedef MccAngle gst_t; typedef MccAngle pa_t; typedef double eo_t; struct refract_result_t { double refa, refb; }; protected: engine_state_t _currentState; }; } // namespace mcc::astrom::erfa