瀏覽代碼

ignore unused return values

Sven Czarnian 3 年之前
父節點
當前提交
c767572dee
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      aman/types/Waypoint.py

+ 3 - 3
aman/types/Waypoint.py

@@ -64,10 +64,10 @@ class Waypoint:
 
     def haversine(self, other):
         geodesic = pyproj.Geod(ellps='WGS84')
-        forward, backward, distance = geodesic.inv(self.Coordinate[1], self.Coordinate[0], other.Coordinate[1], other.Coordinate[0])
-        return distance / 1000.0
+        _, _, distance = geodesic.inv(self.Coordinate[1], self.Coordinate[0], other.Coordinate[1], other.Coordinate[0])
+        return distance / 1000.0 * 0.539957
 
     def bearing(self, other):
         geodesic = pyproj.Geod(ellps='WGS84')
-        forward, backward, distance = geodesic.inv(self.Coordinate[1], self.Coordinate[0], other.Coordinate[1], other.Coordinate[0])
+        forward, _, _ = geodesic.inv(self.Coordinate[1], self.Coordinate[0], other.Coordinate[1], other.Coordinate[0])
         return forward