|
|
@@ -180,7 +180,7 @@ public class CommonService {
|
|
|
if (deviceReference != null) {
|
|
|
angleInRadians = deviceReference.getCurrentValue().doubleValue();
|
|
|
}
|
|
|
- double cosValue = Math.cos(angleInRadians);
|
|
|
+ double cosValue = Math.cos(Math.toRadians(angleInRadians));;
|
|
|
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));
|
|
|
}
|
|
|
@@ -215,7 +215,7 @@ public class CommonService {
|
|
|
if (deviceReference != null) {
|
|
|
angleInRadians = deviceReference.getOriginalValue().doubleValue();
|
|
|
}
|
|
|
- double cosValue = Math.cos(angleInRadians);
|
|
|
+ double cosValue = Math.cos(Math.toRadians(angleInRadians));
|
|
|
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));
|
|
|
}
|
|
|
@@ -251,7 +251,7 @@ public class CommonService {
|
|
|
if (deviceReference != null) {
|
|
|
angleInRadians = deviceReference.getCurrentValue().doubleValue();
|
|
|
}
|
|
|
- double cosValue = Math.cos(angleInRadians);
|
|
|
+ double cosValue = Math.cos(Math.toRadians(angleInRadians));
|
|
|
BigDecimal doubleValue = new BigDecimal(value).multiply(new BigDecimal(360));//offset*360
|
|
|
BigDecimal offsetValue1 = new BigDecimal(equatorial_circumference).multiply(new BigDecimal(cosValue));// L*cos(A)
|
|
|
BigDecimal xTmp = doubleValue.divide(offsetValue1, 9, BigDecimal.ROUND_HALF_UP);//除法
|
|
|
@@ -285,7 +285,7 @@ public class CommonService {
|
|
|
if (DictItemEnum.LONGITUDE_X.getValue().equals(inter.getPartNames())) {
|
|
|
List<SlopeData> y = slopeDataMapper.selectListByTwoLine(snCode, DictItemEnum.LATITUDE_Y.getValue());
|
|
|
double angleInRadians = Double.parseDouble(y.get(1).getVal());
|
|
|
- double cosValue = Math.cos(angleInRadians);
|
|
|
+ double cosValue =Math.cos(Math.toRadians(angleInRadians));
|
|
|
|
|
|
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));
|
|
|
@@ -352,7 +352,7 @@ public class CommonService {
|
|
|
List<SlopeData> y = slopeDataMapper.selectListLineByMsgId(snCode, DictItemEnum.LATITUDE_Y.getValue(), selectedData.get(i).getMsgId());
|
|
|
if (y.size() > 0) {
|
|
|
double angleInRadians = Double.parseDouble(y.get(0).getVal());
|
|
|
- double cosValue = Math.cos(angleInRadians);
|
|
|
+ double cosValue = Math.cos(Math.toRadians(angleInRadians));
|
|
|
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));
|
|
|
}
|