9edafe6e 张雷

人员定位代码优化修改

1 个父辈 9372cbec
...@@ -16,26 +16,24 @@ public class CoordinateUtil { ...@@ -16,26 +16,24 @@ public class CoordinateUtil {
16 if("B2".equals(floor)){ 16 if("B2".equals(floor)){
17 fd_x = CommonConstant.BLC2*(Double.valueOf(x1)-CommonConstant.LT_B2_X)+CommonConstant.LT_B2_X; 17 fd_x = CommonConstant.BLC2*(Double.valueOf(x1)-CommonConstant.LT_B2_X)+CommonConstant.LT_B2_X;
18 fd_y = CommonConstant.BLC2*(Double.valueOf(y1)+CommonConstant.LT_B2_Y)-CommonConstant.LT_B2_Y; 18 fd_y = CommonConstant.BLC2*(Double.valueOf(y1)+CommonConstant.LT_B2_Y)-CommonConstant.LT_B2_Y;
19 System.out.println("放大后的坐标为:X:"+fd_x+",Y:"+fd_y);
20 a = CommonConstant.MQ_B2_X - CommonConstant.LT_B2_X;//原点偏移x 19 a = CommonConstant.MQ_B2_X - CommonConstant.LT_B2_X;//原点偏移x
21 b = CommonConstant.MQ_B2_Y - CommonConstant.LT_B2_Y;//原点偏移y 20 b = CommonConstant.MQ_B2_Y - CommonConstant.LT_B2_Y;//原点偏移y
22 System.out.println("偏移a:"+a+",b:"+b);
23 }else if("B1".equals(floor)){ 21 }else if("B1".equals(floor)){
24 fd_x = CommonConstant.BLC1*(Double.valueOf(x1)-CommonConstant.LT_B1_X)+CommonConstant.LT_B1_X; 22 fd_x = CommonConstant.BLC1*(Double.valueOf(x1)-CommonConstant.LT_B1_X)+CommonConstant.LT_B1_X;
25 fd_y = CommonConstant.BLC1*(Double.valueOf(y1)+CommonConstant.LT_B1_Y)-CommonConstant.LT_B1_Y; 23 fd_y = CommonConstant.BLC1*(Double.valueOf(y1)+CommonConstant.LT_B1_Y)-CommonConstant.LT_B1_Y;
26 System.out.println("放大后的坐标为:X:"+fd_x+",Y:"+fd_y);
27 a = CommonConstant.MQ_B1_X - CommonConstant.LT_B1_X;//原点偏移x 24 a = CommonConstant.MQ_B1_X - CommonConstant.LT_B1_X;//原点偏移x
28 b = CommonConstant.MQ_B1_Y - CommonConstant.LT_B1_Y;//原点偏移y 25 b = CommonConstant.MQ_B1_Y - CommonConstant.LT_B1_Y;//原点偏移y
29 System.out.println("偏移a:"+a+",b:"+b);
30 }else{ 26 }else{
31 fd_x = 0.00; 27 fd_x = 0.00;
32 fd_y = 0.00; 28 fd_y = 0.00;
33 a = 0.00; 29 a = 0.00;
34 b = 0.00; 30 b = 0.00;
35 } 31 }
32 System.out.println("放大后的坐标为:X:"+fd_x+",Y:"+fd_y);
33 System.out.println("偏移a:"+a+",b:"+b);
36 double x = Double.valueOf(fd_x) + a; 34 double x = Double.valueOf(fd_x) + a;
37 double y = Double.valueOf(fd_y) + b; 35 double y = Double.valueOf(fd_y) + b;
38 System.out.println("新坐标为:X:"+x+",Y:-"+y); 36 System.out.println("新坐标为:X:"+x+",Y:"+y);
39 map.put("x",x); 37 map.put("x",x);
40 map.put("y",y); 38 map.put("y",y);
41 return map; 39 return map;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!