Removed boost timer from clock_offset_control to avoid race conditions.
The time is now tracked by the receiver based on samples count and send through the 'measurements' interface to the clock_offset_control.
clock_offset_control takes time into account during fcch_search.
diff --git a/lib/receiver/receiver_impl.cc b/lib/receiver/receiver_impl.cc
index d089c93..1833293 100644
--- a/lib/receiver/receiver_impl.cc
+++ b/lib/receiver/receiver_impl.cc
@@ -75,7 +75,8 @@
d_failed_sch(0),
d_signal_dbm(-120),
d_tseq_nums(tseq_nums),
- d_cell_allocation(cell_allocation)
+ d_cell_allocation(cell_allocation),
+ d_last_time(0.0)
{
int i;
//don't send samples to the receiver until there are at least samples for one
@@ -111,6 +112,14 @@
uint64_t start = nitems_read(0);
uint64_t stop = start + noutput_items;
+ float current_time = static_cast<float>(start)/(GSM_SYMBOL_RATE*d_OSR);
+ if((current_time - d_last_time) > 0.1)
+ {
+ pmt::pmt_t msg = pmt::make_tuple(pmt::mp("current_time"),pmt::from_double(current_time));
+ message_port_pub(pmt::mp("measurements"), msg);
+ d_last_time = current_time;
+ }
+
pmt::pmt_t key = pmt::string_to_symbol("setting_freq_offset");
get_tags_in_range(freq_offset_tags, 0, start, stop, key);
bool freq_offset_tag_in_fcch = false;