#pragma once /* AstroSIB-FM700 FORK MOUNT CONTROL LIBRARY */ /* SLEW MODEL IMPLEMENTATION */ #include "asibfm700_common.h" namespace asibfm700 { enum class AsibFM700SlewModelErrorCode : int { ERROR_OK }; // error category struct AsibFM700SlewModelErrorCategory : public std::error_category { const char* name() const noexcept; std::string message(int ec) const; static const AsibFM700SlewModelErrorCategory& get(); }; inline std::error_code make_error_code(AsibFM700SlewModelErrorCode ec) { return std::error_code(static_cast(ec), AsibFM700SlewModelErrorCategory::get()); } } // namespace asibfm700 namespace std { template <> class is_error_code_enum : public true_type { }; } // namespace std namespace asibfm700 { class AsibFM700SlewModel final { public: typedef std::error_code error_t; struct slew_params_t { typedef mcc::MccAngle coord_t; mcc::MccCoordPairKind coordPairKind{mcc::MccCoordPairKind::COORDS_KIND_HADEC_APP}; coord_t x{0.0}; coord_t y{0.0}; bool stop{false}; }; AsibFM700SlewModel(AsibFM700Hardware& hw_control, AsibFM700AstromEngine& astrom_engine); ~AsibFM700SlewModel(); error_t slew(const slew_params_t&, AsibFM700Telemetry&); private: AsibFM700Hardware& _hwControl; AsibFM700AstromEngine& _astromEngine; }; } // namespace asibfm700