RtkStatus.java 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.ruoyi.mqtt.enums;
  2. /**
  3. * GNSS/RTK定位状态枚举
  4. */
  5. public enum RtkStatus {
  6. LASER_ONLY(-1, "纯激光定位"),
  7. INIT(0, "初始化"),
  8. SINGLE(1, "单点定位"),
  9. DGPS(2, "码差分"),
  10. INVALID_PPS(3, "无效PPS"),
  11. RTK_FIXED(4, "固定解"),
  12. RTK_FLOAT(5, "浮点解"),
  13. ESTIMATING(6, "正在估算"),
  14. MANUAL_INPUT(7, "人工输入固定值"),
  15. SIMULATION(8, "模拟模式"),
  16. WAAS(9, "WAAS差分");
  17. private final int code;
  18. private final String description;
  19. RtkStatus(int code, String description) {
  20. this.code = code;
  21. this.description = description;
  22. }
  23. public int getCode() {
  24. return code;
  25. }
  26. public String getDescription() {
  27. return description;
  28. }
  29. public static RtkStatus fromCode(int code) {
  30. for (RtkStatus status : values()) {
  31. if (status.code == code) {
  32. return status;
  33. }
  34. }
  35. return null;
  36. }
  37. }