xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/map/FastDistanceCalculator.java
@@ -11,9 +11,15 @@ */ public static double distanceFast(double lat1, double lon1, double lat2, double lon2) { double x = (lon2 - lon1) * DEG_TO_RAD * Math.cos((lat1 + lat2) * 0.5 * DEG_TO_RAD); double y = (lat2 - lat1) * DEG_TO_RAD; return R * Math.sqrt(x * x + y * y)*1000; try { double x = (lon2 - lon1) * DEG_TO_RAD * Math.cos((lat1 + lat2) * 0.5 * DEG_TO_RAD); double y = (lat2 - lat1) * DEG_TO_RAD; return R * Math.sqrt(x * x + y * y)*1000; }catch (Exception e){ e.printStackTrace(); } return 0; } /**