Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phase measurement to spectroscopy mode #11

Open
DuzaBF opened this issue Dec 13, 2021 · 0 comments
Open

Add phase measurement to spectroscopy mode #11

DuzaBF opened this issue Dec 13, 2021 · 0 comments

Comments

@DuzaBF
Copy link

DuzaBF commented Dec 13, 2021

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. ARM-software/CMSIS_5#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]);
} 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant