@@ -135,6 +135,21 @@ void card_location_base::make_his_location(uint64_t t,const point & pt,bool bclo
}
//坐标点输入业务入口
+/*
+定位的逻辑处理
+车辆和人员都是走这个接口,然后分别进行处理。
+输入:
+vp 定位结果(硬件的原始位置数据)
+lm 定位消息缓存区,用于tof,pdoa
+is_v_map 是否为车辆地图
+输出:
+point m_v_point; //车辆定位系统的定位结果
+定位结果相关的一些成员变量如:x、y
+姿态:m_stat
+人员定位结果(包含人员地图定位结果(x、y)和车辆地图定位结果m_v_point)发给WEB的server
+车辆将定位结果(车辆地图定位结果)和姿态发送给WEB的server
+Added by zengminguo
+*/
void card_location_base::on_location(const std::vector<point>&vp, const std::vector<loc_message> &lm, bool is_v_map)
{
m_isVehicleMap = false;
@@ -206,7 +221,7 @@ void card_location_base::on_location(const std::vector<point>&vp, const std::vec
log_info("[help-battery] card_id=%d, battery=%d, val=%d", m_id, m_battery_value, val);
do_status(val);
- // 只有车辆定位点的数据才会判断超速
+ // 姿态判断
if (is_vehicle())
if (m_stat_last == ENUM_STATUS_BACK)
@@ -6,6 +6,8 @@
#include "point.h"
#include "common.h"
#include <boost/circular_buffer.hpp>
+#include "../algo/MovAvgFilter/CMovAvgFilter.h"
+#include "../algo/GaussianFilter/CGaussianFilter.h"
struct task;
template<typename T> struct zloop;
@@ -134,6 +136,9 @@ struct card_location_base:card,std::enable_shared_from_this<card_location_base>
bool m_enable_anti_collision = false;
int m_call_level = 0;
+ CMovAvgFilter m_mov_avg_filter;
+ CGaussianFilter m_gaussian_filter;
+
card_location_base()=default;
card_location_base(const std::string&type,uint32_t id,uint16_t dis,int16_t t,int32_t,int32_t,uint32_t );
@@ -87,6 +87,10 @@ namespace sys
return;
__CardPosList.copy( CardPosList );
+ // 发送卡的坐标等信息给WEB。人的数据和车的数据是合在一起的
+ // 分为两块数据,一块是车辆地图的数据,一块是人员地图的数据,合在一起发给web端,用不同
+ // 的字段进行区分。
+ // Added by zengminguo 20220424
std::string jsCardPos = __jsBuilder.BuildCardPos(CardPosList);
if(jsCardPos == ""){