Browse Source

help .. up_mine.

lixioayao 6 years ago
parent
commit
548da1cc39
12 changed files with 693 additions and 179 deletions
  1. 116 0
      1
  2. 61 0
      111111111
  3. 116 0
      12
  4. 127 0
      123.txt
  5. 175 147
      ant.cpp
  6. 6 6
      ant.h
  7. 2 2
      bindmorecard.h
  8. 2 2
      card_path.cpp
  9. 27 1
      main.cpp
  10. 51 16
      path_tof.txt
  11. 8 5
      websocket/jsonBuilder.cpp
  12. 2 0
      websocket/wsTimerThread.cpp

+ 116 - 0
1

@@ -0,0 +1,116 @@
+2018-10-16 15:20:10.950 [info] config param: main.fname=../log/yals.log
+2018-10-16 15:20:10.950 [info] config param: main.queue_size=8192
+2018-10-16 15:20:10.950 [info] config param: main.level=info
+2018-10-16 15:20:10.950 [info] config param: main.show_level=1
+2018-10-16 15:20:10.950 [info] config param: main.show_srcline=1
+2018-10-16 15:20:10.950 [info] config param: main.show_thread=1
+2018-10-16 15:20:10.950 [info] json_interval:1000
+2018-10-16 15:20:13.951 [error] web socket init failed.
+2018-10-16 15:20:13.977 [info] here....
+2018-10-16 15:20:13.977 [info] test area:32
+2018-10-16 15:20:13.979 [info] test landmark:id:27,dir:2,dis:235.00
+2018-10-16 15:20:13.980 [info] test special_area:35
+line:[(4727.000,-75.000),(4727.000,-50.000)]
+line:[(4018.000,-154.300),(4040.700,-154.300)]
+line:[(6595.700,-661.300),(7304.100,-536.500)]
+line:[(3112.400,489.200),(3275.000,489.200)]
+line:[(3112.400,489.200),(3112.400,966.250)]
+line:[(3275.000,489.200),(3275.000,722.000)]
+line:[(4784.400,-55.000),(4784.400,163.400)]
+line:[(4784.400,-55.000),(5124.044,-158.791)]
+line:[(4784.400,-55.000),(5164.206,-165.749)]
+line:[(6599.600,-609.700),(7158.282,-511.236)]
+line:[(4727.000,-90.000),(4727.000,-75.000)]
+line:[(4727.000,-90.000),(6595.700,-661.300)]
+line:[(4727.000,-90.000),(4946.486,-128.027)]
+line:[(3112.400,-74.000),(3112.400,-50.000)]
+line:[(2939.800,-75.000),(2939.800,-50.000)]
+line:[(2939.800,-75.000),(2958.500,-75.000)]
+line:[(3275.000,-0.000),(3275.000,489.200)]
+line:[(4784.400,-80.800),(4946.486,-128.027)]
+line:[(2931.000,-1300.000),(2931.000,-125.000)]
+line:[(4625.000,-100.000),(4629.421,-75.000)]
+line:[(3300.000,-74.000),(3300.000,-50.000)]
+line:[(4666.100,132.400),(4727.000,132.400)]
+line:[(4677.200,157.600),(4677.200,180.700)]
+line:[(1000.000,-75.000),(2334.200,-75.000)]
+line:[(4040.700,-1000.000),(4040.700,-154.300)]
+line:[(4040.700,-75.000),(4068.500,-75.000)]
+line:[(4670.300,209.200),(4677.200,209.200)]
+line:[(4727.000,209.200),(4727.000,340.000)]
+line:[(2958.500,-900.000),(2958.500,-100.000)]
+line:[(1000.000,-50.000),(2334.200,-50.000)]
+line:[(4727.000,-50.000),(4727.000,34.000)]
+line:[(4784.400,163.400),(4784.500,160.700)]
+line:[(4680.900,112.000),(4700.000,112.400)]
+line:[(4670.300,180.700),(4677.200,180.700)]
+line:[(4727.000,180.700),(4727.000,209.200)]
+line:[(4727.000,-128.000),(4727.000,-90.000)]
+line:[(4727.000,34.000),(4750.100,39.100)]
+line:[(4727.000,34.000),(4727.000,132.400)]
+line:[(2700.000,-100.000),(2740.900,-100.000)]
+line:[(4680.900,56.400),(4713.400,56.400)]
+line:[(4700.000,58.100),(4700.000,112.400)]
+line:[(4700.000,112.400),(4713.400,112.000)]
+line:[(4720.000,359.107),(4727.000,340.000)]
+line:[(4727.000,340.000),(4727.000,1200.000)]
+line:[(4737.600,194.400),(4784.500,160.700)]
+line:[(4727.000,132.400),(4727.000,180.700)]
+line:[(4746.200,39.100),(4746.200,110.800)]
+line:[(2519.500,-75.000),(2740.900,-75.000)]
+line:[(2519.500,-75.000),(2519.500,-50.000)]
+line:[(4068.500,-148.500),(4091.500,-125.000)]
+line:[(4068.500,-148.500),(4068.500,-100.000)]
+line:[(4068.500,-1000.000),(4068.500,-148.500)]
+line:[(4068.500,-75.000),(4629.421,-75.000)]
+line:[(2740.900,-1000.000),(2740.900,-100.000)]
+line:[(2740.900,-75.000),(2939.800,-75.000)]
+line:[(2356.600,-75.000),(2519.500,-75.000)]
+line:[(2356.600,-75.000),(2356.600,-50.000)]
+line:[(2788.600,-1000.000),(2788.600,-125.000)]
+line:[(2334.200,-75.000),(2356.600,-75.000)]
+line:[(2334.200,-75.000),(2334.200,-50.000)]
+line:[(2541.900,-25.000),(2541.900,1000.000)]
+line:[(4946.486,-128.027),(6599.600,-609.700)]
+line:[(4946.486,-128.027),(5124.044,-158.791)]
+line:[(5124.044,-158.791),(6599.600,-609.700)]
+line:[(5124.044,-158.791),(5164.206,-165.749)]
+line:[(5164.206,-165.749),(6599.600,-584.300)]
+line:[(5164.206,-165.749),(7158.282,-511.236)]
+line:[(7158.282,-511.236),(7304.100,-536.500)]
+line:[(7158.282,-511.236),(7711.700,-413.700)]
+line:[(4633.843,-50.000),(4666.100,132.400)]
+line:[(4633.843,-50.000),(4727.000,-50.000)]
+line:[(2334.200,-50.000),(2334.200,1000.000)]
+line:[(2334.200,-50.000),(2356.600,-50.000)]
+line:[(2356.600,-50.000),(2356.600,1000.000)]
+line:[(2356.600,-50.000),(2519.500,-50.000)]
+line:[(2519.500,-50.000),(2519.500,1000.000)]
+line:[(2519.500,-50.000),(2939.800,-50.000)]
+line:[(2939.800,-50.000),(2939.800,400.000)]
+line:[(2939.800,-50.000),(3112.400,-50.000)]
+line:[(3112.400,-50.000),(3112.400,489.200)]
+line:[(3112.400,-50.000),(3300.000,-50.000)]
+line:[(3300.000,-50.000),(3300.000,966.250)]
+line:[(3300.000,-50.000),(4633.843,-50.000)]
+line:[(4629.421,-75.000),(4727.000,-75.000)]
+line:[(4629.421,-75.000),(4633.843,-50.000)]
+line:[(2958.500,-75.000),(4040.700,-75.000)]
+line:[(2958.500,-75.000),(2958.500,-73.000)]
+line:[(4040.700,-154.300),(4068.000,-154.300)]
+line:[(4040.700,-154.300),(4040.700,-100.000)]
+line:[(2740.900,-100.000),(2740.900,-75.000)]
+line:[(2740.900,-100.000),(2958.500,-100.000)]
+line:[(2958.500,-100.000),(2958.500,-75.000)]
+line:[(2958.500,-100.000),(4040.700,-100.000)]
+line:[(4040.700,-100.000),(4040.700,-75.000)]
+line:[(4040.700,-100.000),(4068.500,-100.000)]
+line:[(4068.500,-100.000),(4625.000,-100.000)]
+line:[(4068.500,-100.000),(4068.500,-75.000)]
+line:[(4677.200,180.700),(4727.000,180.700)]
+line:[(4677.200,180.700),(4677.200,209.200)]
+line:[(4677.200,209.200),(4677.200,235.000)]
+line:[(4677.200,209.200),(4727.000,209.200)]
+2018-10-16 15:20:14.617 [debug] dat_vehicle_category:category_id:3--over_speed:25.00
+2018-10-16 15:20:14.617 [debug] dat_vehicle_category:category_id:2--over_speed:40.00
+2018-10-16 15:20:14.617 [debug] dat_vehicle_category:category_id:1--over_speed:25.00

+ 61 - 0
111111111

@@ -0,0 +1,61 @@
+   if(pid == 0)
+        {
+            line_v l(p1,p2);
+            {
+                point px = l.line::projection(sit_);
+                sit_.set(px);
+                for(int i=0;i<2;i++)
+                {
+                    path p;
+                    p.m_slope[0] = atof(s[8]);
+                    p.m_line[0] = line_v(px,l[i]);
+                    sit_.m_ant[i].m_path.push_back(p);
+                }
+            }
+        }
+        else 
+        {
+            ant &a = pid<0?sit_.m_ant[0]:sit_.m_ant[1];
+            if(a.m_path.size()!=0)
+            {
+                path &p = a.m_path[0];
+                p.m_line[abs(pid)-1] = line_v(p1,p2);
+                p.m_slope[abs(pid)-1] = atof(s[8]);
+            }
+            else
+            {
+                path p;
+                p.m_line[abs(pid)-1] = line_v(p1,p2);
+                p.m_slope[abs(pid)-1] = atof(s[8]);
+                a.m_path.push_back(p);
+            }
+            if(abs(pid)==1)
+				 sit_.set(p1);
+        }
+	}
+	fclose(fp);
+
+	for(auto&_s:sit_list::instance()->m_map)
+	{
+		auto & s = *(_s.second);
+		if(s.m_id==-1)
+			continue;
+        s.swap();
+		if((s.path(0).empty() && s.path(1).empty()))
+			continue;
+        s.m_path_empty=false; 
+
+        for(auto &a:s.m_ant)
+        for(auto &p:a.m_path)
+        {
+            if(!p.m_line[0].empty())
+            {
+                point px = p.m_line[0].line::projection(a);
+                p.m_line[0]=line_v(px,p.m_line[0][1]);
+            }
+        }
+        //std_info("%s",s.to_string().c_str());
+        log_info("%s",s.to_string().c_str());
+        //std_info("%f----%f",s.x,s.y);
+	}
+

+ 116 - 0
12

@@ -0,0 +1,116 @@
+2018-10-16 15:20:29.087 [info] config param: main.fname=../log/yals.log
+2018-10-16 15:20:29.087 [info] config param: main.queue_size=8192
+2018-10-16 15:20:29.087 [info] config param: main.level=info
+2018-10-16 15:20:29.087 [info] config param: main.show_level=1
+2018-10-16 15:20:29.087 [info] config param: main.show_srcline=1
+2018-10-16 15:20:29.087 [info] config param: main.show_thread=1
+2018-10-16 15:20:29.087 [info] json_interval:1000
+2018-10-16 15:20:32.088 [error] web socket init failed.
+2018-10-16 15:20:32.114 [info] here....
+2018-10-16 15:20:32.114 [info] test area:32
+2018-10-16 15:20:32.115 [info] test landmark:id:27,dir:2,dis:235.00
+2018-10-16 15:20:32.116 [info] test special_area:35
+line:[(4727.000,-75.000),(4727.000,-50.000)]
+line:[(4018.000,-154.300),(4040.700,-154.300)]
+line:[(6595.700,-661.300),(7304.100,-536.500)]
+line:[(3112.400,489.200),(3275.000,489.200)]
+line:[(3112.400,489.200),(3112.400,966.250)]
+line:[(3275.000,489.200),(3275.000,722.000)]
+line:[(4784.400,-55.000),(4784.400,163.400)]
+line:[(4784.400,-55.000),(5124.044,-158.791)]
+line:[(4784.400,-55.000),(5164.206,-165.749)]
+line:[(6599.600,-609.700),(7158.282,-511.236)]
+line:[(4727.000,-90.000),(4727.000,-75.000)]
+line:[(4727.000,-90.000),(6595.700,-661.300)]
+line:[(4727.000,-90.000),(4946.486,-128.027)]
+line:[(3112.400,-74.000),(3112.400,-50.000)]
+line:[(2939.800,-75.000),(2939.800,-50.000)]
+line:[(2939.800,-75.000),(2958.500,-75.000)]
+line:[(3275.000,-0.000),(3275.000,489.200)]
+line:[(4784.400,-80.800),(4946.486,-128.027)]
+line:[(2931.000,-1300.000),(2931.000,-125.000)]
+line:[(4625.000,-100.000),(4629.421,-75.000)]
+line:[(3300.000,-74.000),(3300.000,-50.000)]
+line:[(4666.100,132.400),(4727.000,132.400)]
+line:[(4677.200,157.600),(4677.200,180.700)]
+line:[(1000.000,-75.000),(2334.200,-75.000)]
+line:[(4040.700,-1000.000),(4040.700,-154.300)]
+line:[(4040.700,-75.000),(4068.500,-75.000)]
+line:[(4670.300,209.200),(4677.200,209.200)]
+line:[(4727.000,209.200),(4727.000,340.000)]
+line:[(2958.500,-900.000),(2958.500,-100.000)]
+line:[(1000.000,-50.000),(2334.200,-50.000)]
+line:[(4727.000,-50.000),(4727.000,34.000)]
+line:[(4784.400,163.400),(4784.500,160.700)]
+line:[(4680.900,112.000),(4700.000,112.400)]
+line:[(4670.300,180.700),(4677.200,180.700)]
+line:[(4727.000,180.700),(4727.000,209.200)]
+line:[(4727.000,-128.000),(4727.000,-90.000)]
+line:[(4727.000,34.000),(4750.100,39.100)]
+line:[(4727.000,34.000),(4727.000,132.400)]
+line:[(2700.000,-100.000),(2740.900,-100.000)]
+line:[(4680.900,56.400),(4713.400,56.400)]
+line:[(4700.000,58.100),(4700.000,112.400)]
+line:[(4700.000,112.400),(4713.400,112.000)]
+line:[(4720.000,359.107),(4727.000,340.000)]
+line:[(4727.000,340.000),(4727.000,1200.000)]
+line:[(4737.600,194.400),(4784.500,160.700)]
+line:[(4727.000,132.400),(4727.000,180.700)]
+line:[(4746.200,39.100),(4746.200,110.800)]
+line:[(2519.500,-75.000),(2740.900,-75.000)]
+line:[(2519.500,-75.000),(2519.500,-50.000)]
+line:[(4068.500,-148.500),(4091.500,-125.000)]
+line:[(4068.500,-148.500),(4068.500,-100.000)]
+line:[(4068.500,-1000.000),(4068.500,-148.500)]
+line:[(4068.500,-75.000),(4629.421,-75.000)]
+line:[(2740.900,-1000.000),(2740.900,-100.000)]
+line:[(2740.900,-75.000),(2939.800,-75.000)]
+line:[(2356.600,-75.000),(2519.500,-75.000)]
+line:[(2356.600,-75.000),(2356.600,-50.000)]
+line:[(2788.600,-1000.000),(2788.600,-125.000)]
+line:[(2334.200,-75.000),(2356.600,-75.000)]
+line:[(2334.200,-75.000),(2334.200,-50.000)]
+line:[(2541.900,-25.000),(2541.900,1000.000)]
+line:[(4946.486,-128.027),(6599.600,-609.700)]
+line:[(4946.486,-128.027),(5124.044,-158.791)]
+line:[(5124.044,-158.791),(6599.600,-609.700)]
+line:[(5124.044,-158.791),(5164.206,-165.749)]
+line:[(5164.206,-165.749),(6599.600,-584.300)]
+line:[(5164.206,-165.749),(7158.282,-511.236)]
+line:[(7158.282,-511.236),(7304.100,-536.500)]
+line:[(7158.282,-511.236),(7711.700,-413.700)]
+line:[(4633.843,-50.000),(4666.100,132.400)]
+line:[(4633.843,-50.000),(4727.000,-50.000)]
+line:[(2334.200,-50.000),(2334.200,1000.000)]
+line:[(2334.200,-50.000),(2356.600,-50.000)]
+line:[(2356.600,-50.000),(2356.600,1000.000)]
+line:[(2356.600,-50.000),(2519.500,-50.000)]
+line:[(2519.500,-50.000),(2519.500,1000.000)]
+line:[(2519.500,-50.000),(2939.800,-50.000)]
+line:[(2939.800,-50.000),(2939.800,400.000)]
+line:[(2939.800,-50.000),(3112.400,-50.000)]
+line:[(3112.400,-50.000),(3112.400,489.200)]
+line:[(3112.400,-50.000),(3300.000,-50.000)]
+line:[(3300.000,-50.000),(3300.000,966.250)]
+line:[(3300.000,-50.000),(4633.843,-50.000)]
+line:[(4629.421,-75.000),(4727.000,-75.000)]
+line:[(4629.421,-75.000),(4633.843,-50.000)]
+line:[(2958.500,-75.000),(4040.700,-75.000)]
+line:[(2958.500,-75.000),(2958.500,-73.000)]
+line:[(4040.700,-154.300),(4068.000,-154.300)]
+line:[(4040.700,-154.300),(4040.700,-100.000)]
+line:[(2740.900,-100.000),(2740.900,-75.000)]
+line:[(2740.900,-100.000),(2958.500,-100.000)]
+line:[(2958.500,-100.000),(2958.500,-75.000)]
+line:[(2958.500,-100.000),(4040.700,-100.000)]
+line:[(4040.700,-100.000),(4040.700,-75.000)]
+line:[(4040.700,-100.000),(4068.500,-100.000)]
+line:[(4068.500,-100.000),(4625.000,-100.000)]
+line:[(4068.500,-100.000),(4068.500,-75.000)]
+line:[(4677.200,180.700),(4727.000,180.700)]
+line:[(4677.200,180.700),(4677.200,209.200)]
+line:[(4677.200,209.200),(4677.200,235.000)]
+line:[(4677.200,209.200),(4727.000,209.200)]
+2018-10-16 15:20:32.747 [debug] dat_vehicle_category:category_id:3--over_speed:25.00
+2018-10-16 15:20:32.747 [debug] dat_vehicle_category:category_id:2--over_speed:40.00
+2018-10-16 15:20:32.747 [debug] dat_vehicle_category:category_id:1--over_speed:25.00

+ 127 - 0
123.txt

@@ -0,0 +1,127 @@
+insert into dat_reader_path_tof_n values(103,0,4727,-402.1,0,4727,128,0,0);
+insert into dat_reader_path_tof_n values(201,0,4727,75,0,2711.2,75,0,0);
+insert into dat_reader_path_tof_n values(202,0,4727,75,0,2732.2,75,0,0);
+insert into dat_reader_path_tof_n values(203,0,3275,0,0,3275,-722,0,0); 
+insert into dat_reader_path_tof_n values(204,0,4727,75,0,2732.2,75,0,0); 
+insert into dat_reader_path_tof_n values(205,0,3112.4,74,0,3112.4,-966.25,0,0);
+insert into dat_reader_path_tof_n values(206,0,4727,75,0,2732.2,75,0,0); 
+insert into dat_reader_path_tof_n values(207,0,3112.4,74,0,3112.4,-966.25,0,0);
+insert into dat_reader_path_tof_n values(208,0,4727,75,0,2732.2,75,0,0); 
+insert into dat_reader_path_tof_n values(209,0,4727,90,0,6595.7,661.3,0,0); 
+insert into dat_reader_path_tof_n values(210,0,4727,75,0,2732.2,75,0,0); 
+insert into dat_reader_path_tof_n values(211,0,3275,0,0,3275,-722,0,0);
+insert into dat_reader_path_tof_n values(212,0,4727,75,0,2732.2,75,0,0);
+insert into dat_reader_path_tof_n values(213,0,4727,75,0,2434.1,75,0,0);
+insert into dat_reader_path_tof_n values(214,0,3300,74,0,3300,-966.25,0,0);
+insert into dat_reader_path_tof_n values(215,0,4727,75,0,2732.2,75,0,0);
+insert into dat_reader_path_tof_n values(216,0,3112.4,74,0,3112.4,-966.25,0,0); 
+insert into dat_reader_path_tof_n values(217,0,4727,75,0,2732.2,75,0,0);
+insert into dat_reader_path_tof_n values(218,0,3112.4,74,0,3112.4,-966.25,0,0);
+insert into dat_reader_path_tof_n values(219,0,4727,75,0,2732.2,75,0,0);
+insert into dat_reader_path_tof_n values(220,0,3275,0,0,3275,-722,0,0);
+insert into dat_reader_path_tof_n values(301,0,4727,-402.1,0,4727,128,0,0);
+insert into dat_reader_path_tof_n values(302,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(303,0,4727,90,0,6595.7,661.3,0,0); 
+insert into dat_reader_path_tof_n values(304,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(305,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(307,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(308,0,4677.2,-157.6,0,4677.2,-235,0,0);
+insert into dat_reader_path_tof_n values(309,0,4727,75,0,2221,75,0,0);
+insert into dat_reader_path_tof_n values(310,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(311,0,6595.7,661.3,0,7304.1,536.5,0,0);
+insert into dat_reader_path_tof_n values(312,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(313,0,5404.94,297,0,5541.65,338,0,0);
+insert into dat_reader_path_tof_n values(314,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(315,0,4727,90,0,7304.1,536.5,0,0); 
+insert into dat_reader_path_tof_n values(316,0,4727,90,0,6595.7,661.3,0,0);
+insert into dat_reader_path_tof_n values(318,0,4727,90,0,6595.7,661.3,0,0); 
+insert into dat_reader_path_tof_n values(319,0,4677.2,-157.6,0,4677.2,-235,0,0);
+insert into dat_reader_path_tof_n values(320,0,4727,90,0,6595.7,661.3,0,0); 
+INSERT INTO dat_reader_path_tof_n VALUES(351,0,4784.4,80.8,0,6599.5,610,0,0);
+INSERT INTO dat_reader_path_tof_n VALUES(352,0,4784.4,80.8,0,6599.5,610,0,0);
+INSERT INTO dat_reader_path_tof_n VALUES(354,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(355,0,2939.8,75,0,2939.8,-400,0,0);
+insert into dat_reader_path_tof_n values(356,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(357,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(358,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(359,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(360,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(361,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(362,0,4784.4,55,0,6599.6,584.3,0,0);
+insert into dat_reader_path_tof_n values(363,0,4784.5,-163.4,0,4784.5,55.6,0,0);
+insert into dat_reader_path_tof_n values(364,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(366,0,4784.5,54.8,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(367,0,4737.6,-194.4,0,4784.5,-160.7,0,0);
+insert into dat_reader_path_tof_n values(368,0,4784.4,-163.4,0,4784.4,55.6,0,0);
+insert into dat_reader_path_tof_n values(369,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(370,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(371,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(372,0,6599.6,609.7,0,7711.7,413.7,0,0);
+insert into dat_reader_path_tof_n values(373,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(374,0,2939.8,75,0,2939.8,-400,0,0);
+insert into dat_reader_path_tof_n values(377,0,1000,50,0,4727,50,0,0);
+insert into dat_reader_path_tof_n values(381,0,1000,75,0,4727,75,0,0);
+insert into dat_reader_path_tof_n values(382,0,4040.7,75,0,4040.7,1000,0,0);
+insert into dat_reader_path_tof_n values(383,0,1000,50,0,4727,50,0,0);
+insert into dat_reader_path_tof_n values(384,0,1000,50,0,4727,50,0,0);
+insert into dat_reader_path_tof_n values(385,0,2768.5,75,0,2768.5,1000,0,0);
+insert into dat_reader_path_tof_n values(390,0,4784.4,55,0,6599.6,609.7,0,0);
+insert into dat_reader_path_tof_n values(402,0,4746.2,-110.8,0,4746.2,-39.1,0,0);
+insert into dat_reader_path_tof_n values(403,0,4727,-180.7,0,4670.3,-180.7,0,0);
+insert into dat_reader_path_tof_n values(404,0,4727,-209.2,0,4670.3,-209.2,0,0);
+insert into dat_reader_path_tof_n values(405,0,4727,-34,0,4750.1,-39.1,0,0);
+insert into dat_reader_path_tof_n values(406,0,4713.4,-56.4,0,4680.9,-56.4,0,0);
+insert into dat_reader_path_tof_n values(407,0,4700,-112.4,0,4700,-58.1,0,0);
+insert into dat_reader_path_tof_n values(408,0,4713.4,-112,0,4680.9,-112,0,0);
+insert into dat_reader_path_tof_n values(410,0,1000,75,0,4727,75,0,0);
+insert into dat_reader_path_tof_n values(501,0,2958.5,73,0,2958.5,900,0,0);
+insert into dat_reader_path_tof_n values(504,0,2958.5,73,0,2958.5,900,0,0);
+insert into dat_reader_path_tof_n values(505,0,2958.5,73,0,2958.5,900,0,0);
+insert into dat_reader_path_tof_n values(506,0,2931,373,0,2931,773,0,0);
+insert into dat_reader_path_tof_n values(507,0,2931,125,0,2931,900,0,0);
+insert into dat_reader_path_tof_n values(508,0,2931,125,0,2931,900,0,0);
+insert into dat_reader_path_tof_n values(509,0,2931,125,0,2931,900,0,0);
+insert into dat_reader_path_tof_n values(510,0,2931,125,0,2931,1300,0,0);
+insert into dat_reader_path_tof_n values(521,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(522,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(523,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(524,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(525,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(526,0,6595.7,661.3,0,7304.1,536.5,0,0);
+insert into dat_reader_path_tof_n values(527,0,3112.4,-489.2,0,3275,-489.2,0,0);
+insert into dat_reader_path_tof_n values(538,0,6595.7,661.3,0,7304.1,536.5,0,0);
+insert into dat_reader_path_tof_n values(551,0,2940.7,75,0,2940.7,-1000,0,0);
+insert into dat_reader_path_tof_n values(552,0,4018,154.3,0,4068,154.3,0,0);
+insert into dat_reader_path_tof_n values(555,0,2519.5,75,0,2519.5,-1000,0,0);
+insert into dat_reader_path_tof_n values(556,0,4068.5,148.5,0,4091.5,125,0,0);
+insert into dat_reader_path_tof_n values(557,0,4068.5,75,0,4068.5,1000,0,0);
+insert into dat_reader_path_tof_n values(558,0,2740.9,75,0,2740.9,1000,0,0);
+insert into dat_reader_path_tof_n values(559,0,2356.6,75,0,2356.6,-1000,0,0);
+insert into dat_reader_path_tof_n values(560,0,2788.6,125,0,2788.6,1000,0,0);
+insert into dat_reader_path_tof_n values(561,0,2334.2,75,0,2334.2,-1000,0,0);
+insert into dat_reader_path_tof_n values(562,0,2541.9,25,0,2541.9,-1000,0,0);
+insert into dat_reader_path_tof_n values(601, -1,4666.1, -132.4, 0,4727, -132.4, 0, 0);
+insert into dat_reader_path_tof_n values(601, 1, 4666.1, -132.4, 0,4625, 100, 0, 0);
+insert into dat_reader_path_tof_n values(602,0,4666.1,-132.4,0,4625,100,0,0);
+insert into dat_reader_path_tof_n values(603,0,3355,100,0,3113.1,100,0,0);
+insert into dat_reader_path_tof_n values(604,0,3255.85,100,0,2994.1,100,0,0);
+insert into dat_reader_path_tof_n values(605,0,3113.1,100,0,2700,100,0,0);
+insert into dat_reader_path_tof_n values(606,0,4727,75,0,2221,75,0,0);
+insert into dat_reader_path_tof_n values(607,0,4727,75,0,4727,-671.2,0,0);
+insert into dat_reader_path_tof_n values(608,0,4727,75,0,4727,-1200,0,0);
+insert into dat_reader_path_tof_n values(609,0,4727,75,0,4727,-1200,0,0);
+insert into dat_reader_path_tof_n values(610,0,3255.85,100,0,3483.85,100,0,0);
+insert into dat_reader_path_tof_n values(611,0,4666.1,-132.4,0,4625,100,0,0);
+insert into dat_reader_path_tof_n values(612,0,4329.25,100,0,4625,100,0,0);
+insert into dat_reader_path_tof_n values(613,0,4181.95,100,0,4600,100,0,0);
+insert into dat_reader_path_tof_n values(614,0,4012.2,100,0,4329.25,100,0,0);
+insert into dat_reader_path_tof_n values(615,0,3875.6,100,0,4181.95,100,0,0);
+insert into dat_reader_path_tof_n values(616,0,3742.35,100,0,4012.2,100,0,0);
+insert into dat_reader_path_tof_n values(617,0,3653.85,100,0,3875.6,100,0,0);
+insert into dat_reader_path_tof_n values(618,0,3483.85,100,0,3742.35,100,0,0);
+insert into dat_reader_path_tof_n values(619,0,3255.85,100,0,3653.85,100,0,0);
+insert into dat_reader_path_tof_n values(701,0,4727,128,0,4727,-402.1,0,0);
+insert into dat_reader_path_tof_n values(702,0,4727,128,0,4727,-402.1,0,0);
+insert into dat_reader_path_tof_n values(703,0,4727,-340,0,4720,-359.107,0,0);
+insert into dat_reader_path_tof_n values(705,0,4727,75,0,2711.2,75,0,0);
+insert into dat_reader_path_tof_n values(706,0,4727,-34,0,4750.1,-39.1,0,0);

+ 175 - 147
ant.cpp

@@ -25,7 +25,7 @@ const algo_config&site::config()const
 	return g_config[index()];
 	return g_config[index()];
 }
 }
 
 
- 
+#if 0 
 static int str_split(char*s,char**rc)
 static int str_split(char*s,char**rc)
 {
 {
 	char**o=rc;
 	char**o=rc;
@@ -38,8 +38,92 @@ static int str_split(char*s,char**rc)
 
 
 	return o-rc;
 	return o-rc;
 }
 }
+void sit_list::read_ant_path(const char*fname)
+{
+	FILE*fp=fopen(fname,"r");
+	char buf[512],*p;
+	int t,id,pid;
+	char* s[20];
+	while((p=fgets(buf,sizeof(buf),fp)))
+	{
+		t=str_split(buf,&s[0]);
+		if(t<9)
+			continue;
+
+		id=atoi(s[0]);
+		auto s_ = sit_list::instance()->get(id);
+		if(s_==nullptr)
+			continue;
+
+		pid=atoi(s[1]);
+		if(pid>2)
+          continue;
+        point p1(atof(s[2]),-atof(s[3]));
+        point p2(atof(s[5]),-atof(s[6]));
+		auto &sit_ = *s_; 
+        if(pid == 0)
+        {
+            line_v l(p1,p2);
+            {
+                point px = l.line::projection(sit_);
+                sit_.set(px);
+                for(int i=0;i<2;i++)
+                {
+                    path p;
+                    p.m_slope[0] = atof(s[8]);
+                    p.m_line[0] = line_v(px,l[i]);
+                    sit_.m_ant[i].m_path.push_back(p);
+                }
+            }
+        }
+        else 
+        {
+            ant &a = pid<0?sit_.m_ant[0]:sit_.m_ant[1];
+            if(a.m_path.size()!=0)
+            {
+                path &p = a.m_path[0];
+                p.m_line[abs(pid)-1] = line_v(p1,p2);
+                p.m_slope[abs(pid)-1] = atof(s[8]);
+            }
+            else
+            {
+                path p;
+                p.m_line[abs(pid)-1] = line_v(p1,p2);
+                p.m_slope[abs(pid)-1] = atof(s[8]);
+                a.m_path.push_back(p);
+            }
+            if(abs(pid)==1)
+				 sit_.set(p1);
+        }
+	}
+	fclose(fp);
+
+	for(auto&_s:sit_list::instance()->m_map)
+	{
+		auto & s = *(_s.second);
+		if(s.m_id==-1)
+			continue;
+        s.swap();
+		if((s.path(0).empty() && s.path(1).empty()))
+			continue;
+        s.m_path_empty=false; 
+
+        for(auto &a:s.m_ant)
+        for(auto &p:a.m_path)
+        {
+            if(!p.m_line[0].empty())
+            {
+                point px = p.m_line[0].line::projection(a);
+                p.m_line[0]=line_v(px,p.m_line[0][1]);
+            }
+        }
+        //std_info("%s",s.to_string().c_str());
+        log_info("%s",s.to_string().c_str());
+        //std_info("%f----%f",s.x,s.y);
+	}
+}
+
 //1, 101, 1, '101-1', 4727, 75, 0, 0, '2017-08-29 10:21:14'
 //1, 101, 1, '101-1', 4727, 75, 0, 0, '2017-08-29 10:21:14'
-/*
 void sit_list::read_sit_list(const char*fname)
 void sit_list::read_sit_list(const char*fname)
 {
 {
 	FILE*fp=fopen(fname,"r");
 	FILE*fp=fopen(fname,"r");
@@ -84,8 +168,8 @@ void sit_list::read_sit_list(const char*fname)
 	fclose(fp);
 	fclose(fp);
 
 
 }
 }
-*/
-void sit_list::read_sit_list(const char*fname)
+#endif
+void sit_list::read_sit_list()
 {
 {
 	std::unordered_map<int,std::shared_ptr<site>> map;
 	std::unordered_map<int,std::shared_ptr<site>> map;
 	const char *sql = "SELECT antenna_id, a.reader_id, idx, a.x, a.y, a.z, a.angle \
 	const char *sql = "SELECT antenna_id, a.reader_id, idx, a.x, a.y, a.z, a.angle \
@@ -120,13 +204,17 @@ void sit_list::read_sit_list(const char*fname)
             double z= 0;
             double z= 0;
             DBRes.GetField( "z",z, Error );
             DBRes.GetField( "z",z, Error );
 
 
-		   auto site_ptr=sit_list::instance()->get(reader_id);
-            if(nullptr==site_ptr)
+			std::shared_ptr<site> site_ptr=nullptr;
+		    auto it = map.find(reader_id);
+            if(it==map.end())
             {
             {
                 site_ptr = std::make_shared<site>(reader_id);
                 site_ptr = std::make_shared<site>(reader_id);
 				map.insert({reader_id,site_ptr});
 				map.insert({reader_id,site_ptr});
             }
             }
+			else
+			  site_ptr=it->second;
 			site_ptr->m_ant[antid].set(x,-y);
 			site_ptr->m_ant[antid].set(x,-y);
+			log_info("reand_ant..%d,%d,%.2f,%.2f",reader_id,antid,x,y);
         }
         }
     }
     }
 	sit_list::instance()->add(map);
 	sit_list::instance()->add(map);
@@ -145,152 +233,92 @@ void sit_list::read_sit_list(const char*fname)
 	}
 	}
 
 
 }
 }
-/*
-void sit_list::read_ant_path(const char*fname)
+void sit_list::read_ant_path()
 {
 {
-	FILE*fp=fopen(fname,"r");
-	char buf[512],*p;
-	int t,id,pid;
-	char* s[20];
-	while((p=fgets(buf,sizeof(buf),fp)))
-	{
-		t=str_split(buf,&s[0]);
-		if(t<9)
-			continue;
-
-		id=atoi(s[0]);
-		auto s_ = sit_list::instance()->get(id);
-		if(s_==nullptr)
-			continue;
-
-		pid=atoi(s[1]);
-		if(pid>2)
-          continue;
-        point p1(atof(s[2]),-atof(s[3]));
-        point p2(atof(s[5]),-atof(s[6]));
-		auto &sit_ = *s_; 
-        if(pid == 0)
-        {
-            line_v l(p1,p2);
-            {
-                point px = l.line::projection(sit_);
-                sit_.set(px);
-                for(int i=0;i<2;i++)
-                {
-                    path p;
-                    p.m_slope[0] = atof(s[8]);
-                    p.m_line[0] = line_v(px,l[i]);
-                    sit_.m_ant[i].m_path.push_back(p);
-                }
-            }
-        }
-        else 
-        {
-            ant &a = pid<0?sit_.m_ant[0]:sit_.m_ant[1];
-            if(a.m_path.size()!=0)
-            {
-                path &p = a.m_path[0];
-                p.m_line[abs(pid)-1] = line_v(p1,p2);
-                p.m_slope[abs(pid)-1] = atof(s[8]);
-            }
-            else
-            {
-                path p;
-                p.m_line[abs(pid)-1] = line_v(p1,p2);
-                p.m_slope[abs(pid)-1] = atof(s[8]);
-                a.m_path.push_back(p);
-            }
-            if(abs(pid)==1)
-				 sit_.set(p1);
-        }
-	}
-	fclose(fp);
-
-	for(auto&_s:sit_list::instance()->m_map)
-	{
-		auto & s = *(_s.second);
-		if(s.m_id==-1)
-			continue;
-        s.swap();
-		if((s.path(0).empty() && s.path(1).empty()))
-			continue;
-        s.m_path_empty=false; 
+	std::unordered_map<int,std::shared_ptr<site>> map;
+	const char *sql = "SELECT reader_id,tof_flag,b_x,b_y,b_z,e_x,e_y,e_z,spacing_ratio FROM dat_reader_path_tof_n;";
+    std::string Error;
+    YADB::CDBResultSet DBRes;
+    sDBConnPool.Query(sql,DBRes,Error);
+    uint64_t nCount = DBRes.GetRecordCount( Error );
+	if(nCount<=0)
+	   log_error("init_ant_path error :%s",Error.c_str());
+    if (nCount > 0)
+    {
+        log_info( "init_ant_path. The record count=%ld\n", nCount );
 
 
-        for(auto &a:s.m_ant)
-        for(auto &p:a.m_path)
+        while ( DBRes.GetNextRecod(Error) )
         {
         {
-            if(!p.m_line[0].empty())
-            {
-                point px = p.m_line[0].line::projection(a);
-                p.m_line[0]=line_v(px,p.m_line[0][1]);
-            }
-        }
-        //std_info("%s",s.to_string().c_str());
-        log_info("%s",s.to_string().c_str());
-        //std_info("%f----%f",s.x,s.y);
-	}
-}
-*/
-void sit_list::read_ant_path(const char*fname)
-{
-	FILE*fp=fopen(fname,"r");
-	char buf[512],*p;
-	int t,id,pid;
-	char* s[20];
-	while((p=fgets(buf,sizeof(buf),fp)))
-	{
-		t=str_split(buf,&s[0]);
-		if(t<9)
-			continue;
-
-		id=atoi(s[0]);
-		auto s_ = sit_list::instance()->get(id);
-		if(s_==nullptr)
-			continue;
+            int reader_id  = 0;
+            DBRes.GetField( "reader_id",reader_id, Error );
 
 
-		pid=atoi(s[1]);
-		if(pid>2)
-          continue;
-        point p1(atof(s[2]),-atof(s[3]));
-        point p2(atof(s[5]),-atof(s[6]));
-		auto &sit_ = *s_; 
-        if(pid == 0)
-        {
-            line_v l(p1,p2);
-            {
-                point px = l.line::projection(sit_);
-                sit_.set(px);
-                for(int i=0;i<2;i++)
-                {
-                    path p;
-                    p.m_slope[0] = atof(s[8]);
-                    p.m_line[0] = line_v(px,l[i]);
-                    sit_.m_ant[i].m_path.push_back(p);
-                }
-            }
+			auto site_ptr=sit_list::instance()->get(reader_id);
+			if(nullptr==site_ptr)
+				continue;
+
+         	int pid=0;
+            DBRes.GetField( "tof_flag",pid, Error );
+
+            double b_x= 0;
+            DBRes.GetField( "b_x",b_x, Error );
+
+            double b_y= 0;
+            DBRes.GetField( "b_y",b_y, Error );
+
+            double b_z= 0;
+            DBRes.GetField( "b_z",b_z, Error );
+
+			double e_x= 0;
+            DBRes.GetField( "e_x",e_x, Error );
+
+            double e_y= 0;
+            DBRes.GetField( "e_y",e_y, Error );
+
+            double e_z= 0;
+            DBRes.GetField( "e_z",e_z, Error );
+
+			double spacing_ratio = 0;
+            DBRes.GetField( "spacing_ratio",spacing_ratio, Error );
+			log_info("ant_path:%d,%.2f,%.2f,%.2f,%.2f",reader_id,b_x,b_y,e_x,e_y);
+			point p1(b_x,-b_y);
+			point p2(e_x,-e_y);
+			auto &sit_ = *site_ptr; 
+			if(pid == 0)
+			{
+				line_v l(p1,p2);
+				{
+					point px = l.line::projection(sit_);
+					sit_.set(px);
+					for(int i=0;i<2;i++)
+					{
+						path p;
+						p.m_slope[0] = spacing_ratio;
+						p.m_line[0] = line_v(px,l[i]);
+						sit_.m_ant[i].m_path.push_back(p);
+					}
+				}
+			}
+			else 
+			{
+				ant &a = pid<0?sit_.m_ant[0]:sit_.m_ant[1];
+				if(a.m_path.size()!=0)
+				{
+					path &p = a.m_path[0];
+					p.m_line[abs(pid)-1] = line_v(p1,p2);
+					p.m_slope[abs(pid)-1] = spacing_ratio;
+				}
+				else
+				{
+					path p;
+					p.m_line[abs(pid)-1] = line_v(p1,p2);
+					p.m_slope[abs(pid)-1] = spacing_ratio;
+					a.m_path.push_back(p);
+				}
+				if(abs(pid)==1)
+					sit_.set(p1);
+			}
         }
         }
-        else 
-        {
-            ant &a = pid<0?sit_.m_ant[0]:sit_.m_ant[1];
-            if(a.m_path.size()!=0)
-            {
-                path &p = a.m_path[0];
-                p.m_line[abs(pid)-1] = line_v(p1,p2);
-                p.m_slope[abs(pid)-1] = atof(s[8]);
-            }
-            else
-            {
-                path p;
-                p.m_line[abs(pid)-1] = line_v(p1,p2);
-                p.m_slope[abs(pid)-1] = atof(s[8]);
-                a.m_path.push_back(p);
-            }
-            if(abs(pid)==1)
-				 sit_.set(p1);
-        }
-	}
-	fclose(fp);
-
+    }
 	for(auto&_s:sit_list::instance()->m_map)
 	for(auto&_s:sit_list::instance()->m_map)
 	{
 	{
 		auto & s = *(_s.second);
 		auto & s = *(_s.second);

+ 6 - 6
ant.h

@@ -269,20 +269,20 @@ struct site:point
 
 
 struct sit_list:single_base<sit_list,int,std::shared_ptr<site>>
 struct sit_list:single_base<sit_list,int,std::shared_ptr<site>>
 {
 {
-    void load(const char*ant_file,const char*path_file)
+    void load()
     {
     {
-        read_sit_list(ant_file);
-        read_ant_path(path_file);
+        read_sit_list();
+        read_ant_path();
     }
     }
 
 
     void load_from_db()
     void load_from_db()
     {
     {
-        load("data_reader_antenna.txt","path_tof.txt");
+        load();
         init_site();
         init_site();
     }
     }
 
 
-    void read_sit_list(const char*fname);
-    void read_ant_path(const char*fname);
+    void read_sit_list();
+    void read_ant_path();
     void init_site();
     void init_site();
 };
 };
 #endif
 #endif

+ 2 - 2
bindmorecard.h

@@ -308,10 +308,10 @@ struct CloserCardFactory : CardFactory
 {
 {
 	CloserCardFactory(cardMgr*);
 	CloserCardFactory(cardMgr*);
 	int m_closer_slot=0;
 	int m_closer_slot=0;
-	std::map<uint64_t,int>					 m_count;
+	std::map<uint64_t,int>		 m_count;
 	bool getAccess(uint64_t cid1,uint64_t cid2)
 	bool getAccess(uint64_t cid1,uint64_t cid2)
 	{
 	{
-		uint64_t cid = cid1+cid2;
+		uint64_t cid = MyHash{}(cid1,cid2);
 		if(m_count[cid] < 600)
 		if(m_count[cid] < 600)
 		{
 		{
 			m_count[cid]++;
 			m_count[cid]++;

+ 2 - 2
card_path.cpp

@@ -647,9 +647,9 @@ struct graph
 			int id=l.size()-1;
 			int id=l.size()-1;
 
 
 			line_v lv(v[from],v[to]);
 			line_v lv(v[from],v[to]);
-#ifdef __DEBUG__
+
 			printf("line:%s\n",lv.to_string().c_str());
 			printf("line:%s\n",lv.to_string().c_str());
-#endif
+
 			double cos=lv.cos_k();
 			double cos=lv.cos_k();
 			double sin=lv.sin_k();
 			double sin=lv.sin_k();
 
 

+ 27 - 1
main.cpp

@@ -112,9 +112,35 @@ void cleanup()
 
 
 	ev_loop_destroy(ev_default_loop());
 	ev_loop_destroy(ev_default_loop());
 }
 }
+void usage(char ** argv)
+{
+	std::string cmd(argv[1]);
+	if(cmd=="--help" || cmd == "-H")
+	{
+		printf("用法:yals [选项]文件...\n");
+		printf("选项:\n");
+		printf("--help			显示此帮助说明\n");
+		printf("-v|--version		显示采集程序版本信息\n");
+	}
+	else if(cmd == "--version" || cmd == "-v")
+	{
+		printf("yals (采集程序) 1.0.0\n");
+	}
+	else
+	{
+		printf("Unknown option:%s\n",cmd.c_str());
+		printf( "usage:yals [--version][--help][-v][-H]\n");
+	}
+
 
 
-int main()
+}
+int main(int argc ,char * argv[])
 {
 {
+	if(argc >1)
+	{
+		usage(argv);
+		return 0;
+	}
     log_init("../etc/log.ini");
     log_init("../etc/log.ini");
     if(config.open("../etc/config.ini"))
     if(config.open("../etc/config.ini"))
 		return -1;
 		return -1;

+ 51 - 16
path_tof.txt

@@ -38,7 +38,31 @@
 319,0,4677.2,-157.6,0,4677.2,-235,0,0,null,-1
 319,0,4677.2,-157.6,0,4677.2,-235,0,0,null,-1
 320,0,4727,90,0,6595.7,661.3,0,0,null,-1 
 320,0,4727,90,0,6595.7,661.3,0,0,null,-1 
 355,0,2939.8,75,0,2939.8,-400,0,0,null,-1
 355,0,2939.8,75,0,2939.8,-400,0,0,null,-1
+356,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+357,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+358,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+359,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+360,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
+361,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+362,0,4784.4,55,0,6599.6,584.3,0,0,null,-1
+363,0,4784.5,-163.4,0,4784.5,55.6,0,0,null,-1
+364,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
+366,0,4784.5,54.8,0,6599.6,609.7,0,0,null,-1
+367,0,4737.6,-194.4,0,4784.5,-160.7,0,0,null,-1
+368,0,4784.4,-163.4,0,4784.4,55.6,0,0,null,-1
+369,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
+370,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
+371,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
+372,0,6599.6,609.7,0,7711.7,413.7,0,0,null,-1
+373,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
 374,0,2939.8,75,0,2939.8,-400,0,0,null,-1
 374,0,2939.8,75,0,2939.8,-400,0,0,null,-1
+377,0,1000,50,0,4727,50,0,0,null,-1
+381,0,1000,75,0,4727,75,0,0,null,-1
+382,0,4040.7,75,0,4040.7,1000,0,0,null,-1
+383,0,1000,50,0,4727,50,0,0,null,-1
+384,0,1000,50,0,4727,50,0,0,null,-1
+385,0,2768.5,75,0,2768.5,1000,0,0,null,-1
+390,0,4784.4,55,0,6599.6,609.7,0,0,null,-1
 402,0,4746.2,-110.8,0,4746.2,-39.1,0,0,null,-1
 402,0,4746.2,-110.8,0,4746.2,-39.1,0,0,null,-1
 403,0,4727,-180.7,0,4670.3,-180.7,0,0,null,-1
 403,0,4727,-180.7,0,4670.3,-180.7,0,0,null,-1
 404,0,4727,-209.2,0,4670.3,-209.2,0,0,null,-1
 404,0,4727,-209.2,0,4670.3,-209.2,0,0,null,-1
@@ -46,22 +70,35 @@
 406,0,4713.4,-56.4,0,4680.9,-56.4,0,0,null,-1
 406,0,4713.4,-56.4,0,4680.9,-56.4,0,0,null,-1
 407,0,4700,-112.4,0,4700,-58.1,0,0,null,-1
 407,0,4700,-112.4,0,4700,-58.1,0,0,null,-1
 408,0,4713.4,-112,0,4680.9,-112,0,0,null,-1
 408,0,4713.4,-112,0,4680.9,-112,0,0,null,-1
-501,0,2952,73,0,2952,900,0,0,null,-1
-504,0,2952,73,0,2952,900,0,0,null,-1
-505,0,2952,73,0,2952,900,0,0,null,-1
-506,0,2929.8,373,0,2929.8,773,0,0,null,-1
-507,0,2929.8,125,0,2929.8,900,0,0,null,-1
-508,0,2929.8,125,0,2929.8,900,0,0,null,-1
-509,0,2929.8,125,0,2929.8,900,0,0,null,-1
-510,0,2929.8,125,0,2929.8,1300,0,0,null,-1
-521,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
-522,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
-523,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
-524,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
-525,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
+410,0,1000,75,0,4727,75,0,0,null,-1
+501,0,2958.5,73,0,2958.5,900,0,0,null,-1
+504,0,2958.5,73,0,2958.5,900,0,0,null,-1
+505,0,2958.5,73,0,2958.5,900,0,0,null,-1
+506,0,2931,373,0,2931,773,0,0,null,-1
+507,0,2931,125,0,2931,900,0,0,null,-1
+508,0,2931,125,0,2931,900,0,0,null,-1
+509,0,2931,125,0,2931,900,0,0,null,-1
+510,0,2931,125,0,2931,1300,0,0,null,-1
+521,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
+522,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
+523,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
+524,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
+525,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
 526,0,6595.7,661.3,0,7304.1,536.5,0,0,null,-1
 526,0,6595.7,661.3,0,7304.1,536.5,0,0,null,-1
-527,0,3112.4,-569.5,0,3275,-569.5,0,0,null,-1
+527,0,3112.4,-489.2,0,3275,-489.2,0,0,null,-1
 538,0,6595.7,661.3,0,7304.1,536.5,0,0,null,-1
 538,0,6595.7,661.3,0,7304.1,536.5,0,0,null,-1
+551,0,2940.7,75,0,2940.7,-1000,0,0,null,-1
+552,0,4018,154.3,0,4068,154.3,0,0,null,-1
+555,0,2519.5,75,0,2519.5,-1000,0,0,null,-1
+556,0,4068.5,148.5,0,4091.5,125,0,0,null,-1
+557,0,4068.5,75,0,4068.5,1000,0,0,null,-1
+558,0,2740.9,75,0,2740.9,1000,0,0,null,-1
+559,0,2356.6,75,0,2356.6,-1000,0,0,null,-1
+560,0,2788.6,125,0,2788.6,1000,0,0,null,-1
+561,0,2334.2,75,0,2334.2,-1000,0,0,null,-1
+562,0,2541.9,25,0,2541.9,-1000,0,0,null,-1
+601, -1,4666.1, -132.4, 0,4727, -132.4, 0, 0,null,-1
+601, 1, 4666.1, -132.4, 0,4625, 100, 0, 0,null,-1
 602,0,4666.1,-132.4,0,4625,100,0,0,null,-1
 602,0,4666.1,-132.4,0,4625,100,0,0,null,-1
 603,0,3355,100,0,3113.1,100,0,0,null,-1
 603,0,3355,100,0,3113.1,100,0,0,null,-1
 604,0,3255.85,100,0,2994.1,100,0,0,null,-1
 604,0,3255.85,100,0,2994.1,100,0,0,null,-1
@@ -85,5 +122,3 @@
 703,0,4727,-340,0,4720,-359.107,0,0,null,-1
 703,0,4727,-340,0,4720,-359.107,0,0,null,-1
 705,0,4727,75,0,2711.2,75,0,0,null,-1
 705,0,4727,75,0,2711.2,75,0,0,null,-1
 706,0,4727,-34,0,4750.1,-39.1,0,0,null,-1
 706,0,4727,-34,0,4750.1,-39.1,0,0,null,-1
-601, -1,4666.1, -132.4, 0,4727, -132.4, 0, 0,NULL, -1
-601, 1, 4666.1, -132.4, 0,4625, 100, 0, 0,NULL, -1

+ 8 - 5
websocket/jsonBuilder.cpp

@@ -428,9 +428,6 @@ namespace YA
 		{
 		{
 			v_stat.AddMember( JSON_ROOT_KEY_STATISTIC_DEPT, v_dept, Allocator );
 			v_stat.AddMember( JSON_ROOT_KEY_STATISTIC_DEPT, v_dept, Allocator );
 		}
 		}
-			
-		s.AddMember( JSON_ROOT_KEY_STATISTIC_STAT, s_stat, Allocator );
-		v.AddMember( JSON_ROOT_KEY_STATISTIC_STAT, v_stat, Allocator );
 
 
 		//glbl
 		//glbl
 		rapidjson::Value s_glbl( rapidjson::kObjectType );
 		rapidjson::Value s_glbl( rapidjson::kObjectType );
@@ -439,8 +436,14 @@ namespace YA
 		__BuildDeptItem( s_glbl_item, Allocator, s_glbl );
 		__BuildDeptItem( s_glbl_item, Allocator, s_glbl );
 		__BuildDeptItem( v_glbl_item, Allocator, v_glbl );
 		__BuildDeptItem( v_glbl_item, Allocator, v_glbl );
 
 
-		s.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, s_glbl, Allocator );
-		v.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, v_glbl, Allocator );
+		//s.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, s_glbl, Allocator );
+		//v.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, v_glbl, Allocator );
+
+		s_stat.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, s_glbl, Allocator );
+		v_stat.AddMember( JSON_ROOT_KEY_STATISTIC_GLOBAL, v_glbl, Allocator );
+			
+		s.AddMember( JSON_ROOT_KEY_STATISTIC_STAT, s_stat, Allocator );
+		v.AddMember( JSON_ROOT_KEY_STATISTIC_STAT, v_stat, Allocator );
 
 
 		rapidjson::Value Data( rapidjson::kObjectType );
 		rapidjson::Value Data( rapidjson::kObjectType );
 		Data.AddMember( JSON_ROOT_KEY_STATISTIC_STAFF_DATA, s, Allocator );
 		Data.AddMember( JSON_ROOT_KEY_STATISTIC_STAFF_DATA, s, Allocator );

+ 2 - 0
websocket/wsTimerThread.cpp

@@ -63,6 +63,8 @@ namespace YA
 	void wsTimerThread::__SendCardPos()
 	void wsTimerThread::__SendCardPos()
 	{
 	{
 		std::map<uint64_t, _CARD_POS_> CardPosList;
 		std::map<uint64_t, _CARD_POS_> CardPosList;
+		if(__CardPosList.empty())
+		  return;
 		__CardPosList.copy( CardPosList );
 		__CardPosList.copy( CardPosList );
 		std::string jsCardPos = __jsBuilder.BuildCardPos( CardPosList );
 		std::string jsCardPos = __jsBuilder.BuildCardPos( CardPosList );
 		log_info("[pos_map]%s",jsCardPos.c_str());
 		log_info("[pos_map]%s",jsCardPos.c_str());