uxarray.grid.arcs.point_within_gca

uxarray.grid.arcs.point_within_gca#

uxarray.grid.arcs.point_within_gca(pt_xyz, gca_a_xyz, gca_b_xyz)#

Check if a point lies on a given Great Circle Arc (GCA) interval, considering the smaller arc of the circle. Handles the anti-meridian case as well.

Parameters:
  • pt_xyz (numpy.ndarray) – Cartesian coordinates of the point.

  • gca_a_xyz (numpy.ndarray) – Cartesian coordinates of the first endpoint of the Great Circle Arc.

  • gca_b_xyz (numpy.ndarray) – Cartesian coordinates of the second endpoint of the Great Circle Arc.

Returns:

True if the point lies within the specified GCA interval, False otherwise.

Return type:

bool

Raises:

ValueError – If the input GCA spans exactly 180 degrees (π radians), as this GCA can have multiple planes. In such cases, consider breaking the GCA into two separate arcs.

Notes

  • The function ensures that the point lies on the same plane as the GCA before performing interval checks.

  • It assumes the input represents the smaller arc of the Great Circle.

  • The _angle_of_2_vectors and _xyz_to_lonlat_rad_scalar functions are used for calculations.