Example #1
0
 def test_cosine_vs_haversine(self):
     dist_haversine = vectors.calculate_great_circle_distance(self.coords)
     dist_cosine = vectors.calculate_great_circle_distance(
         self.coords, formula='cosine'
     )
     self.assertNotAlmostEqual(dist_cosine, dist_haversine, places=12)
Example #2
0
 def test_cosine_formula(self):
     dist_cosine = vectors.calculate_great_circle_distance(
         self.coords, formula='cosine'
     )
     self.assertAlmostEqual(dist_cosine, self.expected_dist, places=5)