# Time 8, Exercise 1: longitude from a chronometer, and what a degree is worth in distance import math def longitude(chronometer_hours_at_local_noon): # The chronometer keeps Greenwich time. At local noon it reads some hour of the day. # The Earth turns 15 degrees an hour, so the difference from 12:00 gives the longitude. # Reading later than 12:00 means Greenwich is already past noon, so we are WEST. hours_after = chronometer_hours_at_local_noon - 12.0 return hours_after * 15.0 # positive = west, negative = east def describe(deg): return str(round(abs(deg), 2)) + (" W" if deg > 0 else " E" if deg < 0 else " (on the Greenwich meridian)") readings = {"14:00": 14.0, "15:20": 15 + 20 / 60, "12:00": 12.0, "11:20": 11 + 20 / 60, "09:40": 9 + 40 / 60} for label, hours in readings.items(): print("chronometer reads", label, "at local noon ->", describe(longitude(hours))) # Length of one degree of longitude at a given latitude (spherical Earth, equator 40075 km) equator_km = 40075 for lat in (0, 30, 51.5, 60): km = equator_km / 360 * math.cos(math.radians(lat)) print("1 degree of longitude at latitude", lat, "=", round(km, 1), "km") # What does one minute of clock error cost? degrees = 1 / 60 * 15 # one minute of time is a quarter of a degree print("1 minute of time =", degrees, "degrees of longitude") print(" at the equator:", round(degrees * equator_km / 360, 1), "km") print(" at latitude 51.5:", round(degrees * equator_km / 360 * math.cos(math.radians(51.5)), 1), "km") # Output when run: # chronometer reads 14:00 at local noon -> 30.0 W # chronometer reads 15:20 at local noon -> 50.0 W # chronometer reads 12:00 at local noon -> 0.0 (on the Greenwich meridian) # chronometer reads 11:20 at local noon -> 10.0 E # chronometer reads 09:40 at local noon -> 35.0 E # 1 degree of longitude at latitude 0 = 111.3 km # 1 degree of longitude at latitude 30 = 96.4 km # 1 degree of longitude at latitude 51.5 = 69.3 km # 1 degree of longitude at latitude 60 = 55.7 km # 1 minute of time = 0.25 degrees of longitude # at the equator: 27.8 km # at latitude 51.5: 17.3 km # Reading the output: every hour of difference is 15 degrees, every 4 minutes is 1 degree. # A reading of 15:20 means 3 h 20 min = 3.333 h, and 3.333 x 15 = 50 degrees west. The # distance a degree covers shrinks with the cosine of the latitude, so the same clock error # costs fewer kilometres near the poles. One minute of error is 27.8 km at the equator.