15928045575 2 лет назад
Родитель
Сommit
7276d735b7

+ 3 - 1
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/BackTrackService.java

@@ -46,6 +46,8 @@ public class BackTrackService {
 
     private static final Long equatorial_circumference = 40075020000L;
 
+    private static final Long LATITUDE_REFERENCE = 111000000L;
+
     @Autowired
     CommonService commonService;
 
@@ -204,7 +206,7 @@ public class BackTrackService {
                         double doubleValue = subtract.divide(new BigDecimal("360"), 9, BigDecimal.ROUND_HALF_UP).doubleValue();
                         offsetValue = new BigDecimal(equatorial_circumference).multiply(new BigDecimal(cosValue)).multiply(new BigDecimal(doubleValue));
                     }else if (DictItemEnum.LATITUDE_Y.getValue().equals(element.getItem())) {//如果是Y轴
-                        offsetValue = new BigDecimal(equatorial_circumference).multiply(subtract);
+                        offsetValue = new BigDecimal(LATITUDE_REFERENCE).multiply(subtract);
                     } else if (DictItemEnum.ALTITUDE_Z.getValue().equals(element.getItem())) {//如果是z轴
                         offsetValue = new BigDecimal(val1).divide(new BigDecimal(1000), 9, BigDecimal.ROUND_HALF_UP);
                     }else{//如果是其他