This commit is contained in:
2025-04-29 18:31:41 +03:00
parent 18628aff28
commit e1421a1c2e
2 changed files with 13 additions and 5 deletions

View File

@@ -235,6 +235,14 @@ public:
bool inZone(const MccAngle& x, const MccAngle& y, const MccProhibitedZone::pzcontext_t& context)
{
if (context.coords_kind == MccProhibitedZone::COORDS_KIND_AZALT) { // trivial case
auto xx = x;
xx.normalize<MccAngle::NORM_KIND_180_180>(); // to [-180, 180]
if (std::fabs(xx) <= _deltaAZ) { // check at the South
return true;
} else if (std::fabs(xx - std::numbers::pi) <= _deltaAZ) { // check at the North
return true;
}
}
return false;