コード例 #1
0
 def get_distance_ride(self):
     return help_functions.distance(
         (self.start_lat, self.start_lon),
         (self.end_lat, self.end_lon)) * self.factor_ride
コード例 #2
0
 def get_distance_to_tu(self, tu_location):
     #location of transportation unit
     return help_functions.distance(
         (tu_location[0], tu_location[1]),
         (self.start_lat, self.start_lon)) * self.factor_ride
コード例 #3
0
 def test_distance(self):
     self.assertAlmostEqual(distance((53.2194, 6.5665), (53.2144, 6.5625)),
                            0.616666274341978)