// Neil deGrasse Tyson claimed that the sun set directly west every day for // people on the the equator. Huh?! // https://twitter.com/neiltyson/status/246033957014093824 use sun.frink lat = 0 degrees North long = 0 degrees West lowest = 360 degrees lowestDate = now[] highest = 0 degrees highestDate = now[] format = ### yyyy-MM-dd HH:mm:ss ### println[""] for date=#2012-01-01 12:00 UTC# to #2013-01-01 12:00 UTC# step 1 day { sunset = sunset[date, lat, long] [az, alt] = refractedSunAzimuthAltitude[sunset, lat, long] geoAz = (az + 180 degrees) mod circle // Turn Meeus azimuth to geodetic println["
" + (sunset->[format, "UTC"]) + "" + format[geoAz,"degrees",3]] if (geoAz < lowest) { lowest = geoAz lowestDate = sunset } if (geoAz > highest) { highest = geoAz highestDate = sunset } } println["
"] println["Most southerly sunset is " + format[lowest, "degrees", 3] + " on " + (lowestDate->[format, "UTC"])] println["Most northerly sunset is " + format[highest, "degrees", 3] + " on " + (highestDate->[format, "UTC"])] println["The sun sets as much as " + format[270 degrees - lowest, "degrees", 3] + " south of due west."] println["The sun sets as much as " + format[highest - 270 degrees, "degrees", 3] + " north of due west."]