Commit 50cc88e1 authored by limingbo's avatar limingbo

test filterByPosition

parent cb10f4fc
...@@ -222,7 +222,7 @@ void filterByPosition( ...@@ -222,7 +222,7 @@ void filterByPosition(
if(sqr_distance < Squared30){ if(sqr_distance < Squared30){
hitCnt++; hitCnt++;
} }
if(hitCnt / tarPeriodCloud->size() < 0.8){ if(hitCnt / tarPeriodCloud.size() < 0.8){
aroundIndexVec.push_back(make_pair(tarRetIndex, tarPeriodIndex)); aroundIndexVec.push_back(make_pair(tarRetIndex, tarPeriodIndex));
} }
} }
...@@ -230,13 +230,13 @@ void filterByPosition( ...@@ -230,13 +230,13 @@ void filterByPosition(
} }
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