...
This commit is contained in:
parent
1d49077d7b
commit
c71cf98dd9
@ -222,8 +222,8 @@ concept mcc_mount_hardware_c = !std::copyable<T> && std::movable<T> && 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<T> && std::movable<T> && 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<decltype(pos.time_point), typename T::time_point_t>; // time point of measurement
|
||||
requires std::same_as<decltype(pos.time_point), typename T::time_point_t>; // time point
|
||||
|
||||
requires std::same_as<decltype(pos.x), typename T::coord_t>; // co-longitude coordinate
|
||||
requires std::same_as<decltype(pos.y), typename T::coord_t>; // co-latitude coordinate
|
||||
@ -252,6 +252,9 @@ concept mcc_mount_hardware_c = !std::copyable<T> && std::movable<T> && requires(
|
||||
|
||||
{ t.stop() } -> std::same_as<typename T::error_t>; // stop any moving
|
||||
{ t.init() } -> std::same_as<typename T::error_t>; // initialize hardware
|
||||
|
||||
{ t.slewTo(std::declval<typename T::axes_pos_t>()) } -> std::same_as<typename T::error_t>;
|
||||
{ t.correctTo(std::declval<typename T::axes_pos_t>()) } -> std::same_as<typename T::error_t>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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 <traits::mcc_logger_c LoggerT = MccNullLogger>
|
||||
@ -123,7 +124,7 @@ public:
|
||||
// coordinates polling interval in seconds
|
||||
std::chrono::duration<double> 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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user