## (Solved) : Work Data File Citiestxt File Available Https 1drvms T S Akep1u Yqu2xjvepgze9kvbys7z8 Calc Q31931237 . . .

You will work with the data file cities.txt. The file isavailable here:https://1drv.ms/t/s!AkEp1U-yQu2xjVepGZe9KVbyS7z8

You will have to calculate the distance between two points onthe planet by assuming Earth is a perfect sphere with radius R =6360 km. You must use the Haversine formula to calculate thisdistance:

where are the latitude(north-south position) of point 1 and latitude of point 2, and are the longitude(east-west position) of point 1 and longitude of point 2. All ofthese magnitudes are in radians.

Please remember latitudes and longitudes in the data file arebased on geographical degrees, not decimal degrees. This means youwill have to convert the data from its current DMS(degree-minute-second) format. This can be easily achieved byconsidering a degree is divided into sixty minutes. That means wecan convert from a DMS coordinate to a decimal degree coordinateCdec by using the following formula:

For example, the DMS coordinate 23º26′ N converts to 23.43 Nusing this system. Finally, notice this approach gives you degrees,not radians.

Write a program in Matlab that suggests a road trip itinerary.You will use the cities.txt file. Your program should read the datafile and output the suggested road trip itinerary (list of cities)organized by latitude or longitude as required by the list offeatures below. You can assume all travel happens in straightlines. Your program should do the following:

1. Read the data in cities.txt.

2. Ask the user for a specific state in the US they want tovisit.

3. Sort the cities in that state north-south or east-westdepending on which direction the state is longer. For example,California cities would be north-south while Tennessee cities wouldbe east-west.

4. Output a road trip itinerary with all the cities in order.Add a rest stop whenever the distance between the cities is greateror equal to 100 miles.

## Expert Answer

. . .