|
From: | Robert McGwier |
Subject: | Re: [Discuss-gnuradio] pll_refout_cc - finding optimum alpha & beta ?? |
Date: | Fri, 17 Mar 2006 14:24:23 -0500 |
User-agent: | Thunderbird 1.5 (Windows/20051201) |
Matt Ettus wrote:
It is irrelevant to the oscillator if the phase angle is between 0 and 2pi or -pi, pi since the transcendental functions will handle either. Having it from -pi, pi is correct in this case because our phase error will be from -pi to pi, or frequency per sample will be from -pi,pi. The original function is correct.It just seeemd strange to me that a very large number, d_freq, which is bounds limited to between d_min_freq and d_max_freq, is inside a function trying to limit it's output to between +PI and -PI. if(100e3 > M_PI)return(100e3-M_TWOPI)or 99993.7168... error can get close to zero, but frequency will never be less than d_freq_min.d_freq is not in Hz. It needs to be in radians per sample, which should always be less than PI. Matt
Bob -- AMSAT VP Engineering. Member: ARRL, AMSAT-DL, TAPR, Packrats, NJQRP/AMQRP, QRP ARCI, QCWA, FRC. ARRL SDR Wrk Grp Chairman Laziness is the number one inspiration for ingenuity. Guilty as charged!
[Prev in Thread] | Current Thread | [Next in Thread] |