This commit is contained in:
2025-12-19 12:01:36 +03:00
parent bc12777f18
commit 2c7d563994
2 changed files with 312 additions and 2 deletions

View File

@@ -517,7 +517,7 @@ concept mcc_hardware_c = requires(T t, const T t_const) {
// a type that defines at least HW_MOVE_ERROR, HW_MOVE_STOPPED, HW_MOVE_SLEWING, HW_MOVE_ADJUSTING, HW_MOVE_TRACKING
// and HW_MOVE_GUIDING compile-time constants. The main purpose of this type is a
// possible tunning of hardware hardwareSetState-related commands and detect stop-state
// possible tunning of hardware hardwareSetState-related commands and detect stop end error states from hardware
//
// e.g. an implementations can be as follows:
// enum class hardware_moving_state_t: int {HW_MOVE_ERROR = -1, HW_MOVE_STOPPED = 0, HW_MOVE_SLEWING,
@@ -598,7 +598,7 @@ concept mcc_telemetry_data_c = mcc_eqt_hrz_coord_c<T> && std::default_initializa
requires mcc_eqt_hrz_coord_c<decltype(t.target)>;
// t.X and t.Y (from mcc_celestial_point_c) are encoder coordinates
// t.* from mcc_eqt_hrz_coord_c are apparent mount pointing coordinates
// t.* from mcc_eqt_hrz_coord_c are current mount coordinates
requires mcc_angle_c<decltype(t.speedX)>; // speed along X from hardware encoder
requires mcc_angle_c<decltype(t.speedY)>; // speed along Y from hardware encoder
@@ -613,6 +613,29 @@ concept mcc_telemetry_data_c = mcc_eqt_hrz_coord_c<T> && std::default_initializa
requires mcc_angle_c<decltype(t.EO)>;
};
template <typename T>
concept mcc_tlm_data_c = mcc_eqt_hrz_coord_c<T> && std::default_initializable<T> && requires(T t) {
// user entered target coordinates
requires mcc_celestial_point_c<decltype(t.entered_target)>;
// target target coordinates
requires mcc_eqt_hrz_coord_c<decltype(t.target)>;
// t.X and t.Y (from mcc_celestial_point_c) are encoder coordinates
// t.* from mcc_eqt_hrz_coord_c are current mount coordinates
requires mcc_PCM_result_c<decltype(t.pcm)>; // PCM correction
// atmospheric refraction correction for current zenithal distance
requires mcc_angle_c<decltype(t.refCorr)>; // for current .ZD
// equation of the origins (ERA-GST)
requires mcc_angle_c<decltype(t.EO)>;
// local sideral time
requires mcc_angle_c<decltype(t.LST)>;
};
static constexpr void mcc_copy_telemetry_data(mcc_telemetry_data_c auto const& from_pt,
mcc_telemetry_data_c auto* to_pt)