...
This commit is contained in:
parent
3659ddab01
commit
e934bd3932
@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
|
||||
#include "mcc_mount_concepts.h"
|
||||
@ -217,25 +218,32 @@ public:
|
||||
double cos_ha =
|
||||
(std::sin(_altLimit) - std::sin(dec) * std::sin(_latitude)) / std::cos(dec) / std::cos(_latitude);
|
||||
|
||||
std::cout << "HA(inter) = " << MccAngle(ha).sexagesimal(true) << "\n";
|
||||
std::cout << "DEC(inter) = " << MccAngle(dec).sexagesimal() << "\n";
|
||||
std::cout << "HA(85.0) = " << MccAngle(acos(cos_ha)).sexagesimal(true) << "\n";
|
||||
std::cout << "HA(85.0) = " << MccAngle(-acos(cos_ha)).sexagesimal(true) << "\n";
|
||||
std::cout << "PHI = " << MccAngle(_latitude).sexagesimal() << "\n";
|
||||
|
||||
if (cos_ha > 1.0) { // no intersection
|
||||
// compute culmination points?
|
||||
return false;
|
||||
}
|
||||
|
||||
double cosA = -std::sin(dec) * std::cos(_latitude) + std::cos(dec) * std::sin(_latitude) * cos_ha;
|
||||
cosA /= std::cos(_altLimit);
|
||||
double cosA =
|
||||
(-std::sin(dec) * std::cos(_latitude) + std::cos(dec) * std::sin(_latitude) * cos_ha) / cos(_altLimit);
|
||||
// cosA /= std::cos(_altLimit);
|
||||
|
||||
double sinA = std::cos(dec) * sqrt(1.0 - cos_ha * cos_ha) / cos(_altLimit);
|
||||
|
||||
if constexpr (KIND ==
|
||||
MccAltLimitKind::MIN_ALT_LIMIT) { // the closest time point is one after upper culmination
|
||||
az = -std::acos(cosA);
|
||||
// az = atan2(cosA, sinA);
|
||||
// az = atan2(sinA, cosA);
|
||||
} else if constexpr (KIND == MccAltLimitKind::MAX_ALT_LIMIT) { // the closest time point is one before upper
|
||||
// culmination
|
||||
az = std::acos(cosA);
|
||||
// az = atan2(cosA, sinA);
|
||||
// az = std::asin(sinA);
|
||||
// az = atan2(sinA, cosA);
|
||||
}
|
||||
|
||||
_coord2coord(MccCoordPairKind::COORDS_KIND_AZALT, az, _altLimit, target.time_point, int_point.coordPairKind,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user