mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
glonass_lx_ca_dll_pll_c_aid_tracking better checks before enabling
preamble_timestamp_samples message port connection 1. Check for message port presence both in trk and nav blocks 2. Check for configuration property Tracking_xG.extend_correlation_ms Signed-off-by: Vlad P <vladisslav2011@gmail.com>
This commit is contained in:
parent
6228d198d2
commit
c1d68ffbb3
@ -104,6 +104,9 @@ Channel::Channel(const ConfigurationInterface* configuration,
|
||||
gnss_signal_ = Gnss_Signal(signal_str);
|
||||
|
||||
channel_msg_rx_ = channel_msg_receiver_make_cc(channel_fsm_, repeat_);
|
||||
|
||||
glonass_extend_correlation_ms_ = 0;
|
||||
glonass_extend_correlation_ms_ = configuration->property("Tracking_1G.extend_correlation_ms", 0) + configuration->property("Tracking_2G.extend_correlation_ms", 0);
|
||||
}
|
||||
|
||||
|
||||
@ -128,7 +131,7 @@ void Channel::connect(gr::top_block_sptr top_block)
|
||||
|
||||
// Message ports
|
||||
top_block->msg_connect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
||||
if ((trk_->get_right_block()->name() == "glonass_l1_ca_dll_pll_c_aid_tracking_cc") || (trk_->get_right_block()->name() == "glonass_l2_ca_dll_pll_c_aid_tracking_cc"))
|
||||
if (glonass_dll_pll_c_aid_tracking_check())
|
||||
{
|
||||
top_block->msg_connect(nav_->get_left_block(), pmt::mp("preamble_timestamp_samples"), trk_->get_right_block(), pmt::mp("preamble_timestamp_samples"));
|
||||
}
|
||||
@ -162,7 +165,7 @@ void Channel::disconnect(gr::top_block_sptr top_block)
|
||||
nav_->disconnect(top_block);
|
||||
|
||||
top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
||||
if ((trk_->get_right_block()->name() == "glonass_l1_ca_dll_pll_c_aid_tracking_cc") || (trk_->get_right_block()->name() == "glonass_l2_ca_dll_pll_c_aid_tracking_cc"))
|
||||
if (glonass_dll_pll_c_aid_tracking_check())
|
||||
{
|
||||
top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("preamble_timestamp_samples"), trk_->get_right_block(), pmt::mp("preamble_timestamp_samples"));
|
||||
}
|
||||
@ -270,3 +273,28 @@ void Channel::start_acquisition()
|
||||
}
|
||||
DLOG(INFO) << "Channel start_acquisition()";
|
||||
}
|
||||
|
||||
bool Channel::glonass_dll_pll_c_aid_tracking_check()
|
||||
{
|
||||
if (glonass_extend_correlation_ms_)
|
||||
{
|
||||
const pmt::pmt_t nav_ports_out = nav_->get_left_block()->message_ports_out();
|
||||
const pmt::pmt_t trk_ports_in = trk_->get_right_block()->message_ports_in();
|
||||
const pmt::pmt_t symbol = pmt::mp("preamble_timestamp_samples");
|
||||
for (unsigned k = 0; k < pmt::length(nav_ports_out); k++)
|
||||
{
|
||||
if (pmt::vector_ref(nav_ports_out, k) == symbol)
|
||||
{
|
||||
for (unsigned j = 0; j < pmt::length(trk_ports_in); j++)
|
||||
{
|
||||
if (pmt::vector_ref(trk_ports_in, j) == symbol)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ public:
|
||||
inline std::shared_ptr<TelemetryDecoderInterface> telemetry() const { return nav_; }
|
||||
|
||||
private:
|
||||
bool glonass_dll_pll_c_aid_tracking_check();
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
std::shared_ptr<AcquisitionInterface> acq_;
|
||||
std::shared_ptr<TrackingInterface> trk_;
|
||||
@ -109,6 +110,7 @@ private:
|
||||
bool connected_;
|
||||
bool repeat_;
|
||||
bool flag_enable_fpga_;
|
||||
int glonass_extend_correlation_ms_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user