...
This commit is contained in:
65
cxx/mcc_mount_astrom.h
Normal file
65
cxx/mcc_mount_astrom.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
/* MOUNT CONTROL COMPONENTS LIBRARY */
|
||||
|
||||
|
||||
/* ASTROMETRY ENGINE CONCEPT */
|
||||
|
||||
|
||||
#include <concepts>
|
||||
|
||||
#include "mcc_traits.h"
|
||||
|
||||
namespace mcc::traits
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
concept mcc_astrom_engine_c = requires(T t) {
|
||||
typename T::engine_err_t;
|
||||
typename T::engine_state_t;
|
||||
|
||||
typename T::meteo_t;
|
||||
|
||||
{ t.updateState() };
|
||||
|
||||
/* coordinates conversional methods */
|
||||
|
||||
// ICRS RA and DEC to observed place: icrs2obs(ra, dec, time_point, ra_app, dec_app, ha, az, alt, eo)
|
||||
{ t.icrs2obs() } -> std::same_as<typename T::engine_err_t>;
|
||||
|
||||
// compute hour angle and declination from azimuth and altitude: hadec2azalt(ha, dec, az, alt)
|
||||
{
|
||||
t.hadec2azalt(std::declval<double>(), std::declval<double>(), std::declval<double&>(), std::declval<double&>())
|
||||
} -> std::same_as<typename T::engine_err_t>;
|
||||
|
||||
// compute azimuth and altitude from hour angle and declination: azalt2hadec(az, alt, ha, dec)
|
||||
{
|
||||
t.azalt2hadec(std::declval<double>(), std::declval<double>(), std::declval<double&>(), std::declval<double&>())
|
||||
} -> std::same_as<typename T::engine_err_t>;
|
||||
|
||||
// compute paralactic angle: hadec2pa(ha, dec, pa)
|
||||
{
|
||||
t.hadec2pa(std::declval<double>(), std::declval<double>(), std::declval<double&>())
|
||||
} -> std::same_as<typename T::engine_err_t>;
|
||||
|
||||
|
||||
/* time-related methods */
|
||||
|
||||
// Gregorian Calendar time point to Julian Date: greg2jul(time_point, mjd)
|
||||
// { t.greg2jul() } -> std::same_as<typename T::engine_err_t>;
|
||||
requires mcc_systime_c<mcc_func_arg1_t<decltype(&T::greg2jul)>>;
|
||||
requires std::constructible_from<mcc_func_argN_t<decltype(&T::greg2jul), 2>, double>;
|
||||
|
||||
// apparent sideral time at given longitude (positive to the East): apparentSiderTime(utc, gst)
|
||||
{ t.apparentSiderTime(std::declval<const double&>()) } -> std::same_as<typename T::engine_err_t>;
|
||||
|
||||
|
||||
/* atmospheric refraction-related methods */
|
||||
|
||||
typename T::refract_result_t;
|
||||
{
|
||||
t.refraction(std::declval<const typename T::meteo_t&>(), std::declval<typename T::refract_result_t&>())
|
||||
} -> std::same_as<typename T::engine_err_t>;
|
||||
};
|
||||
|
||||
} // namespace mcc::traits
|
||||
Reference in New Issue
Block a user