mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Extended correlator GPS L1
This commit is contained in:
parent
a7737d55da
commit
f2fe8e9d0d
@ -56,19 +56,19 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
std::string dump_filename;
|
||||
std::string item_type;
|
||||
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);
|
||||
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump = configuration->property(role + ".dump", 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);
|
||||
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);
|
||||
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";
|
||||
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));
|
||||
@ -88,12 +88,12 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
dump_filename,
|
||||
pll_bw_hz,
|
||||
dll_bw_hz,
|
||||
pll_bw_hz,
|
||||
dll_bw_hz,
|
||||
early_late_space_chips,
|
||||
early_late_space_chips,
|
||||
pll_bw_narrow_hz,
|
||||
dll_bw_narrow_hz,
|
||||
early_late_space_chips,
|
||||
early_late_space_chips,
|
||||
early_late_space_narrow_chips,
|
||||
early_late_space_narrow_chips,
|
||||
symbols_extended_correlator,
|
||||
false,
|
||||
'G', sig_);
|
||||
|
@ -126,6 +126,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_veml = false;
|
||||
d_synchonizing = false;
|
||||
d_track_pilot = track_pilot;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
@ -533,6 +534,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
|
||||
// enable tracking pull-in
|
||||
d_state = 1;
|
||||
d_synchonizing = false;
|
||||
d_Prompt_buffer_deque.clear();
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
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
|
||||
{
|
||||
if (d_current_symbol == (d_symbols_per_bit - 1))
|
||||
if (d_synchonizing)
|
||||
{
|
||||
next_state = true;
|
||||
}
|
||||
else if (d_current_symbol > 0)
|
||||
{
|
||||
d_current_symbol++;
|
||||
if (d_Prompt->real() * d_last_prompt.real() > 0.0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (d_Prompt->real() * d_last_prompt.real() < 0.0)
|
||||
{
|
||||
d_current_symbol = 1;
|
||||
}
|
||||
d_current_symbol++;
|
||||
if (d_current_symbol == d_symbols_per_bit) next_state = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_last_prompt = *d_Prompt;
|
||||
d_synchonizing = true;
|
||||
d_current_symbol = 1;
|
||||
}
|
||||
d_last_prompt = *d_Prompt;
|
||||
}
|
||||
if (next_state)
|
||||
{ // 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_Prompt_buffer_deque.clear();
|
||||
d_current_symbol = 0;
|
||||
|
||||
d_synchonizing = false;
|
||||
// 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_carrier_loop_filter.set_PLL_BW(d_pll_bw_narrow_hz);
|
||||
if (d_veml)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
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);
|
||||
}
|
||||
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
|
||||
|
@ -143,7 +143,7 @@ private:
|
||||
|
||||
//tracking state machine
|
||||
int d_state;
|
||||
|
||||
bool d_synchonizing;
|
||||
//Integration period in samples
|
||||
int d_correlation_length_ms;
|
||||
int d_n_correlator_taps;
|
||||
|
Loading…
Reference in New Issue
Block a user