...
This commit is contained in:
parent
7eded94ac1
commit
c7693b7fea
@ -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<typename T::coord_t>(), std::declval<typename T::coord_t>(),
|
||||
std::declval<typename T::prop_motion_t>(), std::declval<typename T::prop_motion_t>(),
|
||||
|
||||
@ -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 <typename T>
|
||||
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 <MccMountType MOUNT_TYPE>
|
||||
template <MccMountType MOUNT_TYPE,
|
||||
traits::mcc_astrom_engine_c ASTROM_ENGINE_TYPE,
|
||||
traits::mcc_mount_hardware_c HARDWARE_TYPE>
|
||||
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};
|
||||
|
||||
@ -80,11 +80,11 @@ concept mcc_tuple_motor_ref_c = mcc_tuple_c<T> && requires(T t) {
|
||||
|
||||
|
||||
template <typename T>
|
||||
concept mcc_hw_enc_lref_c = std::is_lvalue_reference_v<T> && mcc_hw_encoder_c<std::remove_cvref_t<T>>;
|
||||
concept mcc_hw_enc_lref_c = std::is_lvalue_reference_v<T> && mcc_hw_encoder_c<std::remove_reference_t<T>>;
|
||||
|
||||
|
||||
template <typename T>
|
||||
concept mcc_hw_motor_lref_c = std::is_lvalue_reference_v<T> && mcc_hw_motor_c<std::remove_cvref_t<T>>;
|
||||
concept mcc_hw_motor_lref_c = std::is_lvalue_reference_v<T> && mcc_hw_motor_c<std::remove_reference_t<T>>;
|
||||
|
||||
} // namespace details
|
||||
|
||||
|
||||
@ -158,6 +158,10 @@ concept mcc_tuple_c = requires {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template <typename T>
|
||||
concept mcc_nonconst_ref = std::is_lvalue_reference_v<T> && !std::is_const_v<std::remove_reference_t<T>>;
|
||||
|
||||
namespace details
|
||||
{
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user