514 std::vector<Step> list;
520 for (
size_t ch=0; ch<nch; ch += 9)
522 if (prev[ch]<0 ||
start[ch]<0)
525 const int16_t dist = (prev[ch]-
start[ch]+1024+offset)%1024;
526 const double step =
FindStep(ch, vec, roi, dist, map);
539 Step rc =
AverageSteps(list.begin(), list.begin()+list.size());;
552 const size_t skip = list.size()/10;
553 rc =
AverageSteps(list.begin()+skip, list.begin()+list.size()-skip);
558 for (
size_t ch=0; ch<nch; ch += 9)
560 const int16_t dist = (prev[ch]-
start[ch]+1024+offset)%1024;
static Step AverageSteps(const std::vector< Step >::iterator beg, const std::vector< Step >::iterator end)
static bool sort(const Step &s, const Step &r)
static void SubtractStep(const size_t ch0, const double avg, float *vec, int16_t roi, int32_t pos, const uint16_t *map=NULL)
static double FindStep(const size_t ch0, const float *vec, int16_t roi, const int16_t pos, const uint16_t *map=NULL)