...
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "mcc_mount_concepts.h"
|
||||
#include "mcc_slew_guiding_model_common.h"
|
||||
|
||||
|
||||
namespace mcc
|
||||
@@ -192,7 +193,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
std::function<error_t()> _guidingFunc{};
|
||||
std::function<error_t(guiding_point_t)> _guidingFunc{};
|
||||
std::atomic_bool _doCorrection{true};
|
||||
|
||||
|
||||
@@ -447,11 +448,11 @@ protected:
|
||||
// compare t_data with computed coordinates ...
|
||||
if (_doCorrection) {
|
||||
if constexpr (mccIsEquatorialMount(pec_t::mountType)) {
|
||||
xr = t_data.mntHA - ha;
|
||||
yr = t_data.mntDEC - dec_app;
|
||||
xr = ha - t_data.mntHA;
|
||||
yr = dec_app - t_data.mntDEC;
|
||||
} else if constexpr (mccIsAltAzMount(pec_t::mountType)) {
|
||||
xr = t_data.mntAZ - az;
|
||||
yr = t_data.mntALT - alt;
|
||||
xr = az - t_data.mntAZ;
|
||||
yr = alt - t_data.mntALT;
|
||||
} else {
|
||||
static_assert(false, "UNSUPPORTED MOUNT TYPE!");
|
||||
}
|
||||
@@ -470,9 +471,13 @@ protected:
|
||||
}
|
||||
|
||||
// do correction
|
||||
ax_pos.state = hardware_t::hw_state_t::HW_STATE_TRACK;
|
||||
ax_pos.x = t_data.mntPosX;
|
||||
ax_pos.y = t_data.mntPosY;
|
||||
ax_pos.state = hardware_t::hw_state_t::HW_STATE_TRACK; // indicates to hardware level
|
||||
ax_pos.x = xr;
|
||||
ax_pos.y = yr;
|
||||
// ax_pos.x = t_data.mntPosX;
|
||||
// ax_pos.y = t_data.mntPosY;
|
||||
ax_pos.time_point = t_data.time_point;
|
||||
|
||||
|
||||
// asynchronous operation!
|
||||
auto err = hardware.setPos(std::move(ax_pos));
|
||||
|
||||
Reference in New Issue
Block a user