summaryrefslogtreecommitdiff
path: root/src/lib/gsm_receiver_cf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gsm_receiver_cf.h')
-rw-r--r--src/lib/gsm_receiver_cf.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/lib/gsm_receiver_cf.h b/src/lib/gsm_receiver_cf.h
index 0e287c5..ccc99fb 100644
--- a/src/lib/gsm_receiver_cf.h
+++ b/src/lib/gsm_receiver_cf.h
@@ -65,20 +65,25 @@ class gsm_receiver_cf : public gr_block
{
private:
- gr_feval_dd *d_tuner;
const int d_OSR;
+ gr_complex d_sch_training_seq[N_SYNC_BITS]; //encoded training sequence of a SCH burst
+
+ gr_feval_dd *d_tuner;
int d_counter;
+
+ //variables used to store result of the find_fcch_burst fuction
int d_fcch_start_pos;
- float d_prev_freq_offset;
- circular_buffer_float d_phase_diff_buffer;
- double d_x_temp, d_x2_temp, d_mean;
- int d_fcch_count;
+ float d_freq_offset;
double d_best_sum;
- gr_complex d_sch_training_seq[N_SYNC_BITS]; //encoded training sequence of a SCH burst
+ int d_fcch_count;
+
+ bool d_first;
+// int d_fcch_count;
+// double d_x_temp, d_x2_temp, d_mean;
enum states {
- fcch_search, sch_search
+ first_fcch_search, next_fcch_search, sch_search, read_bcch
} d_state;
friend gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, int osr);
@@ -87,9 +92,12 @@ class gsm_receiver_cf : public gr_block
bool find_fcch_burst(const gr_complex *in, const int nitems);
double compute_freq_offset();
void set_frequency(double freq_offset);
+ inline float compute_phase_diff(gr_complex val1, gr_complex val2);
+
bool find_sch_burst(const gr_complex *in, const int nitems , float *out);
void gmsk_mapper(const int * input, gr_complex * gmsk_output, int ninput);
gr_complex correlation(const gr_complex * sequence, const gr_complex * input_signal, int ninput);
+
public:
~gsm_receiver_cf();
personal git repositories of Harald Welte. Your mileage may vary