Exemplo n.º 1
0
    def test_sunset_by_USNO_definition(self):
        sunset_olson = ts.utc(1944, 6, 5, 20, 1)
        sunset, sunrise = get_dday_sunset_sunrise(
            sunrise_degree_def=sunset_degrees_USNO)

        julian_delta = sunset - sunset_olson
        delta_seconds = julian_delta * 24 * 60 * 60
        # within rounding error
        self.assertTrue(abs(delta_seconds) < 30)
Exemplo n.º 2
0
    def test_sunrise_by_upperlimb_definition(self):
        sunrise_olson = ts.utc(1944, 6, 6, 3, 57)  #UTC
        # Did Dr. Olson define sunrise as when the upper limb of the Sun touches the horizon
        sunset, sunrise = get_dday_sunset_sunrise(
            sunrise_degree_def=sunset_degrees_simplified)

        julian_delta = sunrise - sunrise_olson
        delta_seconds = julian_delta * 24 * 60 * 60
        # within rounding error
        self.assertTrue(abs(delta_seconds) < 30)
Exemplo n.º 3
0
 def test_moon_at_sunset(self):
     sunset, sunrise = get_dday_sunset_sunrise()
     alt = get_moon_position(sunset, normandy)
     self.assertTrue(alt.signed_dms()[0] > 0.0,
                     'Expected Moon to be above horizon at sunset')