12-03-2008

Now that IQ demodulation is working, it’s on to CORDIC. The trick is to try and get this done in a reasonable amount of time. If it’s not possible then I’ll have to explore other options for computing atan2. I only need accuracy to 0.1 degrees so that may help a bit.

Update: 2:05 PM
It’s looking like using the dot product to get the angle between vectors might be a more fruitful path. It jumps straight to the angle between vectors, which is what we want, and looks like it might be quicker to calculate. The only issue is that I really need the two vectors to be unit vectors because I don’t want to have to compute the magnitude and do division. Hmm, simulation time…

Update: 6:00 PM
Good news is that computing the magnitude and doing the division will be much faster than I thought. Bad news is that it’s not computing the angle properly. The angle should be:

$$Large theta=cos^{-1}(mathbf{frac{a cdot b}{|a| |b|}})$$

but the answer is different when I compute atan2 of the two vectors and subtract them. I’m sure I’m doing something silly but it’s one of those things you have to put down for a little while so off to home I go.