This commit is contained in:
2025-03-13 18:37:52 +03:00
parent 9e70ace4b7
commit 911f82eb4d
6 changed files with 248 additions and 28 deletions

View File

@@ -36,6 +36,18 @@ concept mcc_mount_state_c = requires(T t, const T t_const) {
};
// meteo parameters (to compute refraction)
struct MccMountMeteo {
typedef double temp_t; // Temperature in C
typedef double humid_t; // humidity in %
typedef double press_t; // atmospheric presure in hPa=mB
temp_t temperature;
humid_t humidity;
press_t pressure;
};
// mount current position and related quantities
class MccMountPosition
{
public:
@@ -166,6 +178,13 @@ public:
return _currentMountOrient.load();
}
void setMeteo(std::derived_from<MccMountMeteo> auto const& meteo)
{
_currentMeteo.store(meteo);
}
protected:
mount_config_t _mountCurrentConfig;
@@ -174,6 +193,8 @@ protected:
std::atomic<mount_orient_t> _currentMountOrient;
std::atomic<MccMountMeteo> _currentMeteo;
void updateMountState()
{
mount_orient_t orient;