Question: i need a proper code to execute and run the programs issignment Portion - hand in your wo nce completed 4.2 (Geometry: gneat circle distance)
issignment Portion - hand in your wo nce completed "4.2 (Geometry: gneat circle distance) The great circle distance is the distance between two points on the surface of a sphere. Let (x1,y1) 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=radiusarccos(sin(x1)sin(x2)+cos(x1)cos(x2)cos(y1y2)) Write a program that prompts the user to enter the latitude and longitode of two points on the earth in degrees and displays its great circle distance. The average radius of the earth is 6,371.01km. Note you need to convert the degrees into radians using the Math, toRadi ans 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: Enter point 1 (1atitude and longitude) in degrees: 39.55116.25 Enter point 2 (1atitude and longitude) in degrees: 41.587.37 The distance between the two points is 10691.79183231593km
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
