Matlab – Calculate angle between 2 geographic coordinates in MATLAB

anglecoordinatesMATLAB

I'm trying to calculate the angle between 2 geographic (Latitude,Longitude) points in MATLAB. The points are:
(-65.226,125.5) and (-65.236,125.433).

I used the MATLAB function, azimuth, as:

azimuth(-65.226,125.5,-65.236,125.433)

I convert the result to radians, and plotting this using quiver, I get the following plot:

difference in azimuth

I want the red vector to point from the top right dot to the bottom left dot.

The points are at fairly high latitude (~65S), and the separation of the points is low (about 0.1 degrees). Thus, I can't really understand how the curvature of the earth could affect the azimuth prediction that much..

Does anyone have any experience with azimuth in MATLAB, or have a better suggestion to calculating the angle between the coordinate pairs?

Thanks!

Best Answer

Here you can detailed information and formulae on how to find angle between two latitude-longitude points.

Related Topic