diff --git a/cxx/mount.h b/cxx/mount.h index bfe65ff..772d5b1 100644 --- a/cxx/mount.h +++ b/cxx/mount.h @@ -2,6 +2,7 @@ /* MOUNT CONTROL COMPONENTS LIBRARY */ +#include #include #include #include @@ -29,7 +30,8 @@ concept mcc_mount_state_c = requires(T t, const T t_const) { template 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 _exitCurrentState; + std::atomic _mountCurrentState; void updateMountState() {} };