Skip to content
Snippets Groups Projects
Commit 2db3c8e5 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Make voteKF more precise

parent e55c847d
No related branches found
No related tags found
2 merge requests!54devel->main,!50Resolve "Bootstrap sequence"
...@@ -49,14 +49,13 @@ void ProcessorImu::preProcess() ...@@ -49,14 +49,13 @@ void ProcessorImu::preProcess()
bool ProcessorImu::voteForKeyFrame() const bool ProcessorImu::voteForKeyFrame() const
{ {
// time span // time span
if (getBuffer().back().ts_ - getBuffer().front().ts_ > params_motion_Imu_->max_time_span) if (getBuffer().back().ts_ - getBuffer().front().ts_ > params_motion_Imu_->max_time_span - params_motion_Imu_->time_tolerance)
{ {
WOLF_DEBUG( "PM: vote: time span" ); WOLF_DEBUG( "PM: vote: time span" );
return true; return true;
} }
// buffer length // buffer length
WOLF_INFO("buff size: ", getBuffer().size(), " max: ", params_motion_Imu_->max_buff_length); if (getBuffer().size() -1 > params_motion_Imu_->max_buff_length)
if (getBuffer().size() > params_motion_Imu_->max_buff_length)
{ {
WOLF_DEBUG( "PM: vote: buffer length" ); WOLF_DEBUG( "PM: vote: buffer length" );
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment