...
This commit is contained in:
@@ -16,22 +16,6 @@ namespace mcc
|
||||
{
|
||||
|
||||
|
||||
// namespace traits
|
||||
// {
|
||||
|
||||
// template <typename T, typename XT, typename YT>
|
||||
// concept mcc_mount_pec_c = requires(T t, const T t_const, XT x, YT y) {
|
||||
// typename T::pec_data_t;
|
||||
// typename T::pec_result_t;
|
||||
|
||||
// { t.setData(std::declval<typename T::pec_data_t>()) };
|
||||
// { t_const.getData() } -> std::same_as<typename T::pec_data_t>;
|
||||
|
||||
// { t.compute(std::declval<const XT&>(), std::declval<const YT&>()) } -> std::same_as<typename T::pec_result_t>;
|
||||
// };
|
||||
|
||||
// } // namespace traits
|
||||
|
||||
// type of PEC corrections (algorithm used):
|
||||
// PEC_TYPE_GEOMETRY - "classic" geometry-based correction coefficients
|
||||
// PEC_TYPE_GEOMETRY_BSPLINE - previous one and additional 2D B-spline corrections
|
||||
@@ -39,7 +23,7 @@ namespace mcc
|
||||
enum class MccMountDefaultPECType { PEC_TYPE_GEOMETRY, PEC_TYPE_GEOMETRY_BSPLINE, PEC_TYPE_BSPLINE };
|
||||
|
||||
template <MccMountType MOUNT_TYPE>
|
||||
class MccMountDefaultPEC
|
||||
class MccMountDefaultPEC final
|
||||
{
|
||||
public:
|
||||
static constexpr MccMountType mountType = MOUNT_TYPE;
|
||||
@@ -47,7 +31,7 @@ public:
|
||||
typedef MccAngle coord_t;
|
||||
|
||||
struct pec_result_t {
|
||||
MccAngle dx, dy;
|
||||
coord_t dx, dy;
|
||||
};
|
||||
|
||||
// "classic" geometric PEC coefficients
|
||||
@@ -161,8 +145,11 @@ public:
|
||||
|
||||
res.dy = _geomCoeffs.zeroPointY + _geomCoeffs.misalignErr1 * sinX + _geomCoeffs.misalignErr2 * cosX +
|
||||
_geomCoeffs.tubeFlexure * (cosPhi * cosX * std::sin(y) - sinPhi * cosY);
|
||||
if (!utils::isEqual(cosX, 0.0)) {
|
||||
res.dy += _geomCoeffs.forkFlexure / cosX;
|
||||
|
||||
if constexpr (mountType == MccMountType::FORK_TYPE) {
|
||||
if (!utils::isEqual(cosX, 0.0)) {
|
||||
res.dy += _geomCoeffs.forkFlexure / cosX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,4 +199,8 @@ private:
|
||||
mutable std::mutex _pecDataMutex;
|
||||
};
|
||||
|
||||
|
||||
typedef MccMountDefaultPEC<MccMountType::ALTAZ_TYPE> MccMountDefaultAltAzPec;
|
||||
typedef MccMountDefaultPEC<MccMountType::FORK_TYPE> MccMountDefaultForkPec;
|
||||
|
||||
} // namespace mcc
|
||||
|
||||
Reference in New Issue
Block a user