From c71cf98dd90906f40901af803185bd40f7b75049 Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Fri, 25 Jul 2025 09:03:29 +0300 Subject: [PATCH] ... --- cxx/mcc_mount_concepts.h | 7 +++++-- cxx/mcc_slew_model.h | 11 ++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cxx/mcc_mount_concepts.h b/cxx/mcc_mount_concepts.h index c205288..748df08 100644 --- a/cxx/mcc_mount_concepts.h +++ b/cxx/mcc_mount_concepts.h @@ -222,8 +222,8 @@ concept mcc_mount_hardware_c = !std::copyable && std::movable && requires( []() { // hardware is in stop state (no any moving) static constexpr auto v1 = T::hw_state_t::HW_STATE_STOP; - // hardware is in slew state (move to given celestial point) + // hardware is in slew state (move to given celestial point) static constexpr auto v2 = T::hw_state_t::HW_STATE_SLEW; // hardware is in track state (track given celestial point) @@ -234,7 +234,7 @@ concept mcc_mount_hardware_c = !std::copyable && std::movable && requires( // a class that contains at least time of measurement, coordinates for x,y axes and its moving rates requires requires(typename T::axes_pos_t pos) { - requires std::same_as; // time point of measurement + requires std::same_as; // time point requires std::same_as; // co-longitude coordinate requires std::same_as; // co-latitude coordinate @@ -252,6 +252,9 @@ concept mcc_mount_hardware_c = !std::copyable && std::movable && requires( { t.stop() } -> std::same_as; // stop any moving { t.init() } -> std::same_as; // initialize hardware + + { t.slewTo(std::declval()) } -> std::same_as; + { t.correctTo(std::declval()) } -> std::same_as; }; diff --git a/cxx/mcc_slew_model.h b/cxx/mcc_slew_model.h index f9acdd5..f0fdaec 100644 --- a/cxx/mcc_slew_model.h +++ b/cxx/mcc_slew_model.h @@ -96,9 +96,10 @@ inline std::error_code make_error_code(MccSimpleSlewModelErrorCode ec) /* - * WARNING: it is assumed that coordinates are in radians! - * but this fact is only used if slew coordinate pair are given as - * [azimuth, zenithal distance] (see sources code below) + * It is very simple slew model! + * There are no any complex routes (bypass of prohibited), + * just a strait path from current point to target + * */ template @@ -123,7 +124,7 @@ public: // coordinates polling interval in seconds std::chrono::duration coordPollingInterval{0.1}; bool stopAfterSlew{false}; - std::chrono::seconds timeout{3600}; + std::chrono::seconds slewTimeout{3600}; }; @@ -367,7 +368,7 @@ protected: prev_time_point = t_data.time_point; - if ((std::chrono::steady_clock::now() - start_poll_tm) > slew_point.timeout) { + if ((std::chrono::steady_clock::now() - start_poll_tm) > slew_point.slewTimeout) { logError("Waiting time for completion of slewing expired!"); return MccSimpleSlewModelErrorCode::ERROR_SLEW_TIMEOUT; }