|
@@ -896,6 +896,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
//平均速度
|
|
|
Double pjsd = lc/time_list.get(time_list.size()-1);
|
|
|
+ pjsd = saveTwoDecimalPlaces(pjsd, 4);
|
|
|
|
|
|
//最大速度
|
|
|
Double zdsd = Collections.max(longitudinal_velocity_list);
|
|
@@ -918,6 +919,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
zcsdfc +=Math.pow(d-pjsd,2);
|
|
|
}
|
|
|
zcsdfc = zcsdfc/longitudinal_velocity_list.size();
|
|
|
+ zcsdfc = saveTwoDecimalPlaces(zcsdfc, 4);
|
|
|
|
|
|
//自车横摆角速度均方根
|
|
|
Double zchbjsdjfg = 0D;
|
|
@@ -925,6 +927,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
zchbjsdjfg += Math.pow(d-pjsd,2);
|
|
|
}
|
|
|
zchbjsdjfg = Math.sqrt(zchbjsdjfg/yawrate_list.size());
|
|
|
+ zchbjsdjfg = saveTwoDecimalPlaces(zchbjsdjfg, 4);
|
|
|
|
|
|
for(int i=0; i<lateral_acceleration.size(); i++){
|
|
|
Double aDouble = lateral_acceleration.get(i);
|
|
@@ -1354,6 +1357,13 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new BigDecimal(d).setScale(2, RoundingMode.UP).doubleValue();
|
|
|
}
|
|
|
|
|
|
+ private Double saveTwoDecimalPlaces(Double d, int num){
|
|
|
+ if(d == null){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return new BigDecimal(d).setScale(num, RoundingMode.UP).doubleValue();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 设置场景基本字段
|
|
|
*/
|