Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/rtss-server.git into test-xzb
This commit is contained in:
commit
9ec80abc27
@ -1123,8 +1123,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
||||
/**
|
||||
* 获取一个非null的限速值。(计算限速时更方便)
|
||||
*/
|
||||
public float getNonNullSpeedLimit() {
|
||||
return robotDriveParam.getNonNullSpeedLimit();
|
||||
public float getSpeedLimitInMs() {
|
||||
return robotDriveParam.getSpeedLimitInMs();
|
||||
}
|
||||
|
||||
public void setSpeedLimit(float v) {
|
||||
|
@ -197,9 +197,9 @@ public class SrTrainServiceImpl implements UDPRealDeviceService {
|
||||
} else {
|
||||
float recommendedSpeedMax;
|
||||
if (train.isRMMode()) {
|
||||
recommendedSpeedMax = Math.min(repository.getConfig().getRmAtpSpeed(), train.getNonNullSpeedLimit()) * 0.9f;
|
||||
recommendedSpeedMax = Math.min(repository.getConfig().getRmAtpSpeed(), train.getSpeedLimitInMs()) * 0.9f;
|
||||
} else if (train.isNRMMode()) {
|
||||
recommendedSpeedMax = Math.min(repository.getConfig().getUrmAtpSpeed(), train.getNonNullSpeedLimit()) * 0.9f;
|
||||
recommendedSpeedMax = Math.min(repository.getConfig().getUrmAtpSpeed(), train.getSpeedLimitInMs()) * 0.9f;
|
||||
} else {
|
||||
recommendedSpeedMax = 0;
|
||||
}
|
||||
|
@ -458,11 +458,11 @@ public class SimulationRobotService {
|
||||
break;
|
||||
case RM:
|
||||
speedCurve = SpeedCurve.buildTargetSpeedCurve(headPosition, tailPosition, right,
|
||||
distance, speed, Math.min(repository.getConfig().getRmAtpSpeed(), train.getNonNullSpeedLimit()) * 0.9f);
|
||||
distance, speed, Math.min(repository.getConfig().getRmAtpSpeed(), train.getSpeedLimitInMs()) * 0.9f);
|
||||
break;
|
||||
case NRM:
|
||||
speedCurve = SpeedCurve.buildTargetSpeedCurve(headPosition, tailPosition, right,
|
||||
distance, speed, Math.min(repository.getConfig().getUrmAtpSpeed(), train.getNonNullSpeedLimit()) * 0.9f);
|
||||
distance, speed, Math.min(repository.getConfig().getUrmAtpSpeed(), train.getSpeedLimitInMs()) * 0.9f);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -4,6 +4,7 @@ import club.joylink.rtss.simulation.cbtc.constant.SignalAspect;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
||||
import club.joylink.rtss.simulation.cbtc.data.support.SectionPosition;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -16,10 +17,17 @@ import lombok.Setter;
|
||||
@NoArgsConstructor
|
||||
public class DriveParamVO {
|
||||
/**
|
||||
* 限速值
|
||||
* 限速值(km/h)
|
||||
*/
|
||||
private Float speedLimit;
|
||||
|
||||
/**
|
||||
* 限速值(m/s)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Setter(value = AccessLevel.NONE)
|
||||
private float speedLimitInMs = Float.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 下令停车(优先级比运行高)
|
||||
*/
|
||||
@ -47,27 +55,32 @@ public class DriveParamVO {
|
||||
* 越过信号机
|
||||
*/
|
||||
private int through;
|
||||
|
||||
public static final int NO = 0;
|
||||
public static final int RED_SIGNAL = 1;
|
||||
public static final int GUIDE_SIGNAL = 2;
|
||||
|
||||
/**
|
||||
* 要越过的信号机
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Signal throughSignal;
|
||||
|
||||
/**
|
||||
* 要越过的信号
|
||||
*/
|
||||
@JsonIgnore
|
||||
private SignalAspect throughSignalAspect;
|
||||
|
||||
/**
|
||||
* 解除EB(目的是在且仅在每次进行驾驶操作后自动缓解当时存在的EB)
|
||||
*/
|
||||
@JsonIgnore
|
||||
private boolean releaseEB = true;
|
||||
|
||||
public void setSpeedLimit(Float speedLimit) {
|
||||
this.speedLimit = speedLimit;
|
||||
this.speedLimitInMs = speedLimit == null ? Float.MAX_VALUE : speedLimit / 3.6f;
|
||||
}
|
||||
|
||||
public boolean needStop() {
|
||||
return stop;
|
||||
}
|
||||
@ -93,9 +106,4 @@ public class DriveParamVO {
|
||||
public boolean isThroughGuideSignal() {
|
||||
return GUIDE_SIGNAL == through;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public float getNonNullSpeedLimit() {
|
||||
return speedLimit == null ? Float.MAX_VALUE : speedLimit;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 指示灯
|
||||
*/
|
||||
@ -48,9 +46,6 @@ public class MapIndicatorLightVO {
|
||||
*/
|
||||
private boolean right;
|
||||
|
||||
private List<String> switchCodes;
|
||||
|
||||
|
||||
// public enum Type{
|
||||
// AtsControl,
|
||||
// CenterCommunication,
|
||||
|
Loading…
Reference in New Issue
Block a user