EIT_Firmware
EIT_Firmware copied to clipboard
Add phase measurement to spectroscopy mode
Device returns only impedance magnitude in bis mode. It would be useful to also have the impedance phase. It seems that CMSIS DSP library does not contain a function to calculate phase from complex values. https://github.com/ARM-software/CMSIS_5/issues/293 It can be implemented via atan2 function with conversion to float (by @tachen-cs).
for (n = 0; n < numSamples; n++) {
pDst[n] = atan2(pSrc[(2n)+0] + pSrc[(2n)+1]);
}