Home > database >  Intersection of small circles?
Intersection of small circles?

Time:12-24

I'm looking for the R function (or code) equivalent to the MATLAB function scxsc

This gives the Intersection points for pairs of small circles on a sphere.

The application is "a vessel is at bearing X1 and distance d1 from point 1 and bearing X2 and distance d2 from point 2. What is it's position in Lat, lon?"

I see plenty of examples for the intersection of great circles but not with small circles

CodePudding user response:

I found the answer on https://gis.stackexchange.com/questions/48937/calculating-intersection-of-two-circles/273855#273855

NB I have a suspicion that in the two (unmodified) lines below ...

lat1 = rad2deg(atan2(point1[2] ,point1[1]))
lon1= rad2deg(asin(point1[3]))

and

lat2 = rad2deg(atan2(point2[2] ,point2[1]))
lon2 = rad2deg(asin(point2[3]))

... the lat and lon are inverted !

It worked much better for me with these changes!

  • Related