Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribedimage text in transcribedimage text in transcribed

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 cs(pi) cos(p2)sin) A2-11 d 2 R arcsinsin2 where , P2 are the latitude (north-south position) of point 1 and latitude of point 2, and Xi , X2 are the longitude (east-west position) of point 1 and longitude of point 2. All of these magnitudes are in raS dian 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: 603600 For example, the DMS coordinate 2326' N converts to 23.43 N using this system. Finally, notice this approach gives you degrees, not radians 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 cs(pi) cos(p2)sin) A2-11 d 2 R arcsinsin2 where , P2 are the latitude (north-south position) of point 1 and latitude of point 2, and Xi , X2 are the longitude (east-west position) of point 1 and longitude of point 2. All of these magnitudes are in raS dian 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: 603600 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

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

1) uqusod

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago