mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
73a283b920
@ -103,12 +103,12 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / BEIDOU_B1I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / BEIDOU_B1I_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(BEIDOU_B1I_CODE_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(BEIDOU_B1I_CODE_PERIOD_S * 1000.0);
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
|
@ -101,12 +101,12 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / BEIDOU_B3I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / BEIDOU_B3I_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(BEIDOU_B3I_CODE_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(BEIDOU_B3I_CODE_PERIOD_S * 1000.0);
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
|
@ -81,7 +81,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
|
@ -96,10 +96,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > GALILEO_E1_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GALILEO_E1_OPT_ACQ_FS_SPS)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E1_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E1_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E1_OPT_ACQ_FS_SPS);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E1_OPT_ACQ_FS_SPS;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -108,16 +108,16 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast<int>(acq_parameters_.resampler_ratio);
|
||||
}
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E1_CODE_PERIOD_MS);
|
||||
|
@ -81,7 +81,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); // could be true in future versions
|
||||
|
||||
// Find number of samples per spreading code (4 ms)
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.code_length = code_length;
|
||||
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
@ -95,7 +95,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
acq_parameters.device_name = device_name;
|
||||
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(fs_in)));
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast<float>(fs_in)));
|
||||
|
||||
// compute all the GALILEO E1 PRN Codes (this is done only once in the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
@ -80,7 +80,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
|
@ -68,7 +68,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
|
||||
/* --- Find number of samples per spreading code (4 ms) -----------------*/
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
int samples_per_ms = round(code_length_ / 4.0);
|
||||
|
||||
|
@ -84,7 +84,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
|
@ -90,7 +90,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
|
||||
//--- Find number of samples per spreading code (1ms)-------------------------
|
||||
code_length_ = round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
code_length_ = round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
|
@ -93,10 +93,10 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > GALILEO_E5A_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GALILEO_E5A_OPT_ACQ_FS_SPS)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E5A_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E5A_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E5A_OPT_ACQ_FS_SPS);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E5A_OPT_ACQ_FS_SPS;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -106,21 +106,21 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code (1ms)-------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
@ -82,7 +82,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
acq_pilot_ = false;
|
||||
}
|
||||
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.code_length = code_length;
|
||||
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
@ -96,7 +96,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(fs_in)));
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast<float>(fs_in)));
|
||||
|
||||
// compute all the GALILEO E5 PRN Codes (this is done only once in the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
@ -62,7 +62,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in)));
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters.fs_in)));
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
@ -85,7 +85,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@ -108,7 +108,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
acq_parameters.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters.ms_per_code = 1;
|
||||
acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast<float>(GLONASS_L1_CA_CODE_PERIOD * 1000.0);
|
||||
acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast<float>(GLONASS_L1_CA_CODE_PERIOD_S * 1000.0);
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
|
@ -61,7 +61,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L2_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in)));
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L2_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters.fs_in)));
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
@ -84,7 +84,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@ -107,7 +107,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
acq_parameters.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters.ms_per_code = 1;
|
||||
acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast<float>(GLONASS_L2_CA_CODE_PERIOD * 1000.0);
|
||||
acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast<float>(GLONASS_L2_CA_CODE_PERIOD_S * 1000.0);
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
|
@ -96,10 +96,10 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > GPS_L1_CA_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GPS_L1_CA_OPT_ACQ_FS_SPS)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L1_CA_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L1_CA_OPT_ACQ_FS_SPS);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -108,20 +108,20 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast<int>(acq_parameters_.resampler_ratio);
|
||||
}
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L1_CA_CODE_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L1_CA_CODE_PERIOD_S * 1000.0);
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
|
@ -59,7 +59,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in)));
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters.fs_in)));
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
@ -78,7 +78,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
acq_parameters.blocking_on_standby = configuration->property(role + ".blocking_on_standby", false);
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
acq_parameters.samples_per_ms = vector_length_;
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
|
@ -76,7 +76,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms;
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||
@ -88,7 +88,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
acq_parameters.device_name = device_name;
|
||||
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(fs_in)));
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(fs_in)));
|
||||
|
||||
// compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
@ -68,7 +68,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
code_ = std::make_shared<std::complex<float>>(vector_length_);
|
||||
|
||||
|
@ -81,7 +81,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
default_dump_filename);
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
|
@ -66,7 +66,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
/* Calculate the folding factor value based on the calculations */
|
||||
auto temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
|
@ -72,7 +72,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
|
@ -99,10 +99,10 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > GPS_L2C_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GPS_L2C_OPT_ACQ_FS_SPS)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L2C_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L2C_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L2C_OPT_ACQ_FS_SPS);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L2C_OPT_ACQ_FS_SPS;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -112,20 +112,20 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L2_M_CODE_RATE_HZ / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L2_M_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L2_M_PERIOD_S * 1000.0);
|
||||
vector_length_ = acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
|
@ -75,7 +75,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
|
||||
acq_parameters.sampled_ms = 20;
|
||||
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f(static_cast<float>(code_length)));
|
||||
@ -90,7 +90,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
|
||||
acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
acq_parameters.excludelimit = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / GPS_L2_M_CODE_RATE_HZ));
|
||||
acq_parameters.excludelimit = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / GPS_L2_M_CODE_RATE_CPS));
|
||||
|
||||
// compute all the GPS L2C PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
@ -106,10 +106,10 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > GPS_L5_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GPS_L5_OPT_ACQ_FS_SPS)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L5_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L5_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GPS_L5_OPT_ACQ_FS_SPS);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GPS_L5_OPT_ACQ_FS_SPS;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -119,20 +119,20 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5I_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5I_PERIOD_S * 1000.0);
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
|
@ -79,7 +79,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
acq_parameters.sampled_ms = sampled_ms;
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_CPS / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||
@ -92,7 +92,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(fs_in)));
|
||||
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast<float>(fs_in)));
|
||||
|
||||
// compute all the GPS L5 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
|
@ -290,7 +290,7 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF()
|
||||
}
|
||||
|
||||
// -- - Find 1 chip wide code phase exclude range around the peak
|
||||
uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(this->d_fs_in));
|
||||
uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(this->d_fs_in));
|
||||
int32_t excludeRangeIndex1 = index_time - samplesPerChip;
|
||||
int32_t excludeRangeIndex2 = index_time + samplesPerChip;
|
||||
|
||||
|
@ -162,7 +162,7 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
// This function is based on the GNU software GPS for MATLAB in Kay Borre's book
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
uint32_t _samplesPerCode;
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_CPS; // Hz
|
||||
std::vector<int32_t> primary_code_E1_chips(static_cast<int32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2;
|
||||
@ -237,7 +237,7 @@ void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, c
|
||||
bool _secondary_flag)
|
||||
{
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_CPS; // Hz
|
||||
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
(static_cast<double>(_codeFreqBasis) / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
|
@ -108,7 +108,7 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
uint32_t _samplesPerCode;
|
||||
uint32_t delay;
|
||||
const uint32_t _codeLength = GALILEO_E5A_CODE_LENGTH_CHIPS;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
|
||||
std::unique_ptr<std::complex<float>> _code{new std::complex<float>[_codeLength]};
|
||||
gsl::span<std::complex<float>> _code_span(_code, _codeLength);
|
||||
|
@ -103,11 +103,11 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui
|
||||
const int32_t _codeLength = GPS_L2_M_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_HZ); // L2C chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_CPS); // L2C chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
|
@ -220,11 +220,11 @@ void gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
const int32_t _codeLength = GPS_L5I_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_HZ); // L5I primary chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_CPS); // L5I primary chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
@ -295,11 +295,11 @@ void gps_l5q_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
const int32_t _codeLength = GPS_L5Q_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_HZ); // L5Q chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_CPS); // L5Q chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
|
@ -88,32 +88,32 @@ SignalGenerator::SignalGenerator(ConfigurationInterface* configuration,
|
||||
{
|
||||
if (signal1[0].at(0) == '5')
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
vector_length = round(static_cast<float>(fs_in) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
}
|
||||
else
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)) * GALILEO_E1_C_SECONDARY_CODE_LENGTH;
|
||||
vector_length = round(static_cast<float>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)) * GALILEO_E1_C_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
else if (std::find(system.begin(), system.end(), "G") != system.end())
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = round(static_cast<float>(fs_in) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
}
|
||||
else if (std::find(system.begin(), system.end(), "R") != system.end())
|
||||
{
|
||||
if (signal1[0].at(0) == '1')
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = round(static_cast<float>(fs_in) / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
}
|
||||
else
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = round(static_cast<float>(fs_in) / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
}
|
||||
}
|
||||
|
||||
else if (std::find(system.begin(), system.end(), "B") != system.end())
|
||||
{
|
||||
vector_length = round(static_cast<float>(fs_in) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS));
|
||||
vector_length = round(static_cast<float>(fs_in) / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS));
|
||||
}
|
||||
|
||||
|
||||
|
@ -113,14 +113,14 @@ void signal_generator_c::init()
|
||||
|
||||
if (system_[sat] == "G")
|
||||
{
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) : 1);
|
||||
data_bit_duration_ms_.push_back(1e3 / GPS_CA_TELEMETRY_RATE_BITS_SECOND);
|
||||
}
|
||||
else if (system_[sat] == "R")
|
||||
{
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) : 1);
|
||||
data_bit_duration_ms_.push_back(1e3 / GLONASS_GNAV_TELEMETRY_RATE_BITS_SECOND);
|
||||
@ -130,14 +130,14 @@ void signal_generator_c::init()
|
||||
if (signal_[sat].at(0) == '5')
|
||||
{
|
||||
int codelen = static_cast<int>(GALILEO_E5A_CODE_LENGTH_CHIPS);
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / codelen)));
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / codelen)));
|
||||
num_of_codes_per_vector_.push_back(1);
|
||||
|
||||
data_bit_duration_ms_.push_back(1e3 / GALILEO_E5A_SYMBOL_RATE_BPS);
|
||||
}
|
||||
else
|
||||
{
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
num_of_codes_per_vector_.push_back(static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH));
|
||||
data_bit_duration_ms_.push_back(1e3 / GALILEO_E1_B_SYMBOL_RATE_BPS);
|
||||
@ -321,7 +321,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
out_idx++;
|
||||
}
|
||||
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GPS_L1_CA_CODE_PERIOD))) % data_bit_duration_ms_[sat];
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GPS_L1_CA_CODE_PERIOD_S))) % data_bit_duration_ms_[sat];
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,7 +354,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
out_idx++;
|
||||
}
|
||||
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GLONASS_L1_CA_CODE_PERIOD))) % data_bit_duration_ms_[sat];
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GLONASS_L1_CA_CODE_PERIOD_S))) % data_bit_duration_ms_[sat];
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5A_I_SECONDARY_CODE.at((ms_counter_[sat] + delay_sec_[sat]) % 20) == '0' ? 1 : -1);
|
||||
pilot_modulation_[sat] = (GALILEO_E5A_Q_SECONDARY_CODE[PRN_[sat] - 1].at((ms_counter_[sat] + delay_sec_[sat]) % 100) == '0' ? 1 : -1);
|
||||
|
||||
ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5A_CODE_PERIOD));
|
||||
ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5A_CODE_PERIOD_S));
|
||||
|
||||
for (k = delay_samples; k < samples_per_code_[sat]; k++)
|
||||
{
|
||||
@ -415,7 +415,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
out_idx++;
|
||||
}
|
||||
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E1_CODE_PERIOD))) % data_bit_duration_ms_[sat];
|
||||
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E1_CODE_PERIOD_S))) % data_bit_duration_ms_[sat];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -673,7 +673,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
else
|
||||
{
|
||||
// this page has no timing information
|
||||
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E1_CODE_PERIOD_MS); // + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E1_CODE_PERIOD_MS); // + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD_S;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -389,7 +389,7 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
|
||||
}
|
||||
else // if there is not a new preamble, we define the TOW of the current symbol
|
||||
{
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GLONASS_L1_CA_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GLONASS_L1_CA_CODE_PERIOD_S;
|
||||
}
|
||||
|
||||
// if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true)
|
||||
|
@ -389,7 +389,7 @@ int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
|
||||
}
|
||||
else // if there is not a new preamble, we define the TOW of the current symbol
|
||||
{
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GLONASS_L2_CA_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GLONASS_L2_CA_CODE_PERIOD_S;
|
||||
}
|
||||
|
||||
// if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true)
|
||||
|
@ -224,13 +224,13 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
// delay by the formulae:
|
||||
// \code
|
||||
// symbolTime_ms = msg->tow * 6000 + *pdelay * 20 + (12 * 20); 12 symbols of the encoder's transitory
|
||||
d_TOW_at_current_symbol = static_cast<double>(msg.tow) * 6.0 + static_cast<double>(delay) * GPS_L2_M_PERIOD + 12 * GPS_L2_M_PERIOD;
|
||||
d_TOW_at_current_symbol = static_cast<double>(msg.tow) * 6.0 + static_cast<double>(delay) * GPS_L2_M_PERIOD_S + 12 * GPS_L2_M_PERIOD_S;
|
||||
// d_TOW_at_current_symbol = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
|
||||
d_flag_valid_word = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_TOW_at_current_symbol += GPS_L2_M_PERIOD;
|
||||
d_TOW_at_current_symbol += GPS_L2_M_PERIOD_S;
|
||||
if (current_synchro_data.Flag_valid_symbol_output == false)
|
||||
{
|
||||
d_flag_valid_word = false;
|
||||
|
@ -123,7 +123,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
trk_param.dump_filename = dump_filename;
|
||||
int vector_length = std::round(fs_in / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator < 1)
|
||||
|
@ -134,7 +134,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
||||
trk_param.fll_bw_hz = fll_bw_hz;
|
||||
trk_param.pull_in_time_s = configuration->property(role + ".pull_in_time_s", trk_param.pull_in_time_s);
|
||||
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||
|
@ -160,7 +160,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
}
|
||||
trk_param.track_pilot = track_pilot;
|
||||
trk_param.extend_correlation_symbols = extend_correlation_symbols;
|
||||
int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
trk_param.system = 'E';
|
||||
std::array<char, 3> sig_{'1', 'B', '\0'};
|
||||
|
@ -160,7 +160,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
trk_param_fpga.track_pilot = track_pilot;
|
||||
d_track_pilot = track_pilot;
|
||||
trk_param_fpga.extend_correlation_symbols = extend_correlation_symbols;
|
||||
int32_t vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
int32_t vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
trk_param_fpga.system = 'E';
|
||||
std::array<char, 3> sig_{'1', 'B', '\0'};
|
||||
|
@ -79,7 +79,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
port_ch0 = configuration->property(role + ".port_ch0", 2060);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
|
@ -133,7 +133,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||
|
@ -130,7 +130,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
int32_t vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
int32_t vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int32_t extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
|
@ -82,7 +82,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type_ == "gr_complex")
|
||||
|
@ -75,7 +75,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
|
@ -80,7 +80,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type_ == "gr_complex")
|
||||
|
@ -73,7 +73,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
|
@ -137,7 +137,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||
trk_param.early_late_space_narrow_chips = early_late_space_narrow_chips;
|
||||
int vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator < 1)
|
||||
|
@ -137,7 +137,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||
trk_param_fpga.early_late_space_narrow_chips = early_late_space_narrow_chips;
|
||||
int32_t vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
int32_t vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int32_t symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator < 1)
|
||||
|
@ -69,7 +69,7 @@ GpsL1CaDllPllTrackingGPU::GpsL1CaDllPllTrackingGPU(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
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_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
|
@ -81,7 +81,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
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_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
bce_run = configuration->property(role + ".bce_run", false);
|
||||
bce_ptrans = configuration->property(role + ".p_transient", 0);
|
||||
|
@ -65,7 +65,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
|
||||
port_ch0 = configuration->property(role + ".port_ch0", 2060);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
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_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
// ################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
|
@ -121,7 +121,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
trk_param.fll_bw_hz = fll_bw_hz;
|
||||
trk_param.pull_in_time_s = configuration->property(role + ".pull_in_time_s", trk_param.pull_in_time_s);
|
||||
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator != 1)
|
||||
|
@ -76,7 +76,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
trk_param_fpga.early_late_space_narrow_chips = 0.0;
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator != 1)
|
||||
|
@ -134,7 +134,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
trk_param.fll_bw_hz = fll_bw_hz;
|
||||
trk_param.pull_in_time_s = configuration->property(role + ".pull_in_time_s", trk_param.pull_in_time_s);
|
||||
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
trk_param.vector_length = vector_length;
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||
|
@ -137,7 +137,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||
trk_param_fpga.pull_in_time_s = pull_in_time_s;
|
||||
|
||||
int32_t vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
int32_t vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
trk_param_fpga.vector_length = vector_length;
|
||||
int32_t extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
|
@ -135,8 +135,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L1_FREQ_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD;
|
||||
d_code_chip_rate = GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L1_CA_CODE_RATE_CPS;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_code_length_chips = static_cast<uint32_t>(GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
@ -152,8 +152,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (signal_type == "2S")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L2_FREQ_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD;
|
||||
d_code_chip_rate = GPS_L2_M_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L2_M_CODE_RATE_CPS;
|
||||
d_code_length_chips = static_cast<uint32_t>(GPS_L2_M_CODE_LENGTH_CHIPS);
|
||||
// GPS L2C has 1 trk symbol (20 ms) per tlm bit, no symbol integration required
|
||||
d_symbols_per_bit = GPS_L2_SAMPLES_PER_SYMBOL;
|
||||
@ -166,8 +166,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_CPS;
|
||||
// symbol integration: 10 trk symbols (10 ms) = 1 tlm bit
|
||||
d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL;
|
||||
d_correlation_length_ms = 1;
|
||||
@ -213,8 +213,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = GALILEO_E1_FREQ_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_CPS;
|
||||
d_code_length_chips = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
// Galileo E1b has 1 trk symbol (4 ms) per tlm bit, no symbol integration required
|
||||
d_symbols_per_bit = 1;
|
||||
@ -238,8 +238,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
d_symbols_per_bit = 20;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
@ -282,8 +282,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
{
|
||||
// GEO Satellites use different secondary code
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD_S;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_CPS;
|
||||
d_code_length_chips = static_cast<uint32_t>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; // todo: enable after fixing beidou symbol synchronization
|
||||
d_correlation_length_ms = 1;
|
||||
@ -300,8 +300,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
{
|
||||
// GEO Satellites use different secondary code
|
||||
d_signal_carrier_freq = BEIDOU_B3I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B3I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B3I_CODE_RATE_HZ;
|
||||
d_code_period = BEIDOU_B3I_CODE_PERIOD_S;
|
||||
d_code_chip_rate = BEIDOU_B3I_CODE_RATE_CPS;
|
||||
d_code_length_chips = static_cast<uint32_t>(BEIDOU_B3I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B3I_TELEMETRY_SYMBOLS_PER_BIT; // todo: enable after fixing beidou symbol synchronization
|
||||
d_correlation_length_ms = 1;
|
||||
|
@ -133,8 +133,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L1_FREQ_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD;
|
||||
d_code_chip_rate = GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L1_CA_CODE_RATE_CPS;
|
||||
d_correlation_length_ms = 1;
|
||||
// GPS L1 C/A does not have pilot component nor secondary code
|
||||
d_secondary = false;
|
||||
@ -148,8 +148,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
else if (signal_type == "2S")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L2_FREQ_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD;
|
||||
d_code_chip_rate = GPS_L2_M_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L2_M_CODE_RATE_CPS;
|
||||
// GPS L2C has 1 trk symbol (20 ms) per tlm bit, no symbol integration required
|
||||
d_symbols_per_bit = GPS_L2_SAMPLES_PER_SYMBOL;
|
||||
d_correlation_length_ms = 20;
|
||||
@ -160,8 +160,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_HZ;
|
||||
d_code_period = GPS_L5I_PERIOD_S;
|
||||
d_code_chip_rate = GPS_L5I_CODE_RATE_CPS;
|
||||
// symbol integration: 10 trk symbols (10 ms) = 1 tlm bit
|
||||
d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL;
|
||||
d_correlation_length_ms = 1;
|
||||
@ -210,8 +210,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = GALILEO_E1_FREQ_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_period = GALILEO_E1_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_CPS;
|
||||
// Galileo E1b has 1 trk symbol (4 ms) per tlm bit, no symbol integration required
|
||||
d_symbols_per_bit = 1;
|
||||
d_correlation_length_ms = 4;
|
||||
@ -233,8 +233,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
d_code_period = GALILEO_E5A_CODE_PERIOD_S;
|
||||
d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
d_symbols_per_bit = 20;
|
||||
d_correlation_length_ms = 1;
|
||||
d_secondary = true;
|
||||
|
@ -146,7 +146,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ;
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -196,7 +196,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
Signal_,
|
||||
false,
|
||||
d_acquisition_gnss_synchro->PRN,
|
||||
2 * GALILEO_E1_CODE_CHIP_RATE_HZ,
|
||||
2 * GALILEO_E1_CODE_CHIP_RATE_CPS,
|
||||
0);
|
||||
|
||||
multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(2 * GALILEO_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
|
||||
@ -373,11 +373,11 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
// New carrier Doppler frequency estimation
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz + carr_error_filt_hz;
|
||||
// New code Doppler frequency estimation
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ + ((d_carrier_doppler_hz * GALILEO_E1_CODE_CHIP_RATE_HZ) / GALILEO_E1_FREQ_HZ);
|
||||
d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_CPS + ((d_carrier_doppler_hz * GALILEO_E1_CODE_CHIP_RATE_CPS) / GALILEO_E1_FREQ_HZ);
|
||||
// carrier phase accumulator for (K) doppler estimation
|
||||
d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
|
||||
d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD_S;
|
||||
// remnant carrier phase to prevent overflow in the code NCO
|
||||
d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
|
||||
d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD_S;
|
||||
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
@ -385,7 +385,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
code_error_filt_chips = tcp_data.proc_pack_code_error;
|
||||
// Code phase accumulator
|
||||
float code_error_filt_secs;
|
||||
code_error_filt_secs = (GALILEO_E1_CODE_PERIOD * code_error_filt_chips) / GALILEO_E1_CODE_CHIP_RATE_HZ; // [seconds]
|
||||
code_error_filt_secs = (GALILEO_E1_CODE_PERIOD_S * code_error_filt_chips) / GALILEO_E1_CODE_CHIP_RATE_CPS; // [seconds]
|
||||
d_acc_code_phase_secs = d_acc_code_phase_secs + code_error_filt_secs;
|
||||
|
||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||
@ -414,7 +414,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
d_cn0_estimation_counter = 0;
|
||||
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GALILEO_E1_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GALILEO_E1_CODE_PERIOD_S);
|
||||
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), FLAGS_cn0_samples);
|
||||
|
@ -162,7 +162,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -238,7 +238,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -246,7 +246,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
|
||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -650,7 +650,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
|
||||
}
|
||||
// UPDATE INTEGRATION TIME
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD;
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD_S;
|
||||
d_code_loop_filter.set_pdi(CURRENT_INTEGRATION_TIME_S);
|
||||
enable_dll_pll = true;
|
||||
}
|
||||
@ -712,7 +712,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// PLL to DLL assistance [Secs/Ti]
|
||||
d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / d_glonass_freq_ch;
|
||||
// code Doppler frequency update
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L1_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -762,7 +762,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -161,7 +161,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
||||
|
||||
//--- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -235,7 +235,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -243,7 +243,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
|
||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -643,7 +643,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
|
||||
}
|
||||
// UPDATE INTEGRATION TIME
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD;
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD_S;
|
||||
enable_dll_pll = true;
|
||||
}
|
||||
else
|
||||
@ -703,7 +703,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// PLL to DLL assistance [Secs/Ti]
|
||||
d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / d_glonass_freq_ch;
|
||||
// code Doppler frequency update
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L1_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -753,7 +753,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -130,7 +130,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -195,7 +195,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -203,7 +203,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
|
||||
d_current_prn_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L1_CA_CODE_LENGTH_CHIPS / GLONASS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -572,7 +572,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// New carrier Doppler frequency estimation
|
||||
d_carrier_frequency_hz += carr_error_filt_hz;
|
||||
d_carrier_doppler_hz += carr_error_filt_hz;
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -582,7 +582,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
|
||||
double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips * T_chip_seconds); // [seconds]
|
||||
// double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds]
|
||||
// double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_CPS; // [seconds]
|
||||
|
||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||
// keep alignment parameters for the next input buffer
|
||||
@ -621,7 +621,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L1_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -159,7 +159,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -235,7 +235,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L2_CA_CODE_LENGTH_CHIPS;
|
||||
@ -243,7 +243,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
|
||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -648,7 +648,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
|
||||
}
|
||||
// UPDATE INTEGRATION TIME
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD;
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD_S;
|
||||
d_code_loop_filter.set_pdi(CURRENT_INTEGRATION_TIME_S);
|
||||
enable_dll_pll = true;
|
||||
}
|
||||
@ -710,7 +710,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// PLL to DLL assistance [Secs/Ti]
|
||||
d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / d_glonass_freq_ch;
|
||||
// code Doppler frequency update
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L2_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L2_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -760,7 +760,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -159,7 +159,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
||||
|
||||
//--- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -233,7 +233,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L2_CA_CODE_LENGTH_CHIPS;
|
||||
@ -241,7 +241,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
|
||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -641,7 +641,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
|
||||
}
|
||||
// UPDATE INTEGRATION TIME
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD;
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD_S;
|
||||
enable_dll_pll = true;
|
||||
}
|
||||
else
|
||||
@ -701,7 +701,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// PLL to DLL assistance [Secs/Ti]
|
||||
d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / d_glonass_freq_ch;
|
||||
// code Doppler frequency update
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L2_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS + (((d_carrier_doppler_hz - d_carrier_doppler_old_hz) * GLONASS_L2_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -751,7 +751,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -130,7 +130,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -195,7 +195,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GLONASS_L2_CA_CODE_LENGTH_CHIPS;
|
||||
@ -203,7 +203,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
|
||||
d_current_prn_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GLONASS_L2_CA_CODE_LENGTH_CHIPS / GLONASS_L2_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -572,7 +572,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// New carrier Doppler frequency estimation
|
||||
d_carrier_frequency_hz += carr_error_filt_hz;
|
||||
d_carrier_doppler_hz += carr_error_filt_hz;
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L2_CA_CODE_RATE_HZ) / d_glonass_freq_ch);
|
||||
d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS + ((d_carrier_doppler_hz * GLONASS_L2_CA_CODE_RATE_CPS) / d_glonass_freq_ch);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -582,7 +582,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double T_chip_seconds = 1.0 / static_cast<double>(d_code_freq_chips);
|
||||
double T_prn_seconds = T_chip_seconds * GLONASS_L2_CA_CODE_LENGTH_CHIPS;
|
||||
double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips * T_chip_seconds); // [seconds]
|
||||
// double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds]
|
||||
// double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_CPS; // [seconds]
|
||||
|
||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||
// keep alignment parameters for the next input buffer
|
||||
@ -621,7 +621,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES, GLONASS_L2_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), CN0_ESTIMATION_SAMPLES);
|
||||
// Loss of lock detection
|
||||
|
@ -122,7 +122,7 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
||||
multicorrelator_gpu->set_input_output_vectors(d_correlator_outs, in_gpu);
|
||||
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -186,7 +186,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -194,7 +194,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
||||
|
||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -380,7 +380,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
// PLL to DLL assistance [Secs/Ti]
|
||||
d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / GPS_L1_FREQ_HZ;
|
||||
// code Doppler frequency update
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_HZ) / GPS_L1_FREQ_HZ);
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_CPS + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_CPS) / GPS_L1_FREQ_HZ);
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
@ -436,7 +436,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), FLAGS_cn0_samples);
|
||||
// Loss of lock detection
|
||||
|
@ -146,7 +146,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -195,7 +195,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
double CN_lin = pow(10, CN_dB_Hz / 10.0);
|
||||
|
||||
double sigma2_phase_detector_cycles2;
|
||||
sigma2_phase_detector_cycles2 = (1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD)) * (1.0 + 1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD));
|
||||
sigma2_phase_detector_cycles2 = (1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD_S)) * (1.0 + 1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD_S));
|
||||
|
||||
// covariances (static)
|
||||
double sigma2_carrier_phase = GPS_TWO_PI / 4;
|
||||
@ -210,12 +210,12 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
kf_R(0, 0) = sigma2_phase_detector_cycles2;
|
||||
|
||||
kf_Q = arma::zeros(2, 2);
|
||||
kf_Q(0, 0) = pow(GPS_L1_CA_CODE_PERIOD, 4);
|
||||
kf_Q(1, 1) = GPS_L1_CA_CODE_PERIOD;
|
||||
kf_Q(0, 0) = pow(GPS_L1_CA_CODE_PERIOD_S, 4);
|
||||
kf_Q(1, 1) = GPS_L1_CA_CODE_PERIOD_S;
|
||||
|
||||
kf_F = arma::zeros(2, 2);
|
||||
kf_F(0, 0) = 1.0;
|
||||
kf_F(0, 1) = GPS_TWO_PI * GPS_L1_CA_CODE_PERIOD;
|
||||
kf_F(0, 1) = GPS_TWO_PI * GPS_L1_CA_CODE_PERIOD_S;
|
||||
kf_F(1, 0) = 0.0;
|
||||
kf_F(1, 1) = 1.0;
|
||||
|
||||
@ -233,13 +233,13 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
kf_P_x_ini(2, 2) = sigma2_doppler_rate;
|
||||
|
||||
kf_Q = arma::zeros(3, 3);
|
||||
kf_Q(0, 0) = pow(GPS_L1_CA_CODE_PERIOD, 4);
|
||||
kf_Q(1, 1) = GPS_L1_CA_CODE_PERIOD;
|
||||
kf_Q(2, 2) = GPS_L1_CA_CODE_PERIOD;
|
||||
kf_Q(0, 0) = pow(GPS_L1_CA_CODE_PERIOD_S, 4);
|
||||
kf_Q(1, 1) = GPS_L1_CA_CODE_PERIOD_S;
|
||||
kf_Q(2, 2) = GPS_L1_CA_CODE_PERIOD_S;
|
||||
|
||||
kf_F = arma::resize(kf_F, 3, 3);
|
||||
kf_F(0, 2) = 0.5 * GPS_TWO_PI * pow(GPS_L1_CA_CODE_PERIOD, 2);
|
||||
kf_F(1, 2) = GPS_L1_CA_CODE_PERIOD;
|
||||
kf_F(0, 2) = 0.5 * GPS_TWO_PI * pow(GPS_L1_CA_CODE_PERIOD_S, 2);
|
||||
kf_F(1, 2) = GPS_L1_CA_CODE_PERIOD_S;
|
||||
kf_F(2, 0) = 0.0;
|
||||
kf_F(2, 1) = 0.0;
|
||||
kf_F(2, 2) = 1.0;
|
||||
@ -293,7 +293,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::start_tracking()
|
||||
double T_chip_mod_seconds;
|
||||
double T_prn_mod_seconds;
|
||||
double T_prn_mod_samples;
|
||||
d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1 / d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -301,7 +301,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::start_tracking()
|
||||
|
||||
d_current_prn_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
@ -713,7 +713,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
// Kalman estimation (measurement update)
|
||||
double sigma2_phase_detector_cycles2;
|
||||
double CN_lin = pow(10, d_CN0_SNV_dB_Hz / 10.0);
|
||||
sigma2_phase_detector_cycles2 = (1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD)) * (1.0 + 1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD));
|
||||
sigma2_phase_detector_cycles2 = (1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD_S)) * (1.0 + 1.0 / (2.0 * CN_lin * GPS_L1_CA_CODE_PERIOD_S));
|
||||
|
||||
kf_y(0) = d_carr_phase_error_rad; // measurement vector
|
||||
kf_R(0, 0) = sigma2_phase_detector_cycles2;
|
||||
@ -754,7 +754,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
|
||||
// ################## DLL ##########################################################
|
||||
// New code Doppler frequency estimation based on carrier frequency estimation
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_HZ) / GPS_L1_FREQ_HZ);
|
||||
d_code_freq_chips = GPS_L1_CA_CODE_RATE_CPS + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_CPS) / GPS_L1_FREQ_HZ);
|
||||
// DLL discriminator
|
||||
code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] early and late
|
||||
// Code discriminator filter
|
||||
@ -794,7 +794,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD_S);
|
||||
// Carrier lock indicator
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), FLAGS_cn0_samples);
|
||||
// Loss of lock detection
|
||||
|
@ -131,7 +131,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
|
||||
// --- Perform initializations ------------------------------
|
||||
// define initial code frequency basis of NCO
|
||||
d_code_freq_hz = GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_hz = GPS_L1_CA_CODE_RATE_CPS;
|
||||
// define residual code phase (in chips)
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
// define residual carrier phase
|
||||
@ -197,7 +197,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
float T_chip_mod_seconds;
|
||||
float T_prn_mod_seconds;
|
||||
float T_prn_mod_samples;
|
||||
d_code_freq_hz = radial_velocity * GPS_L1_CA_CODE_RATE_HZ;
|
||||
d_code_freq_hz = radial_velocity * GPS_L1_CA_CODE_RATE_CPS;
|
||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_hz) / static_cast<double>(d_fs_in);
|
||||
T_chip_mod_seconds = 1 / d_code_freq_hz;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
@ -205,7 +205,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
|
||||
d_next_prn_length_samples = std::round(T_prn_mod_samples);
|
||||
|
||||
float T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
float T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_CPS;
|
||||
float T_prn_true_samples = T_prn_true_seconds * static_cast<float>(d_fs_in);
|
||||
float T_prn_diff_seconds;
|
||||
T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
@ -407,7 +407,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
// Modify carrier freq based on NCO command
|
||||
d_carrier_doppler_hz = tcp_data.proc_pack_carrier_doppler_hz;
|
||||
// Modify code freq based on NCO command
|
||||
code_nco = 1 / (1 / GPS_L1_CA_CODE_RATE_HZ - code_error / GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
code_nco = 1 / (1 / GPS_L1_CA_CODE_RATE_CPS - code_error / GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
d_code_freq_hz = code_nco;
|
||||
|
||||
// Update the phasestep based on code freq (variable) and
|
||||
@ -425,7 +425,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
K_blk_samples = T_prn_samples + d_rem_code_phase_samples; // -code_error*(double)d_fs_in;
|
||||
|
||||
// Update the current PRN delay (code phase in samples)
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_CPS;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
d_code_phase_samples = d_code_phase_samples + T_prn_samples - T_prn_true_samples;
|
||||
if (d_code_phase_samples < 0)
|
||||
@ -450,7 +450,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
else
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD);
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer.data(), FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD_S);
|
||||
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), FLAGS_cn0_samples);
|
||||
|
||||
// ###### TRACKING UNLOCK NOTIFICATION #####
|
||||
|
@ -398,22 +398,22 @@ void GNSSFlowgraph::connect()
|
||||
switch (mapStringValues_[channels_.at(i)->implementation()])
|
||||
{
|
||||
case evGPS_1C:
|
||||
acq_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_2S:
|
||||
acq_fs = GPS_L2C_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GPS_L2C_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
acq_fs = GPS_L5_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GPS_L5_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
acq_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
acq_fs = GALILEO_E1_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GALILEO_E1_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_5X:
|
||||
acq_fs = GALILEO_E5A_OPT_ACQ_FS_HZ;
|
||||
acq_fs = GALILEO_E5A_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGLO_1G:
|
||||
acq_fs = fs;
|
||||
@ -1222,7 +1222,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
|
||||
}
|
||||
else
|
||||
{
|
||||
channels_[current_channel]->set_signal(channels_[current_channel]->get_signal());
|
||||
channels_[current_channel]->set_signal(channels_[current_channel]->get_signal());
|
||||
start_acquisition = true;
|
||||
}
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
// carrier and code frequencies
|
||||
const double BEIDOU_B1I_FREQ_HZ = 1.561098e9; //!< B1I [Hz]
|
||||
const double BEIDOU_B1I_CODE_RATE_HZ = 2.046e6; //!< Beidou B1I code rate [chips/s]
|
||||
const double BEIDOU_B1I_CODE_RATE_CPS = 2.046e6; //!< Beidou B1I code rate [chips/s]
|
||||
const double BEIDOU_B1I_CODE_LENGTH_CHIPS = 2046.0; //!< Beidou B1I code length [chips]
|
||||
const double BEIDOU_B1I_CODE_PERIOD = 0.001; //!< Beidou B1I code period [seconds]
|
||||
const double BEIDOU_B1I_CODE_PERIOD_S = 0.001; //!< Beidou B1I code period [seconds]
|
||||
const uint32_t BEIDOU_B1I_CODE_PERIOD_MS = 1; //!< Beidou B1I code period [ms]
|
||||
const int32_t BEIDOU_B1I_SECONDARY_CODE_LENGTH = 20;
|
||||
const std::string BEIDOU_B1I_SECONDARY_CODE_STR = "00000100110101001110";
|
||||
|
@ -37,9 +37,9 @@
|
||||
|
||||
// carrier and code frequencies
|
||||
const double BEIDOU_B3I_FREQ_HZ = 1.268520e9; //!< BeiDou B3I [Hz]
|
||||
const double BEIDOU_B3I_CODE_RATE_HZ = 10.23e6; //!< BeiDou B3I code rate [chips/s]
|
||||
const double BEIDOU_B3I_CODE_RATE_CPS = 10.23e6; //!< BeiDou B3I code rate [chips/s]
|
||||
const double BEIDOU_B3I_CODE_LENGTH_CHIPS = 10230.0; //!< BeiDou B3I code length [chips]
|
||||
const double BEIDOU_B3I_CODE_PERIOD = 0.001; //!< BeiDou B3I code period [seconds]
|
||||
const double BEIDOU_B3I_CODE_PERIOD_S = 0.001; //!< BeiDou B3I code period [seconds]
|
||||
const uint32_t BEIDOU_B3I_CODE_PERIOD_MS = 1; //!< BeiDou B3I code period [ms]
|
||||
const int32_t BEIDOU_B3I_SECONDARY_CODE_LENGTH = 20;
|
||||
const std::string BEIDOU_B3I_SECONDARY_CODE_STR = "00000100110101001110";
|
||||
|
@ -81,20 +81,20 @@ const double GLONASS_SUN_GM = 0.1325263e12; //!< Solar gravitational
|
||||
const double GLONASS_SUN_SEMI_MAJOR_AXIS = 1.49598e8; //!< Semi-major axis of solar orbit [km];
|
||||
const double GLONASS_SUN_ECCENTRICITY = 0.016719; //!< Eccentricity of solar orbit
|
||||
|
||||
const double GLONASS_L2_CA_FREQ_HZ = FREQ2_GLO; //!< L2 [Hz]
|
||||
const double GLONASS_L2_CA_DFREQ_HZ = DFRQ2_GLO; //!< Freq Bias for GLONASS L1 [Hz]
|
||||
const double GLONASS_L2_CA_CODE_RATE_HZ = 0.511e6; //!< GLONASS L1 C/A code rate [chips/s]
|
||||
const double GLONASS_L2_CA_CODE_LENGTH_CHIPS = 511.0; //!< GLONASS L1 C/A code length [chips]
|
||||
const double GLONASS_L2_CA_CODE_PERIOD = 0.001; //!< GLONASS L1 C/A code period [seconds]
|
||||
const double GLONASS_L2_CA_CHIP_PERIOD = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
const double GLONASS_L2_CA_FREQ_HZ = FREQ2_GLO; //!< L2 [Hz]
|
||||
const double GLONASS_L2_CA_DFREQ_HZ = DFRQ2_GLO; //!< Freq Bias for GLONASS L1 [Hz]
|
||||
const double GLONASS_L2_CA_CODE_RATE_CPS = 0.511e6; //!< GLONASS L1 C/A code rate [chips/s]
|
||||
const double GLONASS_L2_CA_CODE_LENGTH_CHIPS = 511.0; //!< GLONASS L1 C/A code length [chips]
|
||||
const double GLONASS_L2_CA_CODE_PERIOD_S = 0.001; //!< GLONASS L1 C/A code period [seconds]
|
||||
const double GLONASS_L2_CA_CHIP_PERIOD_S = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
const double GLONASS_L2_CA_SYMBOL_RATE_BPS = 1000;
|
||||
|
||||
const double GLONASS_L1_CA_FREQ_HZ = FREQ1_GLO; //!< L1 [Hz]
|
||||
const double GLONASS_L1_CA_DFREQ_HZ = DFRQ1_GLO; //!< Freq Bias for GLONASS L1 [Hz]
|
||||
const double GLONASS_L1_CA_CODE_RATE_HZ = 0.511e6; //!< GLONASS L1 C/A code rate [chips/s]
|
||||
const double GLONASS_L1_CA_CODE_LENGTH_CHIPS = 511.0; //!< GLONASS L1 C/A code length [chips]
|
||||
const double GLONASS_L1_CA_CODE_PERIOD = 0.001; //!< GLONASS L1 C/A code period [seconds]
|
||||
const double GLONASS_L1_CA_CHIP_PERIOD = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
const double GLONASS_L1_CA_FREQ_HZ = FREQ1_GLO; //!< L1 [Hz]
|
||||
const double GLONASS_L1_CA_DFREQ_HZ = DFRQ1_GLO; //!< Freq Bias for GLONASS L1 [Hz]
|
||||
const double GLONASS_L1_CA_CODE_RATE_CPS = 0.511e6; //!< GLONASS L1 C/A code rate [chips/s]
|
||||
const double GLONASS_L1_CA_CODE_LENGTH_CHIPS = 511.0; //!< GLONASS L1 C/A code length [chips]
|
||||
const double GLONASS_L1_CA_CODE_PERIOD_S = 0.001; //!< GLONASS L1 C/A code period [seconds]
|
||||
const double GLONASS_L1_CA_CHIP_PERIOD_S = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
const double GLONASS_L1_CA_SYMBOL_RATE_BPS = 1000;
|
||||
|
||||
const int32_t GLONASS_CA_NBR_SATS = 24; // STRING DATA WITHOUT PREAMBLE
|
||||
|
@ -52,15 +52,15 @@ const double F = -4.442807633e-10; //!< Constant, [s/(m)^(
|
||||
|
||||
// carrier and code frequencies
|
||||
const double GPS_L1_FREQ_HZ = FREQ1; //!< L1 [Hz]
|
||||
const double GPS_L1_CA_CODE_RATE_HZ = 1.023e6; //!< GPS L1 C/A code rate [chips/s]
|
||||
const double GPS_L1_CA_CODE_RATE_CPS = 1.023e6; //!< GPS L1 C/A code rate [chips/s]
|
||||
const double GPS_L1_CA_CODE_LENGTH_CHIPS = 1023.0; //!< GPS L1 C/A code length [chips]
|
||||
const double GPS_L1_CA_CODE_PERIOD = 0.001; //!< GPS L1 C/A code period [seconds]
|
||||
const double GPS_L1_CA_CODE_PERIOD_S = 0.001; //!< GPS L1 C/A code period [seconds]
|
||||
const uint32_t GPS_L1_CA_CODE_PERIOD_MS = 1U; //!< GPS L1 C/A code period [ms]
|
||||
const uint32_t GPS_L1_CA_BIT_PERIOD_MS = 20U; //!< GPS L1 C/A bit period [ms]
|
||||
const double GPS_L1_CA_CHIP_PERIOD = 9.7752e-07; //!< GPS L1 C/A chip period [seconds]
|
||||
const double GPS_L1_CA_CHIP_PERIOD_S = 9.7752e-07; //!< GPS L1 C/A chip period [seconds]
|
||||
|
||||
// optimum parameters
|
||||
const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GPS_L1_CA_OPT_ACQ_FS_SPS = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
/*!
|
||||
* \brief Maximum Time-Of-Arrival (TOA) difference between satellites for a receiver operated on Earth surface is 20 ms
|
||||
|
@ -53,18 +53,18 @@ const double GPS_L2_F = -4.442807633e-10; //!< Constant, [s/(m)^(1
|
||||
// carrier and code frequencies
|
||||
const double GPS_L2_FREQ_HZ = FREQ2; //!< L2 [Hz]
|
||||
|
||||
const double GPS_L2_M_CODE_RATE_HZ = 0.5115e6; //!< GPS L2 M code rate [chips/s]
|
||||
const double GPS_L2_M_CODE_RATE_CPS = 0.5115e6; //!< GPS L2 M code rate [chips/s]
|
||||
const int32_t GPS_L2_M_CODE_LENGTH_CHIPS = 10230; //!< GPS L2 M code length [chips]
|
||||
const double GPS_L2_M_PERIOD = 0.02; //!< GPS L2 M code period [seconds]
|
||||
const double GPS_L2_M_PERIOD_S = 0.02; //!< GPS L2 M code period [seconds]
|
||||
|
||||
const double GPS_L2_L_CODE_RATE_HZ = 0.5115e6; //!< GPS L2 L code rate [chips/s]
|
||||
const double GPS_L2_L_CODE_RATE_CPS = 0.5115e6; //!< GPS L2 L code rate [chips/s]
|
||||
const int32_t GPS_L2_L_CODE_LENGTH_CHIPS = 767250; //!< GPS L2 L code length [chips]
|
||||
const double GPS_L2_L_PERIOD = 1.5; //!< GPS L2 L code period [seconds]
|
||||
const double GPS_L2_L_PERIOD_S = 1.5; //!< GPS L2 L code period [seconds]
|
||||
|
||||
const int32_t GPS_L2C_HISTORY_DEEP = 5;
|
||||
|
||||
// optimum parameters
|
||||
const uint32_t GPS_L2C_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GPS_L2C_OPT_ACQ_FS_SPS = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
|
||||
const int32_t GPS_L2C_M_INIT_REG[115] =
|
||||
|
@ -51,21 +51,21 @@ const double GPS_L5_F = -4.442807633e-10; //!< Constant, [s/(m)^(1
|
||||
// carrier and code frequencies
|
||||
const double GPS_L5_FREQ_HZ = FREQ5; //!< L5 [Hz]
|
||||
|
||||
const double GPS_L5I_CODE_RATE_HZ = 10.23e6; //!< GPS L5i code rate [chips/s]
|
||||
const double GPS_L5I_CODE_RATE_CPS = 10.23e6; //!< GPS L5i code rate [chips/s]
|
||||
const int32_t GPS_L5I_CODE_LENGTH_CHIPS = 10230; //!< GPS L5i code length [chips]
|
||||
const double GPS_L5I_PERIOD = 0.001; //!< GPS L5 code period [seconds]
|
||||
const double GPS_L5I_PERIOD_S = 0.001; //!< GPS L5 code period [seconds]
|
||||
const int32_t GPS_L5I_PERIOD_MS = 1; //!< GPS L5 code period [ms]
|
||||
const double GPS_L5I_SYMBOL_PERIOD = 0.01; //!< GPS L5 symbol period [seconds]
|
||||
const double GPS_L5I_SYMBOL_PERIOD_S = 0.01; //!< GPS L5 symbol period [seconds]
|
||||
const int32_t GPS_L5I_SYMBOL_PERIOD_MS = 10; //!< GPS L5 symbol period [ms]
|
||||
|
||||
const double GPS_L5Q_CODE_RATE_HZ = 10.23e6; //!< GPS L5i code rate [chips/s]
|
||||
const double GPS_L5Q_CODE_RATE_CPS = 10.23e6; //!< GPS L5i code rate [chips/s]
|
||||
const int32_t GPS_L5Q_CODE_LENGTH_CHIPS = 10230; //!< GPS L5i code length [chips]
|
||||
const double GPS_L5Q_PERIOD = 0.001; //!< GPS L5 code period [seconds]
|
||||
const double GPS_L5Q_PERIOD_S = 0.001; //!< GPS L5 code period [seconds]
|
||||
|
||||
const int32_t GPS_L5_HISTORY_DEEP = 5;
|
||||
|
||||
// optimum parameters
|
||||
const uint32_t GPS_L5_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GPS_L5_OPT_ACQ_FS_SPS = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
const int32_t GPS_L5I_INIT_REG[210] =
|
||||
{266, 365, 804, 1138,
|
||||
|
@ -52,8 +52,8 @@ const double GALILEO_F = -4.442807309e-10; //!< Constant, [s/(m)^(
|
||||
|
||||
// carrier and code frequencies
|
||||
const double GALILEO_E1_FREQ_HZ = FREQ1; //!< Galileo E1 carrier frequency [Hz]
|
||||
const double GALILEO_E1_CODE_CHIP_RATE_HZ = 1.023e6; //!< Galileo E1 code rate [chips/s]
|
||||
const double GALILEO_E1_CODE_PERIOD = 0.004; //!< Galileo E1 code period [s]
|
||||
const double GALILEO_E1_CODE_CHIP_RATE_CPS = 1.023e6; //!< Galileo E1 code rate [chips/s]
|
||||
const double GALILEO_E1_CODE_PERIOD_S = 0.004; //!< Galileo E1 code period [s]
|
||||
const int32_t GALILEO_E1_CODE_PERIOD_MS = 4; //!< Galileo E1 code period [ms]
|
||||
const double GALILEO_E1_SUB_CARRIER_A_RATE_HZ = 1.023e6; //!< Galileo E1 sub-carrier 'a' rate [Hz]
|
||||
const double GALILEO_E1_SUB_CARRIER_B_RATE_HZ = 6.138e6; //!< Galileo E1 sub-carrier 'b' rate [Hz]
|
||||
@ -65,7 +65,7 @@ const int32_t GALILEO_E1_NUMBER_OF_CODES = 50;
|
||||
|
||||
|
||||
// optimum parameters
|
||||
const uint32_t GALILEO_E1_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GALILEO_E1_OPT_ACQ_FS_SPS = 2000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
|
||||
const double GALILEO_STARTOFFSET_MS = 68.802; // [ms] Initial sign. travel time (this cannot go here)
|
||||
@ -79,7 +79,7 @@ const int32_t GALILEO_E1_HISTORY_DEEP = 100;
|
||||
const std::string GALILEO_INAV_PREAMBLE = {"0101100000"};
|
||||
|
||||
const int32_t GALILEO_INAV_PREAMBLE_LENGTH_BITS = 10;
|
||||
const double GALILEO_INAV_PAGE_PART_WITH_PREABLE_SECONDS = 2.0 + GALILEO_INAV_PREAMBLE_LENGTH_BITS * GALILEO_E1_CODE_PERIOD;
|
||||
const double GALILEO_INAV_PAGE_PART_WITH_PREABLE_SECONDS = 2.0 + GALILEO_INAV_PREAMBLE_LENGTH_BITS * GALILEO_E1_CODE_PERIOD_S;
|
||||
const int32_t GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS = 250;
|
||||
const int32_t GALILEO_INAV_PAGE_PART_SYMBOLS = 250; //!< Each Galileo INAV pages are composed of two parts (even and odd) each of 250 symbols, including preamble. See Galileo ICD 4.3.2
|
||||
const int32_t GALILEO_INAV_PAGE_SYMBOLS = 500; //!< The complete Galileo INAV page length
|
||||
|
@ -41,13 +41,13 @@
|
||||
|
||||
// Carrier and code frequencies
|
||||
const double GALILEO_E5A_FREQ_HZ = FREQ5; //!< Galileo E5a carrier frequency [Hz]
|
||||
const double GALILEO_E5A_CODE_CHIP_RATE_HZ = 1.023e7; //!< Galileo E5a code rate [chips/s]
|
||||
const double GALILEO_E5A_I_TIERED_CODE_PERIOD = 0.020; //!< Galileo E5a-I tiered code period [s]
|
||||
const double GALILEO_E5A_Q_TIERED_CODE_PERIOD = 0.100; //!< Galileo E5a-Q tiered code period [s]
|
||||
const double GALILEO_E5A_CODE_CHIP_RATE_CPS = 1.023e7; //!< Galileo E5a code rate [chips/s]
|
||||
const double GALILEO_E5A_I_TIERED_CODE_PERIOD_S = 0.020; //!< Galileo E5a-I tiered code period [s]
|
||||
const double GALILEO_E5A_Q_TIERED_CODE_PERIOD_S = 0.100; //!< Galileo E5a-Q tiered code period [s]
|
||||
const int32_t GALILEO_E5A_CODE_LENGTH_CHIPS = 10230; //!< Galileo E5a primary code length [chips]
|
||||
const int32_t GALILEO_E5A_I_SECONDARY_CODE_LENGTH = 20; //!< Galileo E5a-I secondary code length [chips]
|
||||
const int32_t GALILEO_E5A_Q_SECONDARY_CODE_LENGTH = 100; //!< Galileo E5a-Q secondary code length [chips]
|
||||
const double GALILEO_E5A_CODE_PERIOD = 0.001; //!< Galileo E1 primary code period [s]
|
||||
const double GALILEO_E5A_CODE_PERIOD_S = 0.001; //!< Galileo E1 primary code period [s]
|
||||
const int32_t GALILEO_E5A_CODE_PERIOD_MS = 1; //!< Galileo E1 primary code period [ms]
|
||||
const int32_t GALILEO_E5A_SYMBOL_RATE_BPS = 50; //!< Galileo E5a symbol rate [bits/second]
|
||||
const int32_t GALILEO_E5A_NUMBER_OF_CODES = 50;
|
||||
@ -58,7 +58,7 @@ const int32_t GALILEO_E5A_HISTORY_DEEP = 20;
|
||||
const int32_t GALILEO_E5A_CRC_ERROR_LIMIT = 6;
|
||||
|
||||
// optimum parameters
|
||||
const uint32_t GALILEO_E5A_OPT_ACQ_FS_HZ = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GALILEO_E5A_OPT_ACQ_FS_SPS = 10000000; //!< Sampling frequency that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
// F/NAV message structure
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "acquisition_dump_reader.h"
|
||||
#include "display.h"
|
||||
#include "file_configuration.h"
|
||||
@ -900,10 +901,10 @@ TEST_F(AcquisitionPerformanceTest, ROC)
|
||||
acq_dump.read_binary_acq();
|
||||
if (acq_dump.positive_acq)
|
||||
{
|
||||
// std::cout << "Meas acq_delay_samples: " << acq_dump.acq_delay_samples << " chips: " << acq_dump.acq_delay_samples / (baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD / GPS_L1_CA_CODE_LENGTH_CHIPS) << std::endl;
|
||||
// std::cout << "Meas acq_delay_samples: " << acq_dump.acq_delay_samples << " chips: " << acq_dump.acq_delay_samples / (baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S / GPS_L1_CA_CODE_LENGTH_CHIPS) << std::endl;
|
||||
meas_timestamp_s(execution - 1) = acq_dump.sample_counter / baseband_sampling_freq;
|
||||
meas_doppler(execution - 1) = acq_dump.acq_doppler_hz;
|
||||
meas_acq_delay_chips(execution - 1) = acq_dump.acq_delay_samples / (baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD / GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
meas_acq_delay_chips(execution - 1) = acq_dump.acq_delay_samples / (baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S / GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
positive_acq(execution - 1) = acq_dump.positive_acq;
|
||||
}
|
||||
else
|
||||
@ -956,7 +957,7 @@ TEST_F(AcquisitionPerformanceTest, ROC)
|
||||
interp1(true_timestamp_s, true_prn_delay_chips, meas_timestamp_s, true_interpolated_prn_delay_chips);
|
||||
|
||||
arma::vec doppler_estimation_error = true_interpolated_doppler - meas_doppler;
|
||||
arma::vec delay_estimation_error = true_interpolated_prn_delay_chips - (meas_acq_delay_chips - ((1.0 / baseband_sampling_freq) / GPS_L1_CA_CHIP_PERIOD)); // compensate 1 sample delay
|
||||
arma::vec delay_estimation_error = true_interpolated_prn_delay_chips - (meas_acq_delay_chips - ((1.0 / baseband_sampling_freq) / GPS_L1_CA_CHIP_PERIOD_S)); // compensate 1 sample delay
|
||||
|
||||
// Cut measurements without reference
|
||||
for (int i = 0; i < num_executions; i++)
|
||||
|
@ -189,7 +189,7 @@ void BeidouB1iPcpsAcquisitionTest::plot_grid()
|
||||
std::string basename = "./tmp-acq-bds-b1i/acquisition_C_B1";
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
auto samples_per_code = static_cast<unsigned int>(round(25000000 / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(25000000 / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS))); // !!
|
||||
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||
|
||||
if (!acq_dump.read_binary_acq())
|
||||
|
@ -188,7 +188,7 @@ void BeidouB3iPcpsAcquisitionTest::plot_grid()
|
||||
std::string basename = "./tmp-acq-bds-b3i/acquisition_C_B3";
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
auto samples_per_code = static_cast<unsigned int>(round(50000000 / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(50000000 / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS))); // !!
|
||||
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||
|
||||
if (!acq_dump.read_binary_acq())
|
||||
|
@ -191,7 +191,7 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid()
|
||||
std::string basename = "./tmp-acq-gal1/acquisition_E_1B";
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); // !!
|
||||
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code);
|
||||
|
||||
if (!acq_dump.read_binary_acq())
|
||||
|
@ -189,7 +189,7 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid()
|
||||
std::string basename = "./tmp-acq-gps1/acquisition_G_1C";
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); // !!
|
||||
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||
|
||||
if (!acq_dump.read_binary_acq())
|
||||
|
@ -165,7 +165,7 @@ void GpsL2MPcpsAcquisitionTest::init()
|
||||
gnss_synchro.Signal[2] = 0; // make sure that string length is only two characters
|
||||
gnss_synchro.PRN = 7;
|
||||
|
||||
nsamples = round(static_cast<double>(sampling_frequency_hz) * GPS_L2_M_PERIOD) * 2;
|
||||
nsamples = round(static_cast<double>(sampling_frequency_hz) * GPS_L2_M_PERIOD_S) * 2;
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(sampling_frequency_hz));
|
||||
config->set_property("Acquisition_2S.implementation", "GPS_L2_M_PCPS_Acquisition");
|
||||
config->set_property("Acquisition_2S.item_type", "gr_complex");
|
||||
@ -193,7 +193,7 @@ void GpsL2MPcpsAcquisitionTest::plot_grid()
|
||||
std::string basename = "./tmp-acq-gps2/acquisition_test_G_2S";
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
auto samples_per_code = static_cast<unsigned int>(floor(static_cast<double>(sampling_frequency_hz) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS))));
|
||||
auto samples_per_code = static_cast<unsigned int>(floor(static_cast<double>(sampling_frequency_hz) / (GPS_L2_M_CODE_RATE_CPS / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS))));
|
||||
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||
if (!acq_dump.read_binary_acq())
|
||||
{
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include "tracking_true_obs_reader.h"
|
||||
#include "true_observables_reader.h"
|
||||
#include <armadillo>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
@ -481,22 +482,22 @@ bool HybridObservablesTest::acquire_signal()
|
||||
switch (mapStringValues_[signal])
|
||||
{
|
||||
case evGPS_1C:
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_2S:
|
||||
opt_fs = GPS_L2C_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L2C_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
opt_fs = GPS_L5_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L5_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
opt_fs = GALILEO_E1_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GALILEO_E1_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_5X:
|
||||
opt_fs = GALILEO_E5A_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GALILEO_E5A_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGLO_1G:
|
||||
opt_fs = baseband_sampling_freq;
|
||||
@ -1732,7 +1733,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
|
||||
std::cout << "Initial Doppler [Hz]=" << true_reader_vec.back()->doppler_l1_hz << " Initial code delay [Chips]="
|
||||
<< true_reader_vec.back()->prn_delay_chips << std::endl;
|
||||
n.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_reader_vec.back()->prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD;
|
||||
n.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_reader_vec.back()->prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S;
|
||||
n.Acq_doppler_hz = true_reader_vec.back()->doppler_l1_hz;
|
||||
n.Acq_samplestamp_samples = 0;
|
||||
}
|
||||
|
@ -595,19 +595,19 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
unsigned int nsamples_to_transfer;
|
||||
if (implementation == "GPS_L1_CA_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E5a_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else // (if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0))
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
|
||||
int acq_doppler_max = config->property("Acquisition.doppler_max", FLAGS_external_signal_acquisition_doppler_max_hz);
|
||||
@ -1528,7 +1528,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
|
||||
std::cout << "Initial Doppler [Hz]=" << true_reader_vec.back()->doppler_l1_hz << " Initial code delay [Chips]="
|
||||
<< true_reader_vec.back()->prn_delay_chips << std::endl;
|
||||
n.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_reader_vec.back()->prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD;
|
||||
n.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_reader_vec.back()->prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S;
|
||||
n.Acq_doppler_hz = true_reader_vec.back()->doppler_l1_hz;
|
||||
n.Acq_samplestamp_samples = 0;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
||||
true_obs_data.restart();
|
||||
|
||||
std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl;
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD;
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S;
|
||||
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
gnss_synchro.Acq_samplestamp_samples = 0;
|
||||
|
||||
|
@ -588,7 +588,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
||||
std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl;
|
||||
std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl;
|
||||
acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD;
|
||||
acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD_S;
|
||||
// restart the epoch counter
|
||||
true_obs_data.restart();
|
||||
}
|
||||
@ -754,7 +754,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
||||
code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error, rmse);
|
||||
for (double code_phase_error_chip : code_phase_error_chips)
|
||||
{
|
||||
code_phase_error_meters.push_back(GPS_L1_CA_CHIP_PERIOD * code_phase_error_chip * GPS_C_M_S);
|
||||
code_phase_error_meters.push_back(GPS_L1_CA_CHIP_PERIOD_S * code_phase_error_chip * GPS_C_M_S);
|
||||
}
|
||||
mean_code_phase_error.push_back(mean_error);
|
||||
std_dev_code_phase_error.push_back(std_dev_error);
|
||||
|
@ -499,7 +499,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
<< " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips
|
||||
<< std::endl;
|
||||
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD;
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S;
|
||||
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
gnss_synchro.Acq_samplestamp_samples = 0;
|
||||
|
||||
|
@ -413,7 +413,7 @@ TEST_F(GpsL1CAKfTrackingTest, ValidationOfResults)
|
||||
true_obs_data.restart();
|
||||
|
||||
std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl;
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD;
|
||||
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD_S;
|
||||
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
gnss_synchro.Acq_samplestamp_samples = 0;
|
||||
|
||||
@ -548,7 +548,7 @@ TEST_F(GpsL1CAKfTrackingTest, ValidationOfResults)
|
||||
for (auto it = prompt.begin(); it != prompt.end(); it++)
|
||||
{
|
||||
timevec.push_back(t);
|
||||
t = t + GPS_L1_CA_CODE_PERIOD;
|
||||
t = t + GPS_L1_CA_CODE_PERIOD_S;
|
||||
}
|
||||
Gnuplot g1("linespoints");
|
||||
g1.set_title("GPS L1 C/A signal tracking correlators' output (satellite PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")");
|
||||
|
@ -514,22 +514,22 @@ bool TrackingPullInTest::acquire_signal(int SV_ID)
|
||||
switch (mapStringValues_[signal])
|
||||
{
|
||||
case evGPS_1C:
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_2S:
|
||||
opt_fs = GPS_L2C_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L2C_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
opt_fs = GPS_L5_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L5_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GPS_L1_CA_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
opt_fs = GALILEO_E1_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GALILEO_E1_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGAL_5X:
|
||||
opt_fs = GALILEO_E5A_OPT_ACQ_FS_HZ;
|
||||
opt_fs = GALILEO_E5A_OPT_ACQ_FS_SPS;
|
||||
break;
|
||||
case evGLO_1G:
|
||||
opt_fs = baseband_sampling_freq;
|
||||
@ -779,7 +779,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults)
|
||||
std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl;
|
||||
std::cout << "True Initial Doppler " << true_obs_data.doppler_l1_hz << " [Hz], true Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << "[Chips]" << std::endl;
|
||||
true_acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
true_acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD;
|
||||
true_acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD_S;
|
||||
acq_samplestamp_samples = 0;
|
||||
}
|
||||
else
|
||||
@ -811,7 +811,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults)
|
||||
// simulate a Doppler error in acquisition
|
||||
gnss_synchro.Acq_doppler_hz = true_acq_doppler_hz + acq_doppler_error_hz_values.at(current_acq_doppler_error_idx);
|
||||
// simulate Code Delay error in acquisition
|
||||
gnss_synchro.Acq_delay_samples = true_acq_delay_samples + (acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) / GPS_L1_CA_CODE_RATE_HZ) * static_cast<double>(baseband_sampling_freq);
|
||||
gnss_synchro.Acq_delay_samples = true_acq_delay_samples + (acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) / GPS_L1_CA_CODE_RATE_CPS) * static_cast<double>(baseband_sampling_freq);
|
||||
|
||||
// create flowgraph
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
|
@ -683,19 +683,19 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
|
||||
unsigned int nsamples_to_transfer;
|
||||
if (implementation == "GPS_L1_CA_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E5a_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else // (if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0))
|
||||
{
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
nsamples_to_transfer = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
|
||||
int acq_doppler_max = config->property("Acquisition.doppler_max", FLAGS_external_signal_acquisition_doppler_max_hz);
|
||||
@ -921,7 +921,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl;
|
||||
std::cout << "True Initial Doppler " << true_obs_data.doppler_l1_hz << " [Hz], true Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << "[Chips]" << std::endl;
|
||||
true_acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
true_acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD;
|
||||
true_acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD_S;
|
||||
acq_samplestamp_samples = 0;
|
||||
}
|
||||
else
|
||||
@ -939,19 +939,19 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
unsigned int code_length;
|
||||
if (implementation == "GPS_L1_CA_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga")
|
||||
{
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else if (implementation == "Galileo_E5a_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
else // (if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0))
|
||||
{
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_CPS / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||
}
|
||||
|
||||
float nbits = ceilf(log2f(static_cast<float>(code_length)));
|
||||
@ -1009,7 +1009,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
// simulate a Doppler error in acquisition
|
||||
gnss_synchro.Acq_doppler_hz = true_acq_doppler_hz + acq_doppler_error_hz_values.at(current_acq_doppler_error_idx);
|
||||
// simulate Code Delay error in acquisition
|
||||
gnss_synchro.Acq_delay_samples = true_acq_delay_samples + (acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) / GPS_L1_CA_CODE_RATE_HZ) * static_cast<double>(baseband_sampling_freq);
|
||||
gnss_synchro.Acq_delay_samples = true_acq_delay_samples + (acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) / GPS_L1_CA_CODE_RATE_CPS) * static_cast<double>(baseband_sampling_freq);
|
||||
|
||||
// create flowgraph
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
|
@ -215,7 +215,7 @@ bool front_end_capture(const std::shared_ptr<ConfigurationInterface>& configurat
|
||||
|
||||
//--- Find number of samples per spreading code ---
|
||||
int64_t fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", 2048000);
|
||||
int samples_per_code = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
int samples_per_code = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
int nsamples = samples_per_code * 50;
|
||||
|
||||
int skip_samples = fs_in_ * 5; // skip 5 seconds
|
||||
|
Loading…
Reference in New Issue
Block a user