1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-16 13:10:35 +00:00

Extended correlator GPS L1

This commit is contained in:
Antonio Ramos 2018-03-16 17:40:24 +01:00
parent a7737d55da
commit f2fe8e9d0d
3 changed files with 49 additions and 38 deletions

View File

@ -56,19 +56,19 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
std::string dump_filename; std::string dump_filename;
std::string item_type; std::string item_type;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
float pll_bw_hz;
float dll_bw_hz;
float early_late_space_chips;
item_type = configuration->property(role + ".item_type", default_item_type); item_type = configuration->property(role + ".item_type", default_item_type);
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump = configuration->property(role + ".dump", false); dump = configuration->property(role + ".dump", false);
unified_ = configuration->property(role + ".unified", false); unified_ = configuration->property(role + ".unified", false);
pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz); if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz);
dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz); if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused!
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
@ -88,12 +88,12 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
dump_filename, dump_filename,
pll_bw_hz, pll_bw_hz,
dll_bw_hz, dll_bw_hz,
pll_bw_hz, pll_bw_narrow_hz,
dll_bw_hz, dll_bw_narrow_hz,
early_late_space_chips,
early_late_space_chips,
early_late_space_chips, early_late_space_chips,
early_late_space_chips, early_late_space_chips,
early_late_space_narrow_chips,
early_late_space_narrow_chips,
symbols_extended_correlator, symbols_extended_correlator,
false, false,
'G', sig_); 'G', sig_);

View File

@ -126,6 +126,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(
// initialize internal vars // initialize internal vars
d_dump = dump; d_dump = dump;
d_veml = false; d_veml = false;
d_synchonizing = false;
d_track_pilot = track_pilot; d_track_pilot = track_pilot;
d_fs_in = fs_in; d_fs_in = fs_in;
d_vector_length = vector_length; d_vector_length = vector_length;
@ -533,6 +534,7 @@ void dll_pll_veml_tracking::start_tracking()
// enable tracking pull-in // enable tracking pull-in
d_state = 1; d_state = 1;
d_synchonizing = false;
d_Prompt_buffer_deque.clear(); d_Prompt_buffer_deque.clear();
d_last_prompt = gr_complex(0.0, 0.0); d_last_prompt = gr_complex(0.0, 0.0);
LOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz LOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
@ -1008,22 +1010,34 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
} }
else //Signal does not have secondary code. Search a bit transition by sign change else //Signal does not have secondary code. Search a bit transition by sign change
{ {
if (d_current_symbol == (d_symbols_per_bit - 1)) if (d_synchonizing)
{ {
next_state = true; if (d_Prompt->real() * d_last_prompt.real() > 0.0)
} {
else if (d_current_symbol > 0) d_current_symbol++;
{ }
d_current_symbol++; else if (d_current_symbol > d_symbols_per_bit)
{
d_synchonizing = false;
d_current_symbol = 1;
}
else
{
d_current_symbol = 1;
d_last_prompt = *d_Prompt;
}
} }
else if (d_last_prompt.real() != 0.0) else if (d_last_prompt.real() != 0.0)
{ {
if (d_Prompt->real() * d_last_prompt.real() < 0.0) d_current_symbol++;
{ if (d_current_symbol == d_symbols_per_bit) next_state = true;
d_current_symbol = 1; }
} else
{
d_last_prompt = *d_Prompt;
d_synchonizing = true;
d_current_symbol = 1;
} }
d_last_prompt = *d_Prompt;
} }
if (next_state) if (next_state)
{ // reset extended correlator { // reset extended correlator
@ -1035,24 +1049,21 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
d_last_prompt = gr_complex(0.0, 0.0); d_last_prompt = gr_complex(0.0, 0.0);
d_Prompt_buffer_deque.clear(); d_Prompt_buffer_deque.clear();
d_current_symbol = 0; d_current_symbol = 0;
d_synchonizing = false;
// Set narrow taps delay values [chips] // Set narrow taps delay values [chips]
if (d_secondary) d_code_loop_filter.set_DLL_BW(d_dll_bw_narrow_hz);
d_carrier_loop_filter.set_PLL_BW(d_pll_bw_narrow_hz);
if (d_veml)
{ {
d_code_loop_filter.set_DLL_BW(d_dll_bw_narrow_hz); d_local_code_shift_chips[0] = -d_very_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
d_carrier_loop_filter.set_PLL_BW(d_pll_bw_narrow_hz); d_local_code_shift_chips[1] = -d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
if (d_veml) d_local_code_shift_chips[3] = d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
{ d_local_code_shift_chips[4] = d_very_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
d_local_code_shift_chips[0] = -d_very_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip); }
d_local_code_shift_chips[1] = -d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip); else
d_local_code_shift_chips[3] = d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip); {
d_local_code_shift_chips[4] = d_very_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip); d_local_code_shift_chips[0] = -d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
} d_local_code_shift_chips[2] = d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
else
{
d_local_code_shift_chips[0] = -d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
d_local_code_shift_chips[2] = d_early_late_spc_narrow_chips * static_cast<float>(d_code_samples_per_chip);
}
} }
// UPDATE INTEGRATION TIME // UPDATE INTEGRATION TIME

View File

@ -143,7 +143,7 @@ private:
//tracking state machine //tracking state machine
int d_state; int d_state;
bool d_synchonizing;
//Integration period in samples //Integration period in samples
int d_correlation_length_ms; int d_correlation_length_ms;
int d_n_correlator_taps; int d_n_correlator_taps;