1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-18 16:15:21 +00:00
This commit is contained in:
Carles Fernandez
2018-12-03 22:08:19 +01:00
parent 1743a773b5
commit 327fec627c
80 changed files with 327 additions and 649 deletions

View File

@@ -653,17 +653,14 @@ bool dll_pll_veml_tracking::acquire_secondary()
{
return true;
}
else
{
return false;
}
return false;
}
bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_time_s)
{
// ####### CN0 ESTIMATION AND LOCK DETECTORS ######
if (d_cn0_estimation_counter < trk_parameters.cn0_samples)
{
// fill buffer with prompt correlator output values
@@ -671,35 +668,29 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
d_cn0_estimation_counter++;
return true;
}
d_cn0_estimation_counter = 0;
// Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s);
// Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples);
// Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min)
{
d_carrier_lock_fail_counter++;
}
else
{
d_cn0_estimation_counter = 0;
// Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s);
// Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples);
// Loss of lock detection
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min)
{
d_carrier_lock_fail_counter++;
}
else
{
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
}
if (d_carrier_lock_fail_counter > trk_parameters.max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;
return false;
}
else
{
return true;
}
if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
}
if (d_carrier_lock_fail_counter > trk_parameters.max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;
return false;
}
return true;
}

View File

@@ -64,7 +64,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking
int64_t fs_in,
uint32_t vector_length,
bool dump,
const std::string& dump_filename,
const std::string &dump_filename,
float pll_bw_hz,
float dll_bw_hz,
float early_late_space_chips,
@@ -544,8 +544,6 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
{
return 1;
}
else
{
return 0;
}
return 0;
}

View File

@@ -905,8 +905,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
{
return 1;
}
else
{
return 0;
}
return 0;
}

View File

@@ -906,8 +906,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
{
return 1;
}
else
{
return 0;
}
return 0;
}

View File

@@ -62,7 +62,7 @@ gps_l1_ca_tcp_connector_make_tracking_cc(
int64_t fs_in,
uint32_t vector_length,
bool dump,
const std::string& dump_filename,
const std::string &dump_filename,
float early_late_space_chips,
size_t port_ch0)
{
@@ -583,8 +583,6 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
{
return 1;
}
else
{
return 0;
}
return 0;
}