Hi,
When I saw the source code of the vital signs lab, something was confused.
The question is that the LSB of the frame periodicity in sdk user guide is 1 ms, while in the source code it becomes 5ns, which one is correct?
And if it equals to 5ns, the spectral estimation based on the number of peaks will be confused, since the obj->peakDistanceHeart_Min is to large.
numPeaksHeart = find_Peaks(obj->tempCircularBuff, float_type, pPeakLocsHeart,obj->pPeakValues, 0, circular_Buffer_size_heart - 1);
if (numPeaksHeart != 0)
{
numPeaksHeart = filterPeaksWfm(pPeakLocsHeart, pPeakLocsValid, numPeaksHeart, obj->peakDistanceHeart_Min, obj->peakDistanceHeart_Max);
}
obj->peakDistanceHeart_Min = (uint16_t) obj->samplingFreq_Hz/(obj->heart_endFreq_Hz);
Thanks for your help!
Regards,
Hengyang Fang