Browse Source

修改车辆定位系统坐标不对的问题

zengminguo 2 years ago
parent
commit
5ff6a5a5d2
3 changed files with 5 additions and 0 deletions
  1. 2 0
      card_base.cpp
  2. 1 0
      card_base.h
  3. 2 0
      card_car.cpp

+ 2 - 0
card_base.cpp

@@ -547,6 +547,8 @@ void card_location_base::on_location(const std::vector<point>&vp, const std::vec
 			m_time_tmp_last = lm[0].m_time_tmp;
 			pt.x = point_cell.x;
 			pt.y = point_cell.y;
+			m_pt.x = point_cell.x;
+			m_pt.y = point_cell.y;
 
 			//make_his_location_simplify(time(0) * 1000, pt);
 			make_his_location_cell_card(pt.m_time_tmp, pt);

+ 1 - 0
card_base.h

@@ -146,6 +146,7 @@ struct card_location_base:card,std::enable_shared_from_this<card_location_base>
     boost::circular_buffer<point> m_cb_point;
     point m_last_point;
 	int m_cell_index;
+	point m_pt;
 	int m_cur_site_counts = 0;				// 当前基站缓存数据总数
 	std::vector<float> m_vtp_dist;			// 相同分站存储距离数据
 	bool m_over_site = false;				// 过分站状态

+ 2 - 0
card_car.cpp

@@ -404,6 +404,8 @@ void car::make_package()
     cp.down_time = m_last_point.x;
     cp.z         = m_last_point.y;
 	cp.cell_index = m_cell_index;
+	pt.x = m_pt.x;
+	pt.y = m_pt.y;
 	
     upt_card_pos(cp, pt);