Hello!
I have been trying to understand the equation used to calculate SpO2 in the library:
`void SpO2Calculator::update(float irACValue, float redACValue, bool beatDetected)
{
irACValueSqSum += irACValue * irACValue;
redACValueSqSum += redACValue * redACValue;
++samplesRecorded;
if (beatDetected) {
++beatsDetectedNum;
if (beatsDetectedNum == CALCULATE_EVERY_N_BEATS) {
float acSqRatio = 100.0 * log(redACValueSqSum/samplesRecorded) / log(irACValueSqSum/samplesRecorded);
uint8_t index = 0;
if (acSqRatio > 66) {
index = (uint8_t)acSqRatio - 66;
} else if (acSqRatio > 50) {
index = (uint8_t)acSqRatio - 50;
}
reset();
spO2 = spO2LUT[index];
}
}
}`
I am currently stuck trying to understand why a root for each of the mean squares of IR and R was not included in the log equation used to determine ac square ratio, despite presumably referencing the log of root mean square method from A Single-Chip Pulsoximeter Design Using the MSP430 application report.
An explanation would be appreciated.