...
This commit is contained in:
68
cxx/mcc_mount_config.h
Normal file
68
cxx/mcc_mount_config.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
/* MOUNT CONTROL COMPONENTS LIBRARY */
|
||||
|
||||
#include "mcc_mount_coord.h"
|
||||
#include "mount_astrom.h"
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
|
||||
// meteo parameters (e.g. to compute refraction)
|
||||
struct MccMountMeteo {
|
||||
typedef double temp_t;
|
||||
typedef double humid_t;
|
||||
typedef double press_t;
|
||||
|
||||
temp_t temperature; // Temperature in C
|
||||
humid_t humidity; // humidity in % ([0.0, 1.0])
|
||||
press_t pressure; // atmospheric presure in hPa=mB
|
||||
};
|
||||
|
||||
|
||||
// mount site geographical location
|
||||
struct MccMountSiteInfo {
|
||||
typedef MccAngle mnt_site_coord_t;
|
||||
typedef MccAngle mnt_site_elev_t;
|
||||
|
||||
mnt_site_coord_t latitude{"00:00:00.0"_dms}; //
|
||||
mnt_site_coord_t longitude{0.0}; // positive to the East
|
||||
mnt_site_elev_t elevation{0.0}; // in meters
|
||||
|
||||
std::string_view name{"ALL-ZERO"}; // just a human-readable name
|
||||
};
|
||||
|
||||
|
||||
|
||||
// mount construction type (only the most common ones)
|
||||
enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTAZ_TYPE };
|
||||
|
||||
template <MccMountType TYPE>
|
||||
static constexpr std::string_view MccMountTypeStr = TYPE == MccMountType::GERMAN_TYPE ? "GERMAN"
|
||||
: TYPE == MccMountType::FORK_TYPE ? "FORK"
|
||||
: TYPE == MccMountType::CROSSAXIS_TYPE ? "CROSSAXIS"
|
||||
: TYPE == MccMountType::ALTAZ_TYPE ? "ALTAZ"
|
||||
: "UNKNOWN";
|
||||
|
||||
// mount configuration
|
||||
template <MccMountType MOUNT_TYPE>
|
||||
struct MccMountConfig {
|
||||
static constexpr MccMountType mountType = MOUNT_TYPE;
|
||||
|
||||
virtual ~MccMountConfig() = default;
|
||||
|
||||
astrom::MccLeapSeconds leapSeconds;
|
||||
astrom::MccIersBulletinA iersBulletinA;
|
||||
|
||||
MccMountSiteInfo siteInfo{.latitude = 0.0, .longitude = 0.0, .elevation = 0.0, .name{"ALL-ZERO"}};
|
||||
|
||||
MccMountMeteo ambientMeteo{.temperature = 0.0, .humidity = 0.5, .pressure = 1010.0};
|
||||
|
||||
// template <typename ComponentT, typename... CompCtorArgTs>
|
||||
// auto update(this auto&& self, CompCtorArgTs... comp_ctor_args)
|
||||
// {
|
||||
// return std::forward<decltype(self)>(self).updateImpl(std::forward<CompCtorArgTs>(comp_ctor_args)...);
|
||||
// }
|
||||
};
|
||||
|
||||
} // namespace mcc
|
||||
Reference in New Issue
Block a user