Browse Source

增加车辆平滑日志

lixioayao 5 years ago
parent
commit
2db512afb4
4 changed files with 6 additions and 8 deletions
  1. 0 2
      card_person.cpp
  2. 3 3
      loc_point.cpp
  3. 1 1
      loc_point.h
  4. 2 2
      select_tool.h

+ 0 - 2
card_person.cpp

@@ -43,8 +43,6 @@ person::~person()
 }
 void person::clear()
 {
-	//m_area_tool.reset(new area_tool);
-	//m_mine_tool.reset(new mine_tool);
     m_mine_tool->clear();
     m_area_tool->clear();
     //清除部分信息

+ 3 - 3
loc_point.cpp

@@ -49,14 +49,14 @@ void loc_point::debug_out(const char *str)const
 {
     char time_buff[128];
 #if 1
-    log_info("[%s]t=%s,sit=%d,card=%d,ct=%d,cred=%d,"
+    logn_info(3,"t=%s,sit=%d,card=%d,ct=%d,cred=%d,"
             "tof1=%d,tof2=%d,pt=(%.2lf,"
             "%.2lf),rsp=%d,acc=%.2f,dist=%.2lf,dist1=%.2lf,dist2=%.2lf,rav=%.2f,speed:%.2f\n",
-            str,now(time_buff,m_time), m_sid, 
+            now(time_buff,m_time), m_sid, 
 			m_cid,
 			m_ct, m_cred_level,
             m_tof[0], m_tof[1],  x,
-            y ,(int)(m_rsp[0]+m_rsp[1])/2,m_acc,
+            y ,(m_rsp[0]+m_rsp[1])>>1,m_acc,
             m_dist1,m_dist,m_dist2, m_rav,m_speed
           );
 #else

+ 1 - 1
loc_point.h

@@ -16,7 +16,7 @@ struct loc_point:point
 	float	m_rav;
 	int	    m_cred_level;
 	int		m_tof[2];
-	float	m_rsp[2];
+    int16_t	m_rsp[2];
 	int	    m_step;
 	double  m_area;
 	point   m_sol[2];

+ 2 - 2
select_tool.h

@@ -394,7 +394,7 @@ struct car_point_filter:select_point_object
 
 		if(!card_path::inst().is_at_path(rpt))	//if point not on the path
 		{	
-			lp.debug_out();
+			//lp.debug_out();
 		//	printf("out of path:t=%ld,sit=%d,card=l,ct=%d,"
 		//				"tof1=%d,tof2=%d,pt=(%.2lf,%.2lf)\n",
 		//				m_d(0).m_time, m_d(0).m_sid,m_d(0).m_ct,
@@ -465,7 +465,7 @@ struct car_point_filter:select_point_object
 
 		if(!card_path::inst().is_at_path(pt))	//if point not on the path
 		{	
-			lp.debug_out();
+			//lp.debug_out();
 		//	printf("out of path:t=%ld,sit=%d,card=0,ct=%d,"
 		//				"tof1=%d,tof2=%d,pt=(%.2lf,%.2lf)\n",
 		//				m_d(0).m_time, m_d(0).m_sid,m_d(0).m_ct,