This commit is contained in:
2025-11-14 12:23:39 +03:00
parent 94fb4c6a48
commit 078e3f38f2
6 changed files with 31 additions and 5 deletions

View File

@@ -111,6 +111,8 @@ inline std::error_code make_error_code(MccSimpleSlewingModelErrorCode ec)
class MccSimpleSlewingModel
{
static constexpr auto DEG90INRADS = std::numbers::pi / 2.0;
public:
typedef std::error_code error_t;
@@ -238,6 +240,12 @@ public:
if constexpr (mccIsEquatorialMount(CONTROLS_T::mountType)) {
cpt.X = tdata.HA + tdata.speedX * min_time_to_pzone_in_secs;
cpt.Y = tdata.DEC_APP + tdata.speedY * min_time_to_pzone_in_secs;
if (cpt.Y > DEG90INRADS) {
cpt.Y = DEG90INRADS;
}
if (cpt.Y < -DEG90INRADS) {
cpt.Y = -DEG90INRADS;
}
} else if constexpr (mccIsAltAzMount(CONTROLS_T::mountType)) {
cpt.X = tdata.AZ + tdata.speedX * min_time_to_pzone_in_secs;
cpt.Y = tdata.ZD + tdata.speedY * min_time_to_pzone_in_secs;