ソースを参照

修改bug:车辆采用车辆地图,人员采用人员地图,并计算按照车辆地图得出得坐标m_v_point

zengminguo 2 年 前
コミット
82e2862528
1 ファイル変更23 行追加8 行削除
  1. 23 8
      card_base.cpp

+ 23 - 8
card_base.cpp

@@ -145,17 +145,32 @@ void card_location_base::on_location(const std::vector<point>&vp, const std::vec
         sid = site_ptr->m_id;
 	if(pt.m_useless)
 	{
-		if (!is_v_map)
+		if (is_person())
 		{
-			x = tool_other::round(pt.x, 3);
-			y = tool_other::round(pt.y, 3);
+			if (!is_v_map)
+			{
+				x = tool_other::round(pt.x, 3);
+				y = tool_other::round(pt.y, 3);
+			}
+			else
+			{
+				m_v_point.x = tool_other::round(pt.x, 3);
+				m_v_point.y = tool_other::round(pt.y, 3);
+				log_info("useful loc m_v_point: type=%d, card=%d, site=%d, ct=%d, timestamp=%llu, x=%f, y=%f, speed=%.2f, acc=%.2f", m_type, m_id, sid, m_ct, m_time, m_v_point.x, m_v_point.y, m_speed, lm[0].m_acc);
+				return;
+			}
 		}
-		else
+		else if (is_vehicle())
 		{
-			m_v_point.x = tool_other::round(pt.x, 3);
-			m_v_point.y = tool_other::round(pt.y, 3);
-			log_info("useful loc m_v_point: type=%d, card=%d, site=%d, ct=%d, timestamp=%llu, x=%f, y=%f, speed=%.2f, acc=%.2f", m_type, m_id, sid, m_ct, m_time, m_v_point.x, m_v_point.y, m_speed, lm[0].m_acc);
-			return;
+			if (is_v_map)
+			{
+				x = tool_other::round(pt.x, 3);
+				y = tool_other::round(pt.y, 3);
+			}
+			else
+			{
+				return;
+			}
 		}
 
 		double acc = lm[0].m_acc;