...
This commit is contained in:
@@ -57,6 +57,8 @@ static consteval bool mccIsAltAzMount(const MccMountType type)
|
||||
|
||||
|
||||
|
||||
/* MOUNT COMPONENTS CONCEPTS */
|
||||
|
||||
namespace mcc::traits
|
||||
{
|
||||
|
||||
@@ -125,7 +127,7 @@ concept mcc_astrom_engine_c = requires(T t, const T t_const) {
|
||||
t.greg2jul(std::declval<typename T::time_point_t>(), std::declval<typename T::juldate_t&>())
|
||||
} -> std::same_as<typename T::error_t>;
|
||||
|
||||
// apparent sideral time: apparentSiderTime(jd, gst, islocal)
|
||||
// apparent sideral time: apparentSiderTime(jd, st, islocal)
|
||||
// if islocal == false then the method must return the Greenwich apparent sideral time, otherwise - local one
|
||||
{
|
||||
t.apparentSiderTime(std::declval<typename T::juldate_t>(), std::declval<typename T::sideral_time_t&>(),
|
||||
@@ -182,7 +184,7 @@ concept mcc_mount_pec_c = requires(T t, const T t_const) {
|
||||
typename T::coord_t;
|
||||
typename T::pec_data_t;
|
||||
|
||||
// at least contains .dx and .dy fields
|
||||
// a class which contains at least .dx and .dy public fields
|
||||
requires requires(typename T::pec_result_t res) {
|
||||
requires std::same_as<decltype(res.dx), typename T::coord_t>;
|
||||
requires std::same_as<decltype(res.dy), typename T::coord_t>;
|
||||
@@ -203,26 +205,36 @@ concept mcc_mount_pec_c = requires(T t, const T t_const) {
|
||||
template <typename T>
|
||||
concept mcc_mount_telemetry_c = requires(T t, const T t_const) {
|
||||
typename T::error_t;
|
||||
typename T::mount_telemetry_data_t;
|
||||
|
||||
// a class which contains celestial (equatorial and horizontal) coordinates
|
||||
requires requires(typename T::mount_telemetry_data_t telemetry) {
|
||||
typename T::mount_telemetry_data_t::coord_t;
|
||||
requires std::same_as<decltype(telemetry.mntRA), typename T::mount_telemetry_data_t::coord_t>; // apparent RA
|
||||
requires std::same_as<decltype(telemetry.mntDEC), typename T::mount_telemetry_data_t::coord_t>; // apparent DEC
|
||||
requires std::same_as<decltype(telemetry.mntHA), typename T::mount_telemetry_data_t::coord_t>; // hour angle
|
||||
requires std::same_as<decltype(telemetry.mntAZ), typename T::mount_telemetry_data_t::coord_t>; // azimuth
|
||||
requires std::same_as<decltype(telemetry.mntALT), typename T::mount_telemetry_data_t::coord_t>; // altitude
|
||||
};
|
||||
|
||||
{ t_const.errorString(std::declval<typename T::error_t>()) } -> mcc_formattable;
|
||||
|
||||
{ t.update() } -> std::same_as<typename T::error_t>;
|
||||
|
||||
{ t_const.data() } -> std::same_as<typename T::mount_telemetry_data_t>;
|
||||
{ t.data() } -> std::same_as<typename T::mount_telemetry_data_t>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* MOUNT PROHIBITED ZONE */
|
||||
|
||||
template <typename T>
|
||||
concept mcc_prohibited_zone_c = std::movable<T> && requires(T t, const T t_const) {
|
||||
typename T::coord_t;
|
||||
typename T::time_point_t;
|
||||
|
||||
// the type 'T' must define static constexpr member of type MccCoordPairKind
|
||||
// the type 'T' must define a static constexpr member of type MccCoordPairKind
|
||||
// to declarate type of coordinate pair used to describe the zone.
|
||||
// This coordinate pair must be used as input in the class methods.
|
||||
// This coordinate pair must be used as input in the 'inZone' class method.
|
||||
requires requires {
|
||||
requires std::same_as<decltype(T::zoneCoordPairKind), const MccCoordPairKind>;
|
||||
[]() {
|
||||
@@ -234,14 +246,13 @@ concept mcc_prohibited_zone_c = std::movable<T> && requires(T t, const T t_const
|
||||
{ t_const.name() } -> mcc_formattable;
|
||||
|
||||
|
||||
// check if given coordinates are in the zone at given time point
|
||||
{
|
||||
t.inZone(std::declval<typename T::coord_t>(), std::declval<typename T::coord_t>(),
|
||||
std::declval<typename T::time_point_t>())
|
||||
} -> std::convertible_to<bool>;
|
||||
// check if given coordinates are in the zone
|
||||
{ t.inZone(std::declval<typename T::coord_t>(), std::declval<typename T::coord_t>()) } -> std::convertible_to<bool>;
|
||||
|
||||
|
||||
// for given coordinates and time the method computes a time to reach the zone
|
||||
// implementation of the method must assume that input coordinates are apparent RA and DEC at given time point,
|
||||
// while the time point is one from which computation must be performed (e.g. current time moment)
|
||||
{
|
||||
t.timeTo(std::declval<typename T::coord_t>(), std::declval<typename T::coord_t>(),
|
||||
std::declval<typename T::time_point_t>())
|
||||
|
||||
Reference in New Issue
Block a user