This commit is contained in:
2025-09-02 16:49:58 +03:00
parent de80acf315
commit fe6492e4fc
11 changed files with 484 additions and 161 deletions

View File

@@ -9,6 +9,7 @@
#include <chrono>
#include "mcc_angle.h"
#include "mcc_defaults.h"
#include "mcc_generics.h"
namespace mcc
@@ -26,6 +27,9 @@ struct MccSimpleMovingModelParams {
// minimal time to prohibited zone (at current speed in slewing mode). if it is lesser then exit with error
std::chrono::seconds minTimeToPZone{10};
// time interval to update prohibited zones related quantities (e.g. intersection points)
std::chrono::milliseconds updatingPZoneInterval{5000};
// ******* slewing mode *******
@@ -57,7 +61,8 @@ struct MccSimpleMovingModelParams {
// ******* guiding mode *******
double correctionRange[2]{0.3_arcsecs, 3.0_arcsecs};
double guidingCorrectionRange[2]{0.3_arcsecs, 3.0_arcsecs};
std::chrono::milliseconds guidingMinInterval{500}; // minimum time between two successive corrections
bool dualAxisGuiding{true}; // mount must be of an equatorial type: false means guiding along only HA-axis
};
@@ -112,7 +117,7 @@ typename PZoneContT::error_t mcc_find_closest_pzone(PZoneContT* pz_cont,
closest_coords->ZD = std::numeric_limits<double>::quiet_NaN();
closest_coords->ALT = std::numeric_limits<double>::quiet_NaN();
std::vector<res_t> pz_coords(c, pz_cont->sizePZones());
std::vector<res_t> pz_coords(pz_cont->sizePZones(), c);
double dha, dha_min = std::numeric_limits<double>::max();
@@ -136,5 +141,22 @@ typename PZoneContT::error_t mcc_find_closest_pzone(PZoneContT* pz_cont,
return err;
}
auto mcc_compute_target_point(mcc_ccte_c auto const& ccte,
mcc_telemetry_c auto const& tdata,
traits::mcc_time_duration_c auto const& time_dist,
mcc_celestial_point_c auto* point)
{
auto dt = std::chrono::duration<double>{tdata.HA} + time_dist * mcc_sideral_to_UT1_ratio; // hour seconds
// point in +time_dist future
MccCelestialPoint pt{.pair_kind = point->pair_kind,
.time_point = point->time_point + time_dist,
.X = dt.count() * std::numbers::pi / 3600.0 / 15.0,
.Y = tdata.DEC_APP};
point->time_point = pt.time_point;
return ccte.transformCoordinates(std::move(pt), point);
}
} // namespace mcc