Lab 1: Converting Cartesian Coordinates to Latitude/Longitude/Height


Due: in class September 2

Given Cartesian (XYZ) coordinates in meters for three GPS receivers:

  1.   302737.6281 5636031.5538 2979349.8064

  2.   -1283388.8693 -4713016.9053 4090191.0471

  3.   -2389025.4954 5043316.8722 -3078530.7858

Your main code should define the station coordinates given above and call a Matlab function that computes latitude, longitude, and height (, , h). Submit your answers in degrees (for latitude and longitude) with 7 digits beyond the decimal point. Height should be given in meters to 4 digits beyond the decimal point.

Algorithm:

Turn in: your (commented) code and your answers.

Hints:

  • Make sure you calculate longitude correctly. Should you use atan or atan2?
  • Make sure your calculations go thru your loop more than once! If they don't, you have probably set up your convergence criterion wrong.
  • Does Matlab return trigonometric values in radians or degrees?