...
This commit is contained in:
parent
e934bd3932
commit
61e41b1a1d
@ -60,7 +60,10 @@ struct MccNullLogger {
|
||||
typedef int loglevel_t;
|
||||
|
||||
void setLogLevel(loglevel_t){};
|
||||
loglevel_t getLogLevel() const { return 0; };
|
||||
loglevel_t getLogLevel() const
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
|
||||
void logMessage(loglevel_t, const std::string&) {};
|
||||
void logError(const std::string&) {};
|
||||
@ -632,7 +635,7 @@ struct MccPZoneAbstractContainer {
|
||||
}
|
||||
|
||||
|
||||
// must return true if the given telemetry coordinates are in any of zones in the containe and
|
||||
// must return true if the given telemetry coordinates are in any of zones in the container and
|
||||
// false otherwise
|
||||
template <typename RT>
|
||||
bool pzInZone(this auto&& self, const TelemetryDataT& tdata, RT& result)
|
||||
|
||||
@ -214,6 +214,7 @@ public:
|
||||
_coord2coord(target.coordPairKind, target.x, target.y, target.time_point,
|
||||
MccCoordPairKind::COORDS_KIND_HADEC_APP, ha, dec);
|
||||
|
||||
// _altLimit = 0.001_degs;
|
||||
// compute HA for intersection point
|
||||
double cos_ha =
|
||||
(std::sin(_altLimit) - std::sin(dec) * std::sin(_latitude)) / std::cos(dec) / std::cos(_latitude);
|
||||
@ -223,25 +224,36 @@ public:
|
||||
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";
|
||||
std::cout << "COS_HA = " << cos_ha << "\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) / cos(_altLimit);
|
||||
// cosA /= std::cos(_altLimit);
|
||||
|
||||
std::cout << "COS_A = " << cosA << "\n";
|
||||
|
||||
double sinA = std::cos(dec) * sqrt(1.0 - cos_ha * cos_ha) / cos(_altLimit);
|
||||
|
||||
double tgA = sqrt(1.0 - cos_ha * cos_ha) / (cos(_latitude) * tan(dec) - sin(_latitude) * cos_ha);
|
||||
|
||||
auto z = (-std::sin(dec) * std::cos(_latitude) + std::cos(dec) * std::sin(_latitude) * cos_ha) / cosA;
|
||||
// (-std::sin(dec) * std::cos(_latitude) + std::cos(dec) * std::sin(_latitude) * cos_ha) / cos(133.75_degs);
|
||||
std::cout << "Z = " << MccAngle(asin(z)).sexagesimal() << "\n";
|
||||
|
||||
if constexpr (KIND ==
|
||||
MccAltLimitKind::MIN_ALT_LIMIT) { // the closest time point is one after upper culmination
|
||||
az = -std::acos(cosA);
|
||||
az = std::acos(cosA);
|
||||
// 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 = -std::acos(cosA) + std::numbers::pi; // to system of azimuth started from the North!!!
|
||||
// az = atan(tgA);
|
||||
// az = std::asin(sinA);
|
||||
// az = atan2(sinA, cosA);
|
||||
}
|
||||
@ -249,7 +261,6 @@ public:
|
||||
_coord2coord(MccCoordPairKind::COORDS_KIND_AZALT, az, _altLimit, target.time_point, int_point.coordPairKind,
|
||||
int_point.x, int_point.y);
|
||||
|
||||
int_point.x = az;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user