Fix: protections in txtime_setter against late bursts and bursts in too distant future.
Fixing bursts in too distant future is a bit problematic and better way than just looking at tx_time difference from current time would be desirable. This way of fixing that issue can still cause that tx part will do nothing for about 10 seconds (after switching frequency from a BTS1 (with fn1) to BTS2 (with fn2) when fn1>fn2).
This commit is contained in:
parent
f849fafd92
commit
ba8b0a95d3
|
@ -103,11 +103,22 @@ namespace gr {
|
|||
txtime_spec = txtime_spec - d_delay_correction;
|
||||
txtime_spec = txtime_spec - d_timing_advance;
|
||||
|
||||
pmt::pmt_t tags_dict = pmt::dict_add(pmt::make_dict(), pmt::intern("tx_time"), pmt::make_tuple(pmt::from_uint64(txtime_spec.get_full_secs()),pmt::from_double(txtime_spec.get_frac_secs())));
|
||||
tags_dict = pmt::dict_add(tags_dict, pmt::intern("fn"), pmt::from_uint64(frame_nr));
|
||||
tags_dict = pmt::dict_add(tags_dict, pmt::intern("ts"), pmt::from_uint64(ts_num));
|
||||
pmt::pmt_t new_msg = pmt::cons(tags_dict, pmt::cdr(burst));
|
||||
message_port_pub(pmt::intern("bursts_out"), new_msg);
|
||||
if(txtime_spec <= time_spec_t(d_time_hint.first, d_time_hint.second))
|
||||
{
|
||||
std::cout << "lB" << std::flush;
|
||||
}
|
||||
else if(txtime_spec > time_spec_t(d_time_hint.first, d_time_hint.second)+10.0)
|
||||
{
|
||||
std::cout << "eB" << std::flush;
|
||||
}
|
||||
else
|
||||
{
|
||||
pmt::pmt_t tags_dict = pmt::dict_add(pmt::make_dict(), pmt::intern("tx_time"), pmt::make_tuple(pmt::from_uint64(txtime_spec.get_full_secs()),pmt::from_double(txtime_spec.get_frac_secs())));
|
||||
tags_dict = pmt::dict_add(tags_dict, pmt::intern("fn"), pmt::from_uint64(frame_nr));
|
||||
tags_dict = pmt::dict_add(tags_dict, pmt::intern("ts"), pmt::from_uint64(ts_num));
|
||||
pmt::pmt_t new_msg = pmt::cons(tags_dict, pmt::cdr(burst));
|
||||
message_port_pub(pmt::intern("bursts_out"), new_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue