Re: Calculate Phaseshift ??
Hi Minoss,
I assume the two sine waves are the same frequency ?
Are they sampled at the same sample rate ?
If so, you can:
a) Detect zero-crossings of the two sine waves (consecutive negative
and positive samples), then count the number of samples in between
of the two sine waves zero crossings.
b) Use FFT or Goertzel's algorithm (look for this term on the web).
In case you are in reasonably low-noise environment, the first method
should be fine. In case you are in a noisy environment, you could repeat
the first method X times and then average the result you get... In fact
the second method should probably never be used for the problem you
posed