武汉8号线列车位置显示功能

This commit is contained in:
tiger_zhou 2022-09-07 17:17:35 +08:00
parent 67be44750a
commit 4df36e6ccf

View File

@ -0,0 +1,27 @@
package club.joylink.rtss.vo.ws;
import club.joylink.rtss.simulation.cbtc.data.map.Section;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
public class TrainPosition {
private String trainTripNum;
/**
* 方向1=上行向右0=下行(向左)
*/
private int direction;
private float location;
public Section.SectionRoadType getRoadType(){
Section.SectionRoadType type = Section.SectionRoadType.LEFT;
if(this.direction == 1){
return Section.SectionRoadType.RIGHT;
}
return type;
}
public boolean isRight(){
return this.direction == 1;
}
}