...
This commit is contained in:
32
cxx/mount.h
32
cxx/mount.h
@@ -5,6 +5,7 @@
|
||||
#include <concepts>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
@@ -15,8 +16,7 @@ enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTA
|
||||
// mount state type concept
|
||||
template <typename T>
|
||||
concept mcc_mount_state_c = requires(T t, const T t_const) {
|
||||
typename T::state_id_t;
|
||||
{ t.ident() } -> std::same_as<typename T::state_id_t>;
|
||||
{ t_const.ident() } -> std::same_as<std::string_view>;
|
||||
|
||||
typename T::context_t;
|
||||
{ t.enter(std::declval<const typename T::context_t&>()) } -> std::same_as<void>;
|
||||
@@ -29,9 +29,37 @@ concept mcc_mount_state_c = requires(T t, const T t_const) {
|
||||
template <MccMountType MOUNT_TYPE>
|
||||
class MccMount
|
||||
{
|
||||
typedef double coord_t;
|
||||
typedef double time_point_t;
|
||||
|
||||
public:
|
||||
static constexpr MccMountType mountType = MOUNT_TYPE;
|
||||
|
||||
/* mount main-cycle variable quantities */
|
||||
struct mount_state_t {
|
||||
// time-related
|
||||
time_point_t siderTime; // sideral time
|
||||
|
||||
// target (user-input) current coordinates (in radians)
|
||||
coord_t tagRA, tagDEC;
|
||||
coord_t tagHA;
|
||||
coord_t tagAZ, tagZD;
|
||||
|
||||
// encoder-measured current mount coordinates (in radians)
|
||||
coord_t mntRA, mntDEC;
|
||||
coord_t mntHA;
|
||||
coord_t mntAZ, mntZD;
|
||||
|
||||
// current refraction coefficient
|
||||
coord_t currRefr;
|
||||
|
||||
// PCS (pointing correction system) corrections
|
||||
coord_t pcsX, pcsY; // X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one
|
||||
|
||||
// mount current state
|
||||
};
|
||||
|
||||
|
||||
|
||||
MccMount()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user