Commit da44014d authored by limingbo's avatar limingbo

test filterByPosition

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