Question: In this project, you will work with the data file cities.txt. The file is available in the files section of this course. For this

In this project, you will work with the data file cities.txt. The file is available in the files section of this course.For 

In this project, you will work with the data file cities.txt. The file is available in the files section of this course. For this project, you will have to calculate the distance between two points on the planet by assuming Earth is a perfect sphere or radius R = 6360 km. You can use the Haversine formula to calculate this distance: d = 2 R arcsin ( sin 42-41 2 | + cos(4) cos(42) sin (-)) 2 where 41, 42 are the latitude (north-south position) of point 1 and latitude of point 2, and A, A are the longitude (east-west position) of point 1 and longitude of point 2. All of these magnitudes are in radians. Please remember latitudes and longitudes in the data file are based on geographical degrees, not decimal degrees. This means you will have to convert the data from its current DMS (degree-minute-second) format. This can be easily achieved by considering a degree is divided into sixty minutes. That means we can convert from a DMS coordinate to a decimal degree coordinate Cdec by using the following formula: Cdec = D + S 3600 For example, the DMS coordinate 2326' N converts to 23.43 N using this system. Finally, notice this approach gives you degrees, not radians.

Step by Step Solution

3.37 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To calculate the distance between two points on the Earths surface using the Haversine formula we ne... View full answer

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