tracepointstation.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef TRACEPOINTSTATION_H
  2. #define TRACEPOINTSTATION_H
  3. namespace iv {
  4. struct Station
  5. {
  6. int index;
  7. GPS_INS station_location;
  8. int map_index;
  9. };
  10. class TracePoint
  11. {
  12. public:
  13. double x = 0, y = 0, speed=0;
  14. int v1 = 0, v2 = 0;
  15. int roadMode = 0;
  16. TracePoint()
  17. {
  18. x = y = v1 = 0;
  19. }
  20. TracePoint(double _x, double _y)
  21. {
  22. x = _x; y = _y;
  23. }
  24. };
  25. class TrafficLight
  26. {
  27. public:
  28. int leftColor = 0, rightColor = 0, straightColor=0, uturnColor=0;
  29. int leftTime=0, rightTime=0 ,straightTime=0, uturnTime=0;
  30. TrafficLight()
  31. {
  32. leftColor = 0, rightColor = 0, straightColor=0, uturnColor=0;
  33. leftTime=0, rightTime=0 ,straightTime=0, uturnTime=0;
  34. }
  35. };
  36. class StationCmd
  37. {
  38. public:
  39. bool received;
  40. uint32_t carID,carMode,emergencyStop,stationStop;
  41. bool has_carID,has_carMode,has_emergencyStop,has_stationStop,mode_manual_drive;
  42. uint32_t stationID[20];
  43. GPS_INS stationGps[20];
  44. uint32_t stationTotalNum;
  45. StationCmd()
  46. {
  47. received=false;
  48. has_carID=false;
  49. has_carMode=false;
  50. has_emergencyStop=false;
  51. has_stationStop=false;
  52. mode_manual_drive=false;
  53. carID=0;
  54. carMode=0;
  55. emergencyStop=0;
  56. stationStop=0;
  57. stationTotalNum=0;
  58. }
  59. };
  60. }
  61. #endif // TRACEPOINTSTATION_H