This doesn’t seem logical to me. Shouldn’t the it be “d_freq =
d_max_freq”
in the if statement and “d_freq = d_min_freq” in the else if statement?
The frequency_limit() function has it the way I stated
void
gri_control_loop::frequency_limit()
{
if (d_freq > d_max_freq)
d_freq = d_max_freq;
else if (d_freq < d_min_freq)
d_freq = d_min_freq;
}
Yes, that it s a bit odd. It’s due to the historical nature of that
loop. We wanted the frequency to wrap around in some of the early
loops as opposed to just railing against the edges. I think the idea
is to let it keep searching in the bandwidth for a lock.
Now, that might not be the right answer. I’m not entirely sure what
is, though. If you just rail it against the max or min frequency,
you’re just sitting there doing nothing. Is that better or worse than
forcing it around to the other side? Frankly, if the frequency of the
signal that you are trying to track is outside of the loop, you’re
kind of hosed anyways. Would holding it stable at the max/min be more
appropriate?
Tom
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.