diff --git a/cxx/mount.h b/cxx/mount.h index d14e4b4..083c51f 100644 --- a/cxx/mount.h +++ b/cxx/mount.h @@ -87,8 +87,9 @@ struct MccMountPosition { mnt_coord_t mntAZ, mntZD; mnt_coord_t mntPA; - // encoder-measured current mount moving speed (in radians/s) + // encoder-measured (non-corrected for PCS) current mount position and moving speed (in radians, radians/s) // X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one + mnt_coord_t mntPosX, mntPosY; mnt_speed_t mntSpeedX, mntSpeedY; // current refraction coefficient (for tagZD) diff --git a/cxx/mount_state.h b/cxx/mount_state.h index 63c8661..4928946 100644 --- a/cxx/mount_state.h +++ b/cxx/mount_state.h @@ -6,8 +6,15 @@ namespace mcc::traits { -template -concept mcc_mount_c = std::derived_from>; +// template +// concept mcc_mount_c = std::derived_from>; + +template +concept mcc_mount_c = requires { + typename T::mount_config_t; + requires std::same_as; + requires std::derived_from>; +}; } // namespace mcc::traits @@ -28,8 +35,7 @@ public: // helper static constexpr auto mcc_noop_callback = [](const mount_state_error_t&) {}; - template - MccMountAbstractState(traits::mcc_mount_c auto* mount_ptr, + MccMountAbstractState(traits::mcc_mount_c auto* mount_ptr, std::convertible_to auto&& enter_callback, std::convertible_to auto&& exit_callback, std::convertible_to auto&& error_callback) @@ -74,4 +80,27 @@ public: } }; + + +/* */ +class MccMountStateSlew +{ +public: + enum coords_kind_t { COORDS_KIND_RADEC_IRCS, COORDS_KIND_RADEC_APP, COORDS_KIND_HADEC_APP, COORDS_KIND_AZALT }; + + struct slew_state_params_t { + coords_kind_t coordKind{COORDS_KIND_RADEC_APP}; + MccAngle x, y; // according to 'coordKind' + + bool stop{false}; // stop after + }; + + MccMountStateSlew() {} + + std::string_view ident() const + { + return "MCC-MOUNT-STATE-SLEW"; + } +}; + } // namespace mcc