add saving slewing trajectory in a file
This commit is contained in:
@@ -139,6 +139,10 @@ static auto Asibfm700MountConfigDefaults = std::make_tuple(
|
||||
std::chrono::milliseconds(100),
|
||||
{"telemetry request interval (in millisecs) in slewing mode"}},
|
||||
|
||||
simple_config_record_t{"slewingPathFilename",
|
||||
std::string(),
|
||||
{"slewing trajectory filename", "if it is an empty - just skip saving"}},
|
||||
|
||||
// target-mount coordinate difference in arcsecs to start adjusting of slewing
|
||||
simple_config_record_t{"adjustCoordDiff",
|
||||
50.0,
|
||||
@@ -176,6 +180,10 @@ static auto Asibfm700MountConfigDefaults = std::make_tuple(
|
||||
{"maximal valid target-to-mount distance for tracking process (arcsecs)",
|
||||
"if current distance is greater than assume current mount coordinate as target point"}},
|
||||
|
||||
simple_config_record_t{"trackingPathFilename",
|
||||
std::string(),
|
||||
{"tracking trajectory filename", "if it is an empty - just skip saving"}},
|
||||
|
||||
|
||||
/* prohibited zones */
|
||||
|
||||
@@ -587,6 +595,9 @@ public:
|
||||
|
||||
pars.slewTimeout = getValue<decltype(pars.slewTimeout)>("slewTimeout").value_or(pars.slewTimeout);
|
||||
|
||||
pars.slewingPathFilename =
|
||||
getValue<decltype(pars.slewingPathFilename)>("slewingPathFilename").value_or(std::string());
|
||||
|
||||
get_value("trackingTelemetryInterval", pars.trackingTelemetryInterval);
|
||||
|
||||
pars.timeShiftToTargetPoint = getValue<decltype(pars.timeShiftToTargetPoint)>("timeShiftToTargetPoint")
|
||||
@@ -599,6 +610,9 @@ public:
|
||||
getValue<decltype(pars.trackingMaxCoordDiff)>("trackingMaxCoordDiff").value_or(pars.trackingMaxCoordDiff) *
|
||||
arcsecs2rad;
|
||||
|
||||
pars.trackingPathFilename =
|
||||
getValue<decltype(pars.trackingPathFilename)>("trackingPathFilename").value_or(std::string());
|
||||
|
||||
return pars;
|
||||
}
|
||||
|
||||
@@ -740,6 +754,14 @@ public:
|
||||
val = getValue<std::string>("EncoderYDevPath").value_or(std::string{});
|
||||
fname = mcc::utils::trimSpaces(val);
|
||||
setValue("EncoderYDevPath", fname);
|
||||
|
||||
val = getValue<std::string>("slewingPathFilename").value_or(std::string{});
|
||||
fname = mcc::utils::trimSpaces(val);
|
||||
setValue("slewingPathFilename", fname);
|
||||
|
||||
val = getValue<std::string>("trackingPathFilename").value_or(std::string{});
|
||||
fname = mcc::utils::trimSpaces(val);
|
||||
setValue("trackingPathFilename", fname);
|
||||
}
|
||||
} catch (std::ios_base::failure const& ex) {
|
||||
ec = ex.code();
|
||||
|
||||
@@ -205,9 +205,19 @@ AsibFM700ServoController::error_t AsibFM700ServoController::hardwareGetState(har
|
||||
} else if (mdata.Xstate == AXIS_SLEWING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_SLEWING;
|
||||
} else if (mdata.Xstate == AXIS_POINTING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_ADJUSTING;
|
||||
if (mdata.Ystate == AXIS_SLEWING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_SLEWING;
|
||||
} else {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_ADJUSTING;
|
||||
}
|
||||
} else if (mdata.Xstate == AXIS_GUIDING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_GUIDING;
|
||||
if (mdata.Ystate == AXIS_SLEWING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_SLEWING;
|
||||
} else if (mdata.Ystate == AXIS_POINTING) {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_ADJUSTING;
|
||||
} else {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_GUIDING;
|
||||
}
|
||||
} else {
|
||||
state->moving_state = hardware_moving_state_t::HW_MOVE_UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user