...
This commit is contained in:
@@ -121,35 +121,7 @@ public:
|
||||
|
||||
static constexpr size_t defaultAdjustSuccessCycles = 5;
|
||||
|
||||
struct slew_point_t : MccCelestialPoint {
|
||||
// target-mount coordinate difference to start adjusting of slewing (in radians)
|
||||
coord_t adjustCoordDiff{(double)MccAngle{10.0_degs}};
|
||||
|
||||
// coordinates difference to stop slewing (in radians)
|
||||
coord_t slewToleranceRadius{(double)MccAngle{5.0_arcsecs}};
|
||||
|
||||
// slew process timeout
|
||||
std::chrono::seconds slewTimeout{3600};
|
||||
|
||||
std::chrono::duration<double> telemetryPollingInterval{0.1};
|
||||
|
||||
// if true - stop mount after the slewing
|
||||
bool stopAfterSlew{false};
|
||||
|
||||
coord_t slewXRate{0.0}; // maximal slewing rate (0 means move with maximal allowed rate)
|
||||
coord_t slewYRate{0.0}; // maximal slewing rate (0 means move with maximal allowed rate)
|
||||
|
||||
coord_t adjustXRate{
|
||||
(double)MccAngle{5.0_arcmins}}; // maximal adjusting rate (a rate at the final slewing stage)
|
||||
coord_t adjustYRate{
|
||||
(double)MccAngle{5.0_arcmins}}; // maximal adjusting rate (a rate at the final slewing stage)
|
||||
|
||||
// number of consecutive measurements within slewToleranceRadius radius to stop adjusting of slewing
|
||||
size_t withinToleranceCycleNumber{10};
|
||||
|
||||
// maximal allowed number of adjusting cycles
|
||||
size_t maxAdjustingCycleNumber{100};
|
||||
};
|
||||
using slew_point_t = MccSlewAndGuidingPoint;
|
||||
|
||||
|
||||
template <traits::mcc_mount_controls_c MOUNT_CONTROLS_T, typename... LoggerCtorArgTs>
|
||||
@@ -233,8 +205,8 @@ protected:
|
||||
|
||||
coord_t ra_icrs, dec_icrs;
|
||||
|
||||
if (slew_point.adjustSuccessCycles == 0) {
|
||||
slew_point.adjustSuccessCycles = 5;
|
||||
if (slew_point.withinToleranceCycleNumber == 0) {
|
||||
slew_point.withinToleranceCycleNumber = MccSlewAndGuidingPoint::defaultWithinToleranceCycleNumber;
|
||||
}
|
||||
|
||||
// first, compute encoder coordinates
|
||||
@@ -392,16 +364,11 @@ protected:
|
||||
|
||||
|
||||
auto start_poll_tm = std::chrono::steady_clock::now();
|
||||
// auto timeout_point = std::chrono::steady_clock::now() + slew_point.slewTimeout;
|
||||
auto wait_timeout = slew_point.slewTimeout / 5;
|
||||
if (wait_timeout < std::chrono::seconds(1)) {
|
||||
wait_timeout = std::chrono::seconds(1);
|
||||
}
|
||||
|
||||
// NOTE: TARGET COORDINATES WILL BE UPDATED FOR CURRENT TIME-POINT IN TELEMETRY-CLASS!!!
|
||||
|
||||
while (true) {
|
||||
t_err = telemetry.waitForUpdatedData(t_data, wait_timeout);
|
||||
t_err = telemetry.waitForUpdatedData(t_data, slew_point.telemetryUpdateTimeout);
|
||||
|
||||
if (t_err) {
|
||||
std::string err_str = "An error occured while waiting for updated telemetry";
|
||||
|
||||
Reference in New Issue
Block a user