diff --git a/cxx/mcc_mount_astrom.h b/cxx/mcc_mount_astrom.h index 610aa18..dba829e 100644 --- a/cxx/mcc_mount_astrom.h +++ b/cxx/mcc_mount_astrom.h @@ -40,7 +40,7 @@ concept mcc_astrom_engine_c = requires(T t, const T t_const) { /* coordinates conversional methods */ - // ICRS RA and DEC to observed place: icrs2obs(ra, dec, jd, ra_app, dec_app, ha, az, alt, eo) + // ICRS RA and DEC to observed place: icrs2obs(ra, dec, pra, pdec, plx, jd, ra_app, dec_app, ha, az, alt, eo) { t.icrs2obs(std::declval(), std::declval(), std::declval(), std::declval(), diff --git a/cxx/mcc_mount_config.h b/cxx/mcc_mount_config.h index 358fb14..1d67ebb 100644 --- a/cxx/mcc_mount_config.h +++ b/cxx/mcc_mount_config.h @@ -2,12 +2,26 @@ /* MOUNT CONTROL COMPONENTS LIBRARY */ +#include "mcc_mount_astrom.h" #include "mcc_mount_coord.h" -#include "mount_astrom.h" +#include "mcc_mount_hardware.h" namespace mcc { + +namespace traits +{ + +template +concept mcc_mount_config_c = requires(T t) { + { t.astromEngine() } -> traits::mcc_astrom_engine_c; + { t.hardware() } -> traits::mcc_mount_hardware_c; +}; + +} // namespace traits + + // meteo parameters (e.g. to compute refraction) struct MccMountMeteo { typedef double temp_t; @@ -45,15 +59,14 @@ static constexpr std::string_view MccMountTypeStr = TYPE == MccMountType::GERMAN : "UNKNOWN"; // mount configuration -template +template struct MccMountConfig { static constexpr MccMountType mountType = MOUNT_TYPE; virtual ~MccMountConfig() = default; - astrom::MccLeapSeconds leapSeconds; - astrom::MccIersBulletinA iersBulletinA; - MccMountSiteInfo siteInfo{.latitude = 0.0, .longitude = 0.0, .elevation = 0.0, .name{"ALL-ZERO"}}; MccMountMeteo ambientMeteo{.temperature = 0.0, .humidity = 0.5, .pressure = 1010.0}; diff --git a/cxx/mcc_mount_hardware.h b/cxx/mcc_mount_hardware.h index 91f398f..486ecb7 100644 --- a/cxx/mcc_mount_hardware.h +++ b/cxx/mcc_mount_hardware.h @@ -80,11 +80,11 @@ concept mcc_tuple_motor_ref_c = mcc_tuple_c && requires(T t) { template -concept mcc_hw_enc_lref_c = std::is_lvalue_reference_v && mcc_hw_encoder_c>; +concept mcc_hw_enc_lref_c = std::is_lvalue_reference_v && mcc_hw_encoder_c>; template -concept mcc_hw_motor_lref_c = std::is_lvalue_reference_v && mcc_hw_motor_c>; +concept mcc_hw_motor_lref_c = std::is_lvalue_reference_v && mcc_hw_motor_c>; } // namespace details diff --git a/cxx/mcc_traits.h b/cxx/mcc_traits.h index a3804d4..21ec782 100644 --- a/cxx/mcc_traits.h +++ b/cxx/mcc_traits.h @@ -158,6 +158,10 @@ concept mcc_tuple_c = requires { }; }; + +template +concept mcc_nonconst_ref = std::is_lvalue_reference_v && !std::is_const_v>; + namespace details {