: lat, lon = gcxsc (lat1, lon1, az, lat2, lon2, r1)
: lat, lon = gcxsc (lat1, lon1, az, lat2, lon2, r1, angleUnit)

Determines the intersection points between a great circle and a small circle.

Input:

  • lat1, lon1, az: latitude, longitude, and azimuth of the great circle. These must be scalar values or vectors of equal length.
  • lat2, lon2, r2: latitude, longitude, and range of the small circle. These must be scalar values or vectors of equal length.
  • angleUnit: string for angular units (’degrees’ or ’radians’, case-insensitive, just the first character will do). Default is ’degrees’. angleUnit applies to all inputs and outputs.

Outputs:

  • lat and lon are both Nx2 vectors of latitude(s) and longitude(s) of the intersection point(s). Circle pair(s) that have no intersection points or happen to lie on the same axis (identical or antipodal centers) NaN values are returned.
    If only one output vlues was requested
  • Optional third output istn, if present, turns off warnings for coinciding circles or no intersections. It is an Nx1 vector indicating the intersection situation of each input pair of circles, with for each circle pair the values:
    0

    The pair of circles has two distinct intersection points.

    1

    The circles have identical axis, so are either coinciding or don’t have any intersection points.

    2

    The pair of circles have just one common intersection point (tangent).

    3

    The pair of circles are disjoint, have no intersection points.

Example

[newlat, newlon] = gcxsc (60, 25, 20, 55, 25, 2.5)
newlat =
  53.806   57.286
newlon =
  21.226   23.182

See also: gc2sc, gcxgc, scxsc.

Package: mapping