Commit 05460005 authored by limingbo's avatar limingbo

change filter by position stratgy and add startTime and endTime

parent a3a594e7
......@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8)
project(multi_traj)
set(CMAKE_BUILD_TYPE "Release")
#set(CMAKE_BUILD_TYPE "Debug")
message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})
set(CMAKE_CXX_STANDARD 14)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2023-02-09T16:55:42. -->
<!-- Written by QtCreator 4.5.2, 2023-02-10T18:03:44. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......@@ -209,7 +209,7 @@
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">multi_traj</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments">--base_dir=/home/juefx/temp/2069</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments">--base_dir=/home/juefx/workspace/multitraj/test/2464</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/juefx/workspace/multitraj/build-multitraj-Desktop-Release/apps</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
......
......@@ -249,6 +249,7 @@ void filterByPosition(
bool inPeriod = false;
uint64_t start = 0, end = 0;
vector<PointExport> filterdPeriod;
uint64_t currTime;
for(const PointExport& query : periodCloud.points){
int result_index;
float sqr_distance;
......@@ -274,8 +275,10 @@ void filterByPosition(
filterdPeriod.push_back(query);
}
}
currTime = query.info;
}
if(inPeriod){
end = currTime;
if(end - start > 1){
timePeriods.push_back(make_pair(start, end));
for(auto p : filterdPeriod){
......@@ -445,23 +448,6 @@ vector<CloseTrajInfo> crossFilter(
filterdPeriod.push_back(query);
}
}
// if(sqr_distance < Squared30){
// found = true;
// if(!inPeriod){
// start = query.info;
// inPeriod = true;
//// LOG(INFO) << setprecision(15) << "start: " << start;
// }
// }else if(sqr_distance > Squared40){
// if(inPeriod){
// end = query.info;
// inPeriod = false;
// timePeriods.push_back(make_pair(start, end));
//// LOG(INFO) << setprecision(15) << "end: " << end;
// }
// }
currTime = query.info;
}
if(inPeriod){
......
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