OK, I've got it.
Thank you for your help.

Cheers,
Zhenhua


2014-03-04 10:28 GMT+08:00 Tom Tsou <t...@tsou.cc>:

> On Mon, Mar 3, 2014 at 8:32 PM, zhenhua han <hzhua...@gmail.com> wrote:
> > I'm reading the code of Airprobe and I found this function.
> >
> > double gsm_receiver_cf::compute_freq_offset(const gr_complex * input,
> > unsigned first_sample, unsigned last_sample)
> >
> ~
> >
> > It calculates the frequency offset with "freq_offset = phase_offset *
> > 1625000.0 / (12.0 * M_PI);" I guess the (1625000.0/12*pi) equals
> > (1625000/6)/(2pi) and 1625/6 kbit/s is the modulation rate of GSM.
> >
> > So, what is the principle of this calculation? How to calculate the
> > freq_offset with phase_offset. I tried some derivation but failed. Can
> > anyone help me to find out the derivation ?
>
> The offset is derived assuming the signal is a constant tone. The code
> is averaging the phase shift between subsequent samples in a burst.
> Frequency is the first derivative of phase with respect to time, so
> the phase shift multiplied by the sample rate will give you the
> frequency of the tone.
>
>   -TT
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to