9edafe6e 张雷

人员定位代码优化修改

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