...
This commit is contained in:
parent
d0674d15a6
commit
88d4b30a58
@ -87,8 +87,9 @@ struct MccMountPosition {
|
|||||||
mnt_coord_t mntAZ, mntZD;
|
mnt_coord_t mntAZ, mntZD;
|
||||||
mnt_coord_t mntPA;
|
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
|
// 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;
|
mnt_speed_t mntSpeedX, mntSpeedY;
|
||||||
|
|
||||||
// current refraction coefficient (for tagZD)
|
// current refraction coefficient (for tagZD)
|
||||||
|
|||||||
@ -6,8 +6,15 @@
|
|||||||
namespace mcc::traits
|
namespace mcc::traits
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename T, mcc::MccMountType MOUNT_TYPE>
|
// template <typename T, mcc::MccMountType MOUNT_TYPE>
|
||||||
concept mcc_mount_c = std::derived_from<T, mcc::MccMount<MOUNT_TYPE>>;
|
// concept mcc_mount_c = std::derived_from<T, mcc::MccMount<MOUNT_TYPE>>;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
concept mcc_mount_c = requires {
|
||||||
|
typename T::mount_config_t;
|
||||||
|
requires std::same_as<decltype(T::mountType), MccMountType>;
|
||||||
|
requires std::derived_from<T, mcc::MccMount<T::mountType, typename T::mount_config_t>>;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace mcc::traits
|
} // namespace mcc::traits
|
||||||
|
|
||||||
@ -28,8 +35,7 @@ public:
|
|||||||
// helper
|
// helper
|
||||||
static constexpr auto mcc_noop_callback = [](const mount_state_error_t&) {};
|
static constexpr auto mcc_noop_callback = [](const mount_state_error_t&) {};
|
||||||
|
|
||||||
template <MccMountType MOUNT_TYPE>
|
MccMountAbstractState(traits::mcc_mount_c auto* mount_ptr,
|
||||||
MccMountAbstractState(traits::mcc_mount_c<MOUNT_TYPE> auto* mount_ptr,
|
|
||||||
std::convertible_to<enter_callback_t> auto&& enter_callback,
|
std::convertible_to<enter_callback_t> auto&& enter_callback,
|
||||||
std::convertible_to<exit_callback_t> auto&& exit_callback,
|
std::convertible_to<exit_callback_t> auto&& exit_callback,
|
||||||
std::convertible_to<error_callback_t> auto&& error_callback)
|
std::convertible_to<error_callback_t> 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
|
} // namespace mcc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user