This commit is contained in:
Timur A. Fatkhullin 2025-03-10 17:18:59 +03:00
parent 96cf21dbf7
commit 8da923f9e7

View File

@ -2,6 +2,7 @@
/* MOUNT CONTROL COMPONENTS LIBRARY */
#include <atomic>
#include <concepts>
#include <cstdint>
#include <functional>
@ -29,7 +30,8 @@ concept mcc_mount_state_c = requires(T t, const T t_const) {
template <MccMountType MOUNT_TYPE>
class MccMount
{
typedef double coord_t;
typedef double mnt_coord_t;
typedef double mnt_speed_t;
typedef double time_point_t;
public:
@ -41,20 +43,24 @@ public:
time_point_t siderTime; // sideral time
// target (user-input) current coordinates (in radians)
coord_t tagRA, tagDEC;
coord_t tagHA;
coord_t tagAZ, tagZD;
mnt_coord_t tagRA, tagDEC;
mnt_coord_t tagHA;
mnt_coord_t tagAZ, tagZD;
// encoder-measured current mount coordinates (in radians)
coord_t mntRA, mntDEC;
coord_t mntHA;
coord_t mntAZ, mntZD;
mnt_coord_t mntRA, mntDEC;
mnt_coord_t mntHA;
mnt_coord_t mntAZ, mntZD;
// encoder-measured current mount moving speed (in radians/s)
mnt_speed_t mntSpeedX,
mntSpeedY; // X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one
// current refraction coefficient
coord_t currRefr;
mnt_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
mnt_coord_t pcsX, pcsY; // X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one
// mount current state
};
@ -80,6 +86,7 @@ public:
protected:
std::function<void()> _exitCurrentState;
std::atomic<mount_state_t> _mountCurrentState;
void updateMountState() {}
};