Commit 6c75503a authored by alexander's avatar alexander

droptime >1000 clear

parent e27caad8
......@@ -130,7 +130,8 @@ int FusionAlgo::ifCanCheckNear(TOBJPtr& tObjPtr, TOBJPtr& o)
if (FConfPtr->mCreateFusionObjMode.find(o->mModeStr) == std::string::npos) {
return -1;
}
/*时间检查
/*时间检查-->可以根据实际情况放开
if (tObjPtr->mDevID == o->mDevID && abs((int)(tObjPtr->mMS - o->mMS)) >= 150) {
return false;
}
......@@ -144,7 +145,8 @@ int FusionAlgo::ifCanCheckNear(TOBJPtr& tObjPtr, TOBJPtr& o)
}
*/
//只能跟新目标融合,不可能跟旧目标融合???
//只能跟新目标融合,不可能跟旧目标融合,旧目标应该是生成了,旧目标应该是已经有融合id了
//为什么产生融合目标的时候,如果fObject->mFID为空,直接返回
if (tObjPtr->mIdx < o->mIdx) {
return -4;
}
......@@ -182,7 +184,7 @@ bool FusionAlgo::isTwoObjNear(TOBJPtr& tObjPtr, TOBJPtr& o, double dist)
return false;
}
} else {
if (dist > 2) {
if (dist > 2) {//这里估计要改,融合的时候有机动和之分
return false;
}
}
......
......@@ -328,7 +328,7 @@ void FusionDistributeTask::run()
continue;
}
STCheckNearItem item(tStoreObjPtr);
STCheckNearItem item(tStoreObjPtr);//保留检查点的位置和指针
checkNearTask0QueueSize = mClusterTask[0]->pushTrafficObj(item);
// ToForecast
......@@ -433,6 +433,10 @@ bool FusionDistributeTask::ifDropFrameTime(std::shared_ptr<TrafficObject>& tObjP
if (!tObjPtr) {
return true;
}
if(mCheckTObject.size() > 1000)
{
mCheckTObject.clear();
}
std::string key = tObjPtr->mDevIDStr + "-" + std::to_string(tObjPtr->mID);
auto iter = mCheckTObject.find(key);
if(iter != mCheckTObject.end()){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment