| | |
| | | private String landName; |
| | | // 边界原始坐标 |
| | | private String boundaryOriginalCoordinates; |
| | | // 边界原始XY坐标(相对于基准站的XY坐标) |
| | | private String boundaryOriginalXY; |
| | | // 边界坐标(存储多边形坐标点集合) |
| | | private String boundaryCoordinates; |
| | | // 规划路径(存储路径坐标点集合) |
| | | private String plannedPath; |
| | | // 返回点坐标 |
| | | private String returnPointCoordinates; |
| | | // 往返路径坐标(割草机完成割草作业返回的路径坐标,格式:X1,Y1;X2,Y2;...;XN,YN) |
| | | private String returnPathCoordinates; |
| | | // 往返路径原始坐标 |
| | | private String returnPathRawCoordinates; |
| | | // 边界点间隔 |
| | | private String boundaryPointInterval; |
| | | // 角度阈值 |
| | |
| | | private String mowingPattern; |
| | | // 割草宽度 |
| | | private String mowingWidth; |
| | | // 割草机割刀宽度(米),默认0.40米 |
| | | private String mowingBladeWidth; |
| | | // 割草重叠距离(米),默认0.06米 |
| | | private String mowingOverlapDistance; |
| | | // 割草安全距离(米) |
| | | private String mowingSafetyDistance; |
| | | |
| | | // 存储多个地块的映射表,键为地块编号 |
| | | private static Map<String, Dikuai> dikuaiMap = new HashMap<>(); |
| | |
| | | dikuai.userId = landProps.getProperty("userId", "-1"); |
| | | dikuai.landName = landProps.getProperty("landName", "-1"); |
| | | dikuai.boundaryOriginalCoordinates = landProps.getProperty("boundaryOriginalCoordinates", "-1"); |
| | | dikuai.boundaryOriginalXY = landProps.getProperty("boundaryOriginalXY", "-1"); |
| | | dikuai.boundaryCoordinates = landProps.getProperty("boundaryCoordinates", "-1"); |
| | | dikuai.plannedPath = landProps.getProperty("plannedPath", "-1"); |
| | | dikuai.returnPointCoordinates = landProps.getProperty("returnPointCoordinates", "-1"); |
| | | dikuai.returnPathCoordinates = landProps.getProperty("returnPathCoordinates", "-1"); |
| | | dikuai.returnPathRawCoordinates = landProps.getProperty("returnPathRawCoordinates", "-1"); |
| | | dikuai.boundaryPointInterval = landProps.getProperty("boundaryPointInterval", "-1"); |
| | | dikuai.angleThreshold = landProps.getProperty("angleThreshold", "-1"); |
| | | dikuai.intelligentSceneAnalysis = landProps.getProperty("intelligentSceneAnalysis", "-1"); |
| | |
| | | dikuai.mowingPattern = landProps.getProperty("mowingPattern", "-1"); |
| | | dikuai.mowingWidth = landProps.getProperty("mowingWidth", "-1"); |
| | | dikuai.mowingTrack = landProps.getProperty("mowingTrack", "-1"); |
| | | dikuai.mowingBladeWidth = landProps.getProperty("mowingBladeWidth", "0.40"); |
| | | dikuai.mowingOverlapDistance = landProps.getProperty("mowingOverlapDistance", "0.06"); |
| | | dikuai.mowingSafetyDistance = landProps.getProperty("mowingSafetyDistance", "-1"); |
| | | |
| | | dikuaiMap.put(landNum, dikuai); |
| | | } |
| | |
| | | case "boundaryOriginalCoordinates": |
| | | this.boundaryOriginalCoordinates = value; |
| | | return true; |
| | | case "boundaryOriginalXY": |
| | | this.boundaryOriginalXY = value; |
| | | return true; |
| | | case "boundaryCoordinates": |
| | | this.boundaryCoordinates = value; |
| | | return true; |
| | |
| | | case "returnPointCoordinates": |
| | | this.returnPointCoordinates = value; |
| | | return true; |
| | | case "returnPathCoordinates": |
| | | this.returnPathCoordinates = value; |
| | | return true; |
| | | case "returnPathRawCoordinates": |
| | | this.returnPathRawCoordinates = value; |
| | | return true; |
| | | case "boundaryPointInterval": |
| | | this.boundaryPointInterval = value; |
| | | return true; |
| | |
| | | case "mowingTrack": |
| | | this.mowingTrack = value; |
| | | return true; |
| | | case "mowingBladeWidth": |
| | | this.mowingBladeWidth = value; |
| | | return true; |
| | | case "mowingOverlapDistance": |
| | | this.mowingOverlapDistance = value; |
| | | return true; |
| | | case "mowingSafetyDistance": |
| | | this.mowingSafetyDistance = value; |
| | | return true; |
| | | default: |
| | | System.err.println("未知字段: " + fieldName); |
| | | return false; |
| | |
| | | if (dikuai.landNumber != null) properties.setProperty(landNumber + ".landNumber", dikuai.landNumber); |
| | | if (dikuai.landName != null) properties.setProperty(landNumber + ".landName", dikuai.landName); |
| | | if (dikuai.boundaryOriginalCoordinates != null) properties.setProperty(landNumber + ".boundaryOriginalCoordinates", dikuai.boundaryOriginalCoordinates); |
| | | if (dikuai.boundaryOriginalXY != null) properties.setProperty(landNumber + ".boundaryOriginalXY", dikuai.boundaryOriginalXY); |
| | | if (dikuai.boundaryCoordinates != null) properties.setProperty(landNumber + ".boundaryCoordinates", dikuai.boundaryCoordinates); |
| | | if (dikuai.plannedPath != null) properties.setProperty(landNumber + ".plannedPath", dikuai.plannedPath); |
| | | if (dikuai.returnPointCoordinates != null) properties.setProperty(landNumber + ".returnPointCoordinates", dikuai.returnPointCoordinates); |
| | | if (dikuai.returnPathCoordinates != null) properties.setProperty(landNumber + ".returnPathCoordinates", dikuai.returnPathCoordinates); |
| | | if (dikuai.returnPathRawCoordinates != null) properties.setProperty(landNumber + ".returnPathRawCoordinates", dikuai.returnPathRawCoordinates); |
| | | if (dikuai.boundaryPointInterval != null) properties.setProperty(landNumber + ".boundaryPointInterval", dikuai.boundaryPointInterval); |
| | | if (dikuai.angleThreshold != null) properties.setProperty(landNumber + ".angleThreshold", dikuai.angleThreshold); |
| | | if (dikuai.intelligentSceneAnalysis != null) properties.setProperty(landNumber + ".intelligentSceneAnalysis", dikuai.intelligentSceneAnalysis); |
| | |
| | | if (dikuai.mowingPattern != null) properties.setProperty(landNumber + ".mowingPattern", dikuai.mowingPattern); |
| | | if (dikuai.mowingWidth != null) properties.setProperty(landNumber + ".mowingWidth", dikuai.mowingWidth); |
| | | if (dikuai.mowingTrack != null) properties.setProperty(landNumber + ".mowingTrack", dikuai.mowingTrack); |
| | | if (dikuai.mowingBladeWidth != null) properties.setProperty(landNumber + ".mowingBladeWidth", dikuai.mowingBladeWidth); |
| | | if (dikuai.mowingOverlapDistance != null) properties.setProperty(landNumber + ".mowingOverlapDistance", dikuai.mowingOverlapDistance); |
| | | if (dikuai.mowingSafetyDistance != null) properties.setProperty(landNumber + ".mowingSafetyDistance", dikuai.mowingSafetyDistance); |
| | | } |
| | | |
| | | try { |
| | |
| | | this.boundaryOriginalCoordinates = boundaryOriginalCoordinates; |
| | | } |
| | | |
| | | public String getBoundaryOriginalXY() { |
| | | return boundaryOriginalXY; |
| | | } |
| | | |
| | | public void setBoundaryOriginalXY(String boundaryOriginalXY) { |
| | | this.boundaryOriginalXY = boundaryOriginalXY; |
| | | } |
| | | |
| | | public String getBoundaryCoordinates() { |
| | | return boundaryCoordinates; |
| | | } |
| | |
| | | this.returnPointCoordinates = returnPointCoordinates; |
| | | } |
| | | |
| | | public String getReturnPathCoordinates() { |
| | | return returnPathCoordinates; |
| | | } |
| | | |
| | | public void setReturnPathCoordinates(String returnPathCoordinates) { |
| | | this.returnPathCoordinates = returnPathCoordinates; |
| | | } |
| | | |
| | | public String getReturnPathRawCoordinates() { |
| | | return returnPathRawCoordinates; |
| | | } |
| | | |
| | | public void setReturnPathRawCoordinates(String returnPathRawCoordinates) { |
| | | this.returnPathRawCoordinates = returnPathRawCoordinates; |
| | | } |
| | | |
| | | public String getBoundaryPointInterval() { |
| | | return boundaryPointInterval; |
| | | } |
| | |
| | | this.mowingTrack = mowingTrack; |
| | | } |
| | | |
| | | public String getMowingBladeWidth() { |
| | | return mowingBladeWidth; |
| | | } |
| | | |
| | | public void setMowingBladeWidth(String mowingBladeWidth) { |
| | | this.mowingBladeWidth = mowingBladeWidth; |
| | | } |
| | | |
| | | public String getMowingOverlapDistance() { |
| | | return mowingOverlapDistance; |
| | | } |
| | | |
| | | public void setMowingOverlapDistance(String mowingOverlapDistance) { |
| | | this.mowingOverlapDistance = mowingOverlapDistance; |
| | | } |
| | | |
| | | public String getMowingSafetyDistance() { |
| | | return mowingSafetyDistance; |
| | | } |
| | | |
| | | public void setMowingSafetyDistance(String mowingSafetyDistance) { |
| | | this.mowingSafetyDistance = mowingSafetyDistance; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Dikuai{" + |
| | |
| | | ", landNumber='" + landNumber + '\'' + |
| | | ", landName='" + landName + '\'' + |
| | | ", boundaryOriginalCoordinates='" + boundaryOriginalCoordinates + '\'' + |
| | | ", boundaryOriginalXY='" + boundaryOriginalXY + '\'' + |
| | | ", boundaryCoordinates='" + boundaryCoordinates + '\'' + |
| | | ", plannedPath='" + plannedPath + '\'' + |
| | | ", returnPointCoordinates='" + returnPointCoordinates + '\'' + |
| | | ", returnPathCoordinates='" + returnPathCoordinates + '\'' + |
| | | ", returnPathRawCoordinates='" + returnPathRawCoordinates + '\'' + |
| | | ", boundaryPointInterval='" + boundaryPointInterval + '\'' + |
| | | ", angleThreshold='" + angleThreshold + '\'' + |
| | | ", intelligentSceneAnalysis='" + intelligentSceneAnalysis + '\'' + |