Question: 31. The shortest distance between two points on the surface of the globe (greatcircle distance) can be calculated by using the haversine formula. If and

31. The shortest distance between two points on the surface of the globe (greatcircle distance) can be calculated by using the haversine formula. If and are the latitude and longitude of point 1 and and are the latitude and longitude of point 2, the great circle distance between the points is given by:

where , and mi is the Earth radius. Write a user-defined function that determines the distance between two points on the Earth. For the function name and arguments, use dis = GreatCirDis(Lat1,Lng1,Lat2,Lng2), where the input arguments are the latitude and longitude of the two points (degrees in decimal format), and dis is the great-circle distance in miles. Use the function to calculate the distance between London (51.50853°, –0.12574°) and New York City (40.71427°, –74.00597°).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Systems Analysis And Design Using MATLAB Questions!

Q:

a