First of all, thanks for answering all the earlier questions promptly.
While we are analyzing host code, specially mainwindows.cpp, we found so many "if sentences" that we do not understand clearly. Are there any thesis or theoretical reference manual to check "case by case" details?
Q1. In Vital sign host program of mainwindows.cpp, we don't know what is the following case?
--------------------------------------------------------------------------
if ( abs(heartRate_xCorr - 2*BreathingRate_FFT) > BACK_THRESH_BPM)
{
heartRateBuffer.insert(currIndex % HEART_RATE_EST_MEDIAN_FLT_SIZE, heartRate_xCorr);
IsvalueSelected = 1;
currIndex++;
}
Q2. In the vital sign host program of mainwindows.cpp, we do not understand what the following values mean.
#define NUM_PTS_DISTANCE_TIME_PLOT (256)
#define HEART_RATE_EST_MEDIAN_FLT_SIZE (200)
#define HEART_RATE_EST_FINAL_OUT_SIZE (200)
#define THRESH_HEART_CM (0.25)
#define THRESH_BREATH_CM (1.0)
#define BACK_THRESH_BPM (4)
#define BACK_THRESH_CM (0.20)
#define BACK_THRESH_4Hz_CM (0.15)
#define THRESH_BACK (30)
#define THRESH_DIFF_EST (20)
#define ALPHA_HEARTRATE_CM (0.2)
#define ALPHA_RCS (0.2)
#define APPLY_KALMAN_FILTER (0.0)
Q3. I don't understand this case happens.
// if (fabs(sumSignal - sumPeak) < 0.0001) // This condition would arise if the input signal amplitude is very low
float computeConfidenceMetric(float* pDataSpectrum,
uint16_t spectrumIndexStart,
uint16_t spectrumIndexEnd,
uint16_t peakIndex,
uint16_t numIndexAroundPeak)
{
..................
if (fabs(sumSignal - sumPeak) < 0.0001) // This condition would arise if the input signal amplitude is very low
{
confidenceMetric = 0;
}
else
{
confidenceMetric = sumPeak/(sumSignal - sumPeak);
}
return confidenceMetric;
}
Best Regards,
CH Cho