Beispiel #1
0
 def test_ship_is_at_computed_location(self):
     difference_from_estimated_location = tc.distr1(self.trip1)
     for i, diff in enumerate(difference_from_estimated_location):
         if 0 < i < len(difference_from_estimated_location) - 1:
             self.assertAlmostEqual(diff, 0, delta=0.00001)
Beispiel #2
0
 def test_misplaced_ob_out_by_1degree_times_coslat(self):
     difference_from_estimated_location = tc.distr1(self.trip2)
     self.assertAlmostEqual(
         difference_from_estimated_location[1], (2 * np.pi * 6371.0088) *
         np.cos(self.trip2.reps[1].lat() * np.pi / 180.) / 360.,
         delta=0.00001)
Beispiel #3
0
 def test_first_entry_missing(self):
     difference_from_estimated_location = tc.distr1(self.trip1)
     self.assertEqual(difference_from_estimated_location[0], None)