...
This commit is contained in:
parent
1a4d998141
commit
fedc324410
@ -105,6 +105,10 @@ struct Asibfm700MountConfigFileDefailts {
|
|||||||
std::string pzMinAltitude{"10.0"}; // minimal altitude in degrees
|
std::string pzMinAltitude{"10.0"}; // minimal altitude in degrees
|
||||||
std::string pzLimitSwitchHAMin{""}; // HA-axis limit switch minimal value
|
std::string pzLimitSwitchHAMin{""}; // HA-axis limit switch minimal value
|
||||||
std::string pzLimitSwitchHAMaz{""}; // HA-axis limit switch maximal value
|
std::string pzLimitSwitchHAMaz{""}; // HA-axis limit switch maximal value
|
||||||
|
|
||||||
|
// hardware
|
||||||
|
std::string hwMaxRateHA{""}; // maximal moving rate along HA-axis (Y-axis of Sidereal servo microcontroller)
|
||||||
|
std::string hwMaxRateDEC{""}; // maximal moving rate along DEC-axis (X-axis of Sidereal servo microcontroller)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace asibfm700
|
} // namespace asibfm700
|
||||||
|
|||||||
@ -269,6 +269,14 @@ static constexpr void mcc_copy_eqt_hrz_coord(mcc_eqt_hrz_coord_c auto const& fro
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// nullptr_t or pointer to celestial/equatorial and horizontal coordinates class
|
||||||
|
template <typename T>
|
||||||
|
concept mcc_coord_pointer_or_nullptr =
|
||||||
|
std::is_null_pointer_v<T> ||
|
||||||
|
(std::is_pointer_v<std::decay_t<T>> && (mcc_celestial_point_c<std::remove_pointer_t<std::decay_t<T>>> ||
|
||||||
|
mcc_eqt_hrz_coord_c<std::remove_pointer_t<std::decay_t<T>>>));
|
||||||
|
|
||||||
|
|
||||||
/* CELESTIAL COORDINATES TRANSFORMATION ENGINE */
|
/* CELESTIAL COORDINATES TRANSFORMATION ENGINE */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -193,9 +193,9 @@ public:
|
|||||||
// apparent_X = encoder_X + res.pcmX
|
// apparent_X = encoder_X + res.pcmX
|
||||||
// apparent_Y = encoder_Y + res.pcmY
|
// apparent_Y = encoder_Y + res.pcmY
|
||||||
// so, input x and y are assumed to be mount axis encoder coordinates
|
// so, input x and y are assumed to be mount axis encoder coordinates
|
||||||
template <typename T = std::nullptr_t>
|
template <typename T>
|
||||||
error_t computePCM(mcc_celestial_point_c auto pt, mcc_PCM_c auto* res, T* app_pt = nullptr)
|
error_t computePCM(mcc_celestial_point_c auto pt, mcc_PCM_result_c auto* res, T* app_pt = nullptr)
|
||||||
requires(mcc_celestial_point_c<T> || mcc_eqt_hrz_coord_c<T> || std::same_as<T, std::nullptr_t>)
|
requires(mcc_celestial_point_c<T> || mcc_eqt_hrz_coord_c<T>)
|
||||||
{
|
{
|
||||||
if (res == nullptr) {
|
if (res == nullptr) {
|
||||||
return MccDefaultPCMErrorCode::ERROR_NULLPTR;
|
return MccDefaultPCMErrorCode::ERROR_NULLPTR;
|
||||||
@ -274,7 +274,7 @@ public:
|
|||||||
static_assert(false, "UNSUPPORTED");
|
static_assert(false, "UNSUPPORTED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (!std::is_null_pointer_v<T>) {
|
if (app_pt != nullptr) {
|
||||||
if constexpr (mcc_eqt_hrz_coord_c<T>) {
|
if constexpr (mcc_eqt_hrz_coord_c<T>) {
|
||||||
if constexpr (mccIsEquatorialMount(mountType)) {
|
if constexpr (mccIsEquatorialMount(mountType)) {
|
||||||
app_pt->HA = pt.X + res->pcmX;
|
app_pt->HA = pt.X + res->pcmX;
|
||||||
|
|||||||
@ -143,11 +143,17 @@ int main()
|
|||||||
|
|
||||||
std::cout << "\n\n";
|
std::cout << "\n\n";
|
||||||
|
|
||||||
std::string sc2{" 11:34:21.21 , 104.4567892"};
|
// std::string sc2{" 11:34:21.21 , 104.4567892"};
|
||||||
|
std::string sc2{" 11:34:21.21 , 1.044567892E02"};
|
||||||
|
|
||||||
auto p2 = mcc::utils::parseAnglePair(sc2);
|
auto p2 = mcc::utils::parseAnglePair(sc2);
|
||||||
|
|
||||||
std::cout << p2.first << ", " << p2.second << "\n";
|
std::cout << "ORIG STR: '" << sc2 << "'\n";
|
||||||
|
std::cout << p2.first << "; " << p2.second << "\n";
|
||||||
|
mcc::MccAngle a1{p2.first, mcc::MccDegreeTag{}};
|
||||||
|
mcc::MccAngle a2{p2.second, mcc::MccDegreeTag{}};
|
||||||
|
|
||||||
|
std::cout << a1.sexagesimal() << "\n" << a2.sexagesimal() << "\n";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user