Question: (Java) *4.2 (Geometry: great circle distance) The great circle distance is the distance between two points on the surface of a sphere. Let (xl, yl)

(Java) (Java) *4.2 (Geometry: great circle distance) The great circle distance is the

*4.2 (Geometry: great circle distance) The great circle distance is the distance between two points on the surface of a sphere. Let (xl, yl) and (x2, y2) be the geographical latitude and longitude of two points. The great circle distance between the two points can be computed using the following formula: d = radius X arccos( sin (X1) X sin(x)) + cos(xi) x cos(x) x cos(y1 - >)) Write a program that prompts the user to enter the latitude and longitude of two points on the earth in degrees and displays its great circle distance. The average radius of the earth is 6,371.01 km. Note you need to convert the degrees into radi- ans using the Math. toRadians method since the Java trigonometric methods use radians. The latitude and longitude degrees in the formula are for north and west. Use negative to indicate south and east degrees. Here is a sample run

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 Databases Questions!