This commit is contained in:
2025-03-20 17:11:17 +03:00
parent e1c546123e
commit c0cba8422f
5 changed files with 148 additions and 19 deletions

View File

@@ -6,20 +6,19 @@
#include <chrono>
#include <concepts>
#include <cstdint>
#include <fstream>
#include <functional>
#include <string_view>
#include "spdlog/sinks/null_sink.h"
#include "mcc_spdlog.h"
#include "mcc_traits.h"
#include "mount_astrom.h"
#include "mount_astrom_default.h"
// low-level functions
namespace lowlevel
{
#include "../LibSidServo/sidservo.h"
} // namespace lowlevel
// namespace lowlevel
// {
// #include "../LibSidServo/sidservo.h"
// } // namespace lowlevel
@@ -29,11 +28,16 @@ namespace mcc
namespace traits
{
// mount state type concept
template <typename T>
concept mcc_mount_state_c = requires(T t, const T t_const) {
{ t_const.ident() } -> std::same_as<std::string_view>;
// requires mcc_is_callable<typename T::error_callback_t>;
// requires mcc_is_callable<typename T::enter_callback_t>;
// requires mcc_is_callable<typename T::exit_callback_t>;
{ t.enter() } -> std::same_as<void>;
{ t.exit() } -> std::same_as<void>;
};
@@ -78,17 +82,19 @@ struct MccMountPosition {
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
// X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one
mnt_speed_t mntSpeedX, mntSpeedY;
// current refraction coefficient
// current refraction coefficient (for tagZD)
mnt_coord_t currRefr;
// PCS (pointing correction system) corrections
mnt_coord_t pcsX, pcsY; // 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 pcsX, pcsY;
};
/* MOUNT BASE TEMPLATED CLASS WITH BASIC FUNCTIONALITY */
enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTAZ_TYPE };