mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-30 06:52:58 +00:00
Added acquisition and tracking monitors
Added acquisition and tracking monitors to view intermediate outputs of GNSS-SDR from monitoring clients. Each monitor (acquisition, tracking, original monitor, and pvt) pushes its data to a different UDP port.
This commit is contained in:
committed by
Carles Fernandez
parent
c1ecd1d1be
commit
ed93af11ac
@@ -85,12 +85,14 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, fs_in_, samples_per_ms, code_length_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector("
|
||||
<< stream_to_vector_->unique_id() << ")";
|
||||
|
||||
@@ -78,12 +78,14 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
code_data_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_pilot_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, fs_in_, samples_per_ms, code_length_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector("
|
||||
<< stream_to_vector_->unique_id() << ")";
|
||||
|
||||
@@ -111,6 +111,8 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename",
|
||||
default_dump_filename);
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
code_ = std::vector<std::complex<float>>(code_length_);
|
||||
LOG(INFO) << "Vector Length: " << vector_length_
|
||||
<< ", Samples per ms: " << samples_per_ms
|
||||
@@ -123,7 +125,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, fs_in_,
|
||||
samples_per_ms, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_,
|
||||
vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector_quicksync("
|
||||
|
||||
@@ -77,6 +77,8 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename",
|
||||
default_dump_filename);
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
// -- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
@@ -93,7 +95,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_,
|
||||
fs_in_, samples_per_ms, code_length_, tong_init_val_,
|
||||
tong_max_val_, tong_max_dwells_, dump_, dump_filename_);
|
||||
tong_max_val_, tong_max_dwells_, dump_, dump_filename_, enable_monitor_output);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector("
|
||||
|
||||
@@ -94,6 +94,8 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
codeQ_ = std::vector<std::complex<float>>(vector_length_);
|
||||
both_signal_components = false;
|
||||
|
||||
bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
std::string sig_ = configuration_->property("Channel.signal", std::string("5X"));
|
||||
if (sig_.at(0) == '5' && sig_.at(1) == 'X')
|
||||
{
|
||||
@@ -104,7 +106,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_,
|
||||
doppler_max_, fs_in_, code_length_, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_, both_signal_components, CAF_window_hz_, Zero_padding);
|
||||
dump_, dump_filename_, both_signal_components, CAF_window_hz_, Zero_padding, enable_monitor_output);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
|
||||
max_dwells_ = configuration->property(role + ".max_dwells", 1);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
@@ -66,7 +67,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_,
|
||||
doppler_max_, doppler_min_, fs_in_, vector_length_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -100,6 +100,8 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
int samples_per_ms = round(code_length_);
|
||||
code_ = std::vector<std::complex<float>>(code_length_);
|
||||
/* Object relevant information for debugging */
|
||||
@@ -116,7 +118,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
|
||||
sampled_ms_, max_dwells_, doppler_max_, fs_in_,
|
||||
samples_per_ms, code_length_, bit_transition_flag_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_,
|
||||
code_length_ * folding_factor_);
|
||||
|
||||
@@ -67,6 +67,8 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
// -- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
@@ -79,7 +81,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
item_size_ = sizeof(gr_complex);
|
||||
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_,
|
||||
code_length_, code_length_, tong_init_val_, tong_max_val_, tong_max_dwells_,
|
||||
dump_, dump_filename_);
|
||||
dump_, dump_filename_, enable_monitor_output);
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
|
||||
|
||||
@@ -46,11 +46,12 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
|
||||
const std::string &dump_filename,
|
||||
bool both_signal_components_,
|
||||
int CAF_window_hz_,
|
||||
int Zero_padding_)
|
||||
int Zero_padding_,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr(
|
||||
new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_));
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +67,10 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
const std::string &dump_filename,
|
||||
bool both_signal_components_,
|
||||
int CAF_window_hz_,
|
||||
int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||
int Zero_padding_,
|
||||
bool enable_monitor_output) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -96,6 +98,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
d_buffer_count = 0;
|
||||
d_both_signal_components = both_signal_components_;
|
||||
d_CAF_window_hz = CAF_window_hz_;
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_inbuffer.reserve(d_fft_size);
|
||||
d_fft_code_I_A.reserve(d_fft_size);
|
||||
@@ -285,7 +288,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
|
||||
|
||||
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
/*
|
||||
* By J.Arribas, L.Esteve, M.Molina and M.Sales
|
||||
@@ -300,6 +303,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
*/
|
||||
|
||||
int acquisition_message = -1; // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int return_value = 0; // 0=Produces no Gnss_Synchro objects
|
||||
/* States: 0 Stop Channel
|
||||
* 1 Load the buffer until it reaches fft_size
|
||||
* 2 Acquisition algorithm
|
||||
@@ -726,6 +730,17 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
d_sample_counter += static_cast<uint64_t>(ninput_items[0]); // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
return_value = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
@@ -752,5 +767,5 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return return_value;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
|
||||
const std::string& dump_filename,
|
||||
bool both_signal_components_,
|
||||
int CAF_window_hz_,
|
||||
int Zero_padding_);
|
||||
int Zero_padding_,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition.
|
||||
@@ -186,7 +187,8 @@ private:
|
||||
const std::string& dump_filename,
|
||||
bool both_signal_components_,
|
||||
int CAF_window_hz_,
|
||||
int Zero_padding_);
|
||||
int Zero_padding_,
|
||||
bool enable_monitor_output);
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
@@ -198,7 +200,8 @@ private:
|
||||
const std::string& dump_filename,
|
||||
bool both_signal_components_,
|
||||
int CAF_window_hz_,
|
||||
int Zero_padding_);
|
||||
int Zero_padding_,
|
||||
bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
@@ -260,6 +263,7 @@ private:
|
||||
bool d_active;
|
||||
bool d_dump;
|
||||
bool d_both_signal_components;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H
|
||||
|
||||
@@ -37,11 +37,13 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, const std::string &dump_filename)
|
||||
bool dump,
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return galileo_pcps_8ms_acquisition_cc_sptr(
|
||||
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, dump, dump_filename));
|
||||
samples_per_code, dump, dump_filename, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +55,10 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string &dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)))
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -87,6 +90,8 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
d_doppler_step = 0;
|
||||
@@ -199,7 +204,7 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int32_t state)
|
||||
|
||||
int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
int32_t acquisition_message = -1; // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
@@ -380,6 +385,16 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@ galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition for
|
||||
@@ -174,7 +175,8 @@ private:
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
@@ -184,7 +186,8 @@ private:
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(
|
||||
gr_complex* fft_begin,
|
||||
@@ -230,6 +233,7 @@ private:
|
||||
|
||||
bool d_active;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H
|
||||
|
||||
@@ -71,7 +71,7 @@ pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
||||
|
||||
pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition",
|
||||
gr::io_signature::make(1, 1, conf_.it_size),
|
||||
gr::io_signature::make(0, 0, conf_.it_size))
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
@@ -385,6 +385,14 @@ void pcps_acquisition::send_positive_acquisition()
|
||||
{
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
}
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_acq_parameters.enable_monitor_output)
|
||||
{
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
d_monitor_queue.push(current_synchro_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -903,7 +911,7 @@ void pcps_acquisition::calculate_threshold()
|
||||
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items,
|
||||
gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
gr_vector_void_star& output_items)
|
||||
{
|
||||
/*
|
||||
* By J.Arribas, L.Esteve and M.Molina
|
||||
@@ -1010,5 +1018,22 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Send outputs to the monitor
|
||||
if (d_acq_parameters.enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
if (!d_monitor_queue.empty())
|
||||
{
|
||||
int num_gnss_synchro_objects = d_monitor_queue.size();
|
||||
for (int i = 0; i < num_gnss_synchro_objects; ++i) {
|
||||
Gnss_Synchro current_synchro_data = d_monitor_queue.front();
|
||||
d_monitor_queue.pop();
|
||||
*out[i] = current_synchro_data;
|
||||
}
|
||||
return num_gnss_synchro_objects;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <queue>
|
||||
|
||||
#if HAS_STD_SPAN
|
||||
#include <span>
|
||||
@@ -284,6 +285,8 @@ private:
|
||||
bool d_step_two;
|
||||
bool d_use_CFAR_algorithm_flag;
|
||||
bool d_dump;
|
||||
|
||||
std::queue<Gnss_Synchro> d_monitor_queue;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_ACQUISITION_H
|
||||
|
||||
@@ -63,7 +63,7 @@ pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(cons
|
||||
pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
|
||||
: gr::block("pcps_acquisition_fine_doppler_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
acq_parameters = conf_;
|
||||
@@ -482,7 +482,7 @@ void pcps_acquisition_fine_doppler_cc::set_state(int state)
|
||||
|
||||
int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
/*!
|
||||
* TODO: High sensitivity acquisition algorithm:
|
||||
@@ -498,6 +498,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
* S5. Negative_Acq: Send message and stop acq -> S0
|
||||
*/
|
||||
|
||||
int return_value = 0; // Number of Gnss_Syncro objects produced
|
||||
int samples_remaining;
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -585,6 +586,15 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
d_sample_counter += static_cast<uint64_t>(noutput_items); // sample counter
|
||||
consume_each(noutput_items);
|
||||
}
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (acq_parameters.enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
return_value = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
break;
|
||||
case 5: // Negative_Acq
|
||||
DLOG(INFO) << "negative acquisition";
|
||||
@@ -619,7 +629,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return return_value;
|
||||
}
|
||||
|
||||
void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size)
|
||||
|
||||
@@ -40,20 +40,20 @@ extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
const std::string &dump_filename)
|
||||
const std::string &dump_filename, bool enable_monitor_output)
|
||||
{
|
||||
return pcps_assisted_acquisition_cc_sptr(
|
||||
new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min,
|
||||
fs_in, samples_per_ms, dump, dump_filename));
|
||||
fs_in, samples_per_ms, dump, dump_filename, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
const std::string &dump_filename) : gr::block("pcps_assisted_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump, const std::string &dump_filename,
|
||||
bool enable_monitor_output) : gr::block("pcps_assisted_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -81,6 +81,8 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -334,7 +336,7 @@ int32_t pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_cons
|
||||
|
||||
int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
/*!
|
||||
* TODO: High sensitivity acquisition algorithm:
|
||||
@@ -428,6 +430,15 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
d_sample_counter += static_cast<uint64_t>(ninput_items[0]); // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
d_state = 0;
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
break;
|
||||
case 6: // Negative_Acq
|
||||
DLOG(INFO) << "negative acquisition";
|
||||
|
||||
@@ -67,7 +67,9 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int32_t doppler_min,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
bool dump, const std::string& dump_filename);
|
||||
bool dump,
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition.
|
||||
@@ -183,12 +185,12 @@ private:
|
||||
pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
@@ -242,6 +244,7 @@ private:
|
||||
bool d_active;
|
||||
bool d_disable_assist;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H
|
||||
|
||||
@@ -42,11 +42,13 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, const std::string &dump_filename)
|
||||
bool dump,
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return pcps_cccwsr_acquisition_cc_sptr(
|
||||
new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in,
|
||||
samples_per_ms, samples_per_code, dump, dump_filename));
|
||||
samples_per_ms, samples_per_code, dump, dump_filename, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -58,9 +60,10 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string &dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)))
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output) : gr::block("pcps_cccwsr_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -96,6 +99,8 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
d_doppler_step = 0;
|
||||
@@ -208,7 +213,7 @@ void pcps_cccwsr_acquisition_cc::set_state(int32_t state)
|
||||
|
||||
int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
int32_t acquisition_message = -1; // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
@@ -400,6 +405,16 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@@ -176,12 +177,12 @@ private:
|
||||
pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, const std::string& dump_filename);
|
||||
bool dump, const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, const std::string& dump_filename);
|
||||
bool dump, const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
@@ -231,6 +232,7 @@ private:
|
||||
|
||||
bool d_active;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H
|
||||
|
||||
@@ -61,11 +61,12 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string &dump_filename)
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return pcps_opencl_acquisition_cc_sptr(
|
||||
new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename));
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +79,10 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string &dump_filename) : gr::block("pcps_opencl_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)))
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output) : gr::block("pcps_opencl_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -122,6 +124,8 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
}
|
||||
|
||||
|
||||
@@ -658,7 +662,7 @@ void pcps_opencl_acquisition_cc::set_state(int state)
|
||||
|
||||
int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
int acquisition_message = -1; // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
switch (d_state)
|
||||
@@ -761,6 +765,16 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
||||
int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition.
|
||||
@@ -210,14 +211,16 @@ private:
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
pcps_opencl_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
@@ -290,6 +293,7 @@ private:
|
||||
bool d_active;
|
||||
bool d_core_working;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename)
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return pcps_quicksync_acquisition_cc_sptr(
|
||||
new pcps_quicksync_acquisition_cc(
|
||||
@@ -49,7 +50,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
fs_in, samples_per_ms,
|
||||
samples_per_code,
|
||||
bit_transition_flag,
|
||||
dump, dump_filename));
|
||||
dump, dump_filename,
|
||||
enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +62,10 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename) : gr::block("pcps_quicksync_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)))
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output) : gr::block("pcps_quicksync_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -104,6 +107,8 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||
d_signal_folded.reserve(d_fft_size);
|
||||
d_noise_floor_power = 0;
|
||||
@@ -228,7 +233,7 @@ void pcps_quicksync_acquisition_cc::set_state(int32_t state)
|
||||
|
||||
int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
gr_vector_void_star& output_items)
|
||||
{
|
||||
/*
|
||||
* By J.Arribas, L.Esteve and M.Molina
|
||||
@@ -507,6 +512,17 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
// DLOG(INFO) << "END CASE 2";
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@@ -199,7 +200,8 @@ private:
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
pcps_quicksync_acquisition_cc(uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
@@ -207,7 +209,8 @@ private:
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
@@ -261,6 +264,7 @@ private:
|
||||
bool d_bit_transition_flag;
|
||||
bool d_active;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H
|
||||
|
||||
@@ -58,11 +58,13 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump, const std::string &dump_filename)
|
||||
bool dump,
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output)
|
||||
{
|
||||
return pcps_tong_acquisition_cc_sptr(
|
||||
new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code,
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename));
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename, enable_monitor_output));
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +78,10 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
const std::string &dump_filename) : gr::block("pcps_tong_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)))
|
||||
const std::string &dump_filename,
|
||||
bool enable_monitor_output) : gr::block("pcps_tong_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
@@ -112,6 +115,8 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
d_doppler_step = 0;
|
||||
@@ -224,7 +229,7 @@ void pcps_tong_acquisition_cc::set_state(int32_t state)
|
||||
|
||||
int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
int32_t acquisition_message = -1; // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
@@ -401,6 +406,16 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
acquisition_message = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||
|
||||
// Copy and push current Gnss_Synchro to monitor queue
|
||||
if (d_enable_monitor_output)
|
||||
{
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,8 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
const std::string& dump_filename);
|
||||
const std::string& dump_filename,
|
||||
bool enable_monitor_output);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@@ -191,13 +192,13 @@ private:
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, const std::string& dump_filename);
|
||||
bool dump, const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, const std::string& dump_filename);
|
||||
bool dump, const std::string& dump_filename, bool enable_monitor_output);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
@@ -246,6 +247,7 @@ private:
|
||||
|
||||
bool d_active;
|
||||
bool d_dump;
|
||||
bool d_enable_monitor_output;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H
|
||||
|
||||
@@ -56,6 +56,7 @@ Acq_Conf::Acq_Conf()
|
||||
resampler_ratio = 1.0;
|
||||
resampled_fs = 0LL;
|
||||
resampler_latency_samples = 0U;
|
||||
enable_monitor_output = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +122,8 @@ void Acq_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
use_CFAR_algorithm_flag = false;
|
||||
}
|
||||
|
||||
enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
SetDerivedParams();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
bool blocking_on_standby; // enable it only for unit testing to avoid sample consume on idle status
|
||||
bool make_2_steps;
|
||||
bool use_automatic_resampler;
|
||||
bool enable_monitor_output;
|
||||
|
||||
private:
|
||||
void SetDerivedParams();
|
||||
|
||||
@@ -174,6 +174,10 @@ gr::basic_block_sptr Channel::get_left_block_trk()
|
||||
return trk_->get_left_block();
|
||||
}
|
||||
|
||||
gr::basic_block_sptr Channel::get_right_block_trk()
|
||||
{
|
||||
return trk_->get_right_block();
|
||||
}
|
||||
|
||||
gr::basic_block_sptr Channel::get_left_block_acq()
|
||||
{
|
||||
@@ -184,6 +188,10 @@ gr::basic_block_sptr Channel::get_left_block_acq()
|
||||
return acq_->get_left_block();
|
||||
}
|
||||
|
||||
gr::basic_block_sptr Channel::get_right_block_acq()
|
||||
{
|
||||
return acq_->get_right_block();
|
||||
}
|
||||
|
||||
gr::basic_block_sptr Channel::get_right_block()
|
||||
{
|
||||
|
||||
@@ -69,7 +69,9 @@ public:
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
gr::basic_block_sptr get_left_block_trk() override; //!< Gets the GNU Radio tracking block input pointer
|
||||
gr::basic_block_sptr get_right_block_trk() override; //!< Gets the GNU Radio tracking block output pointer
|
||||
gr::basic_block_sptr get_left_block_acq() override; //!< Gets the GNU Radio acquisition block input pointer
|
||||
gr::basic_block_sptr get_right_block_acq() override; //!< Gets the GNU Radio acquisition block output pointer
|
||||
gr::basic_block_sptr get_right_block() override; //!< Gets the GNU Radio channel block output pointer
|
||||
|
||||
inline std::string role() override { return role_; }
|
||||
|
||||
@@ -1664,6 +1664,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data.Flag_valid_symbol_output = false;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_pull_in_transitory == true)
|
||||
{
|
||||
@@ -1745,6 +1746,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
{
|
||||
clear_tracking_vars();
|
||||
d_state = 0; // loss-of-lock detected
|
||||
loss_of_lock = true; // Set the flag so that the negative indication can be generated
|
||||
current_synchro_data = *d_acquisition_gnss_synchro; // Fill in the Gnss_Synchro object with basic info
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1904,6 +1907,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
{
|
||||
clear_tracking_vars();
|
||||
d_state = 0; // loss-of-lock detected
|
||||
loss_of_lock = true; // Set the flag so that the negative indication can be generated
|
||||
current_synchro_data = *d_acquisition_gnss_synchro; // Fill in the Gnss_Synchro object with basic info
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1951,10 +1956,11 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
}
|
||||
consume_each(d_current_prn_length_samples);
|
||||
d_sample_counter += static_cast<uint64_t>(d_current_prn_length_samples);
|
||||
if (current_synchro_data.Flag_valid_symbol_output)
|
||||
if (current_synchro_data.Flag_valid_symbol_output || loss_of_lock)
|
||||
{
|
||||
current_synchro_data.fs = static_cast<int64_t>(d_trk_parameters.fs_in);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
*out[0] = current_synchro_data;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -283,6 +283,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
// process vars
|
||||
float carr_error_filt_hz = 0.0;
|
||||
float code_error_filt_chips = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
Tcp_Packet_Data tcp_data;
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
@@ -420,6 +421,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +435,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 4;
|
||||
}
|
||||
else
|
||||
@@ -524,7 +526,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
consume_each(d_current_prn_length_samples); // this is needed in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; // count for the processed samples
|
||||
|
||||
if (d_enable_tracking)
|
||||
if (d_enable_tracking || loss_of_lock)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -572,6 +572,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
double code_error_filt_secs_Ti = 0.0;
|
||||
double CURRENT_INTEGRATION_TIME_S = 0.0;
|
||||
double CORRECTED_INTEGRATION_TIME_S = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@@ -780,6 +781,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -791,7 +793,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
if (d_preamble_synchronized == true)
|
||||
{
|
||||
current_synchro_data.correlation_length_ms = d_extend_correlation_ms;
|
||||
|
||||
@@ -575,6 +575,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
double code_error_filt_secs_Ti = 0.0;
|
||||
double CURRENT_INTEGRATION_TIME_S = 0.0;
|
||||
double CORRECTED_INTEGRATION_TIME_S = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@@ -781,6 +782,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -793,7 +795,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
if (d_preamble_synchronized == true)
|
||||
{
|
||||
current_synchro_data.correlation_length_ms = d_extend_correlation_ms;
|
||||
|
||||
@@ -507,6 +507,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double carr_error_filt_hz = 0.0;
|
||||
double code_error_chips = 0.0;
|
||||
double code_error_filt_chips = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
@@ -628,6 +629,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -639,7 +641,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -571,6 +571,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
double code_error_filt_secs_Ti = 0.0;
|
||||
double CURRENT_INTEGRATION_TIME_S = 0.0;
|
||||
double CORRECTED_INTEGRATION_TIME_S = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@@ -779,6 +780,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -790,7 +792,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
if (d_preamble_synchronized == true)
|
||||
{
|
||||
current_synchro_data.correlation_length_ms = d_extend_correlation_ms;
|
||||
|
||||
@@ -573,6 +573,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
double code_error_filt_secs_Ti = 0.0;
|
||||
double CURRENT_INTEGRATION_TIME_S = 0.0;
|
||||
double CORRECTED_INTEGRATION_TIME_S = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@@ -779,6 +780,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -791,7 +793,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
if (d_preamble_synchronized == true)
|
||||
{
|
||||
current_synchro_data.correlation_length_ms = d_extend_correlation_ms;
|
||||
|
||||
@@ -509,6 +509,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double carr_error_filt_hz = 0.0;
|
||||
double code_error_chips = 0.0;
|
||||
double code_error_filt_chips = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
@@ -630,6 +631,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -641,7 +643,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -328,6 +328,8 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
double CORRECTED_INTEGRATION_TIME_S = 0.001;
|
||||
double dll_code_error_secs_Ti = 0.0;
|
||||
double carr_phase_error_secs_Ti = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
// Fill the acquisition data
|
||||
@@ -446,6 +448,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
check_carrier_phase_coherent_initialization();
|
||||
}
|
||||
@@ -458,7 +461,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
}
|
||||
else
|
||||
@@ -545,7 +548,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_correlation_length_samples; // count for the processed samples
|
||||
|
||||
if (d_enable_tracking)
|
||||
if (d_enable_tracking || loss_of_lock)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -621,6 +621,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
d_carr_phase_error_rad = 0.0;
|
||||
code_error_chips = 0.0;
|
||||
code_error_filt_chips = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
@@ -800,6 +801,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false;
|
||||
loss_of_lock = true;
|
||||
}
|
||||
}
|
||||
// ########### Output the tracking data to navigation and PVT ##########
|
||||
@@ -810,7 +812,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
|
||||
kf_iter++;
|
||||
|
||||
@@ -312,6 +312,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
float carr_error = 0.0;
|
||||
float code_error = 0.0;
|
||||
float code_nco = 0.0;
|
||||
bool loss_of_lock = false;
|
||||
|
||||
Tcp_Packet_Data tcp_data;
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
@@ -452,6 +453,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
|
||||
loss_of_lock = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,7 +468,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
}
|
||||
else
|
||||
@@ -561,7 +563,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
d_sample_counter_seconds = d_sample_counter_seconds + (static_cast<double>(d_current_prn_length_samples) / static_cast<double>(d_fs_in));
|
||||
d_sample_counter += d_current_prn_length_samples; // count for the processed samples
|
||||
|
||||
if (d_enable_tracking)
|
||||
if (d_enable_tracking || loss_of_lock)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user