1
zhang
2025-10-16 4f5b35538baf84ecd3cdbd4afd797b0f5d1641de
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java
@@ -154,6 +154,21 @@
        return angle;
    }
    public static void main(String[] args) {
        Double x0 = 2D;
        Double y0 = 2D;
        Double x1 = 2D;
        Double y1 = 1D;
        double deltaX = x1 - x0;
        double deltaY = y1 - y0;
        double angle = Math.atan2(deltaX, deltaY);
        angle = Math.toDegrees(angle) + 0;
        angle = (angle + 360) % 360; // 将角度转换为正值
        System.out.println(angle);
    }
    // 坐标货架阈值 todo:luxiaotao
    public AgvDirectionType calculateAgvWorkDirectionByShelf(Loc loc, Code code) {
        Integer compDirect = loc.getCompDirect();
@@ -177,8 +192,8 @@
        return Double.parseDouble(sta.getAngle());
    }
    public AgvDirectionType calculateAgvWorkDirectionByStation(Sta sta, Code code) {
        return AgvDirectionType.FORWARD;
    public Double calculateAgvWorkDirectionByStation(Double staWorkDirection, Double lastDirection) {
        return Math.abs(staWorkDirection - lastDirection) + 90.0D;
    }
    public double calculateDistance(double x1, double y1, double x2, double y2) {