def test_predicted_passes_have_elevation_positive_and_visible_on_date( self): end = self.start + timedelta(days=60) for pass_ in self.predictor.passes_over(ARG, self.start, end): self.assertGreater(pass_.max_elevation_deg, 0) position = self.predictor.get_position(pass_.max_elevation_date) ARG.is_visible(position) self.assertGreaterEqual(pass_.off_nadir_deg, -90) self.assertLessEqual(pass_.off_nadir_deg, 90)
def test_get_next_pass_while_passing(self): date = datetime.datetime.strptime("2014/10/23 01:27:33.224", '%Y/%m/%d %H:%M:%S.%f') pass_ = self.predictor.get_next_pass(ARG, date) self.assertAlmostEqual(pass_.aos, date, delta=ONE_SECOND) self.assertTrue(date < pass_.los) position = self.predictor.get_position(date) self.assertTrue(ARG.is_visible(position))
def test_no_visible_with_deg(self): position = self.predictor.get_position(self.next_pass.aos + datetime.timedelta(minutes=4)) # 21 deg self.assertFalse(ARG.is_visible(position, elevation=30))
def test_no_visible(self): position = self.predictor.get_position(self.next_pass.los + datetime.timedelta(minutes=10)) self.assertFalse(ARG.is_visible(position))
def test_is_visible(self): position = self.predictor.get_position(self.next_pass.aos) self.assertTrue(ARG.is_visible(position))
def test_is_visible_with_deg(self): position = self.predictor.get_position(self.next_pass.aos + dt.timedelta(minutes=4)) # 21 deg self.assertTrue(ARG.is_visible(position, elevation=4))