267 sort(medb.begin(), medb.end());
269 vector<float> devb(40);
270 for (
int i=0;
i<40;
i++)
273 sort(devb.begin(), devb.end());
275 double mb = (medb[19]+medb[20])/2;
276 double db = devb[27];
281 Warn(
"The median or the deviation of all board rates is zero... cannot calibrate.");
288 for (
int i=0; i<40; i++)
301 Out() <<
"Board: Median=" << mb <<
" Dev=" << db << endl;
330 out << setprecision(3);
351 out << setprecision(3);
352 out <<
"Next step would be 0... minimum threshold set to " <<
fThresholdMin;
364 Out() << (step>0 ?
" += " :
" -= ");
365 Out() << step <<
" (" << diff <<
")" << endl;
368 const uint32_t val[2] = { uint32_t(-1), diff };
int GetCurrentState() const
return the current state of the machine
void setQuality(int quality)
Adds some functionality to boost::posix_time::ptime for our needs.
std::ostream & Out() const
Time fCalibrationTimeStart
void SendCommandNB(const std::string &command)
int Warn(const std::string &str)
DimDescribedService fDimThreshold
int Info(const std::string &str)
vector< uint32_t > fThresholds