% GPS problems These problems all work toward applications in **GPS navigation**. **Geographical note:** for our purposes, the Earth is a sphere with a radius of 6,378,137 meters. Numeric computation with some conditionals ---------------------------------------- Functions `north`, `south`, `east`, `west`. Each takes three arguments $dd$ $mm$ $ss.sss$ and returns an angle in radians. (No conditionals) Function `radians->degrees` (No conditionals) Structure `gps-posn` for GPS coordinates Convert GPS coordinates to human-readable string (**conditionals**) Function `gps->degrees-posn` (no conditionals) Functions `flat-world-distance`, `great-circle-distance` (probably no conditionals; need to check). Return distance in meters - Flat-world distance should be self-explanatory. - The easiest way to compute great-circle distance is to draw two vectors from the center of the earth and to compute the angle between them. The [dot product and law of cosines](http://www.math.washington.edu/~king/coursedir/m445w04/notes/vector/dotproduct.html) will be helpful here. Functions `feet->meters`, `miles->meters`, `meters->feet`, `meters->miles`. (no conditionals) Function `meters->english`, converts meters into a string of English units that uses feet for distances under 1000 feet and miles (to the nearest tenth) for distances of 1000 feet or more: 31 ft 789 ft 0.1 mi 10.7 mi Structure GPS-step. Headings are in *degrees* always: (define-struct gps-step meters heading) Function `take-step : gps-posn gps-step -> gps-posn` Function `flat-world-heading`. Analog of the law $A + (B - A) = B$ is (almost-equal? (gps-step A (make-gps-step (flat-world-distance B A) (flat-world-heading B A))) B) Unspecified data type `gps-path`. Teachpack function `follow-path` to compute destination from starting point or total distance traveled. Given intervals of latitude and longitude, find a way to convert GPS coordinates to $(x,y)$ coordinates for display in a map.