武汉8号线列车位置显示功能
This commit is contained in:
parent
67be44750a
commit
4df36e6ccf
27
src/main/java/club/joylink/rtss/vo/ws/TrainPosition.java
Normal file
27
src/main/java/club/joylink/rtss/vo/ws/TrainPosition.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user