Commit da44014d authored by limingbo's avatar limingbo

test filterByPosition

parent 73ea90e3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2023-02-07T12:46:26. -->
<!-- Written by QtCreator 4.5.2, 2023-02-09T13:22:15. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -224,22 +224,24 @@ void filterByPosition(
octree.approxNearestSearch(query, result_index, sqr_distance);
if(sqr_distance < Squared30){
hitCnt++;
aroundIndexVec.push_back(make_pair(tarRetIndex, tarPeriodIndex));
break;
}
}
if((float)hitCnt / tarPeriodCloud.size() > 0.8){
aroundIndexVec.push_back(make_pair(tarRetIndex, tarPeriodIndex));
}
// if((float)hitCnt / tarPeriodCloud.size() > 0.8){
// aroundIndexVec.push_back(make_pair(tarRetIndex, tarPeriodIndex));
// }
}
}
pair<size_t, size_t> longestIndex = make_pair(retIndex, periodIndex);
uint32_t longestPeriod = period.second - period.first;
// LOG(INFO) << setprecision(15) << "filterByPosition src: " << oneRet.index
// << " start: " << period.first << " period: " << longestPeriod;
LOG(INFO) << setprecision(15) << "filterByPosition src: " << oneRet.index
<< " start: " << period.first << " period: " << longestPeriod;
for(auto index : aroundIndexVec){
auto aroundPeriod = ret.at(index.first).periods.at(index.second);
uint32_t periodDuration = aroundPeriod.second - aroundPeriod.first;
// LOG(INFO) << setprecision(15) << "tar: " << ret.at(index.first).index
// << " start: " << aroundPeriod.first << " period: " << periodDuration;
LOG(INFO) << setprecision(15) << "tar: " << ret.at(index.first).index
<< " start: " << aroundPeriod.first << " period: " << periodDuration;
if(periodDuration > longestPeriod){
longestPeriod = periodDuration;
longestIndex = index;
......
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