mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-30 22:56:22 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into osnma
This commit is contained in:
commit
ab81fdaca9
@ -31,6 +31,11 @@ All notable changes to GNSS-SDR will be documented in this file.
|
|||||||
- `geohash`, an
|
- `geohash`, an
|
||||||
[encoded geographic location](https://en.wikipedia.org/wiki/Geohash).
|
[encoded geographic location](https://en.wikipedia.org/wiki/Geohash).
|
||||||
|
|
||||||
|
### Improvements in Maintainability
|
||||||
|
|
||||||
|
- Removed useless casts and shadowed variables, improving source code
|
||||||
|
readability.
|
||||||
|
|
||||||
### Improvements in Portability:
|
### Improvements in Portability:
|
||||||
|
|
||||||
- Updated local `cpu_features` library to v0.9.0.
|
- Updated local `cpu_features` library to v0.9.0.
|
||||||
|
@ -11309,7 +11309,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
|||||||
it++)
|
it++)
|
||||||
{
|
{
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
const auto satsys_gal = satelliteSystem.find("Galileo");
|
|
||||||
if (satsys_gal != satelliteSystem.cend())
|
if (satsys_gal != satelliteSystem.cend())
|
||||||
{
|
{
|
||||||
lineObs += satsys_gal->second;
|
lineObs += satsys_gal->second;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
uint32_t gps_l2c_m_shift(uint32_t x)
|
uint32_t gps_l2c_m_shift(uint32_t x)
|
||||||
{
|
{
|
||||||
return static_cast<uint32_t>((x >> 1U) xor ((x & 1U) * 0445112474U));
|
return ((x >> 1U) xor ((x & 1U) * 0445112474U));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ void gps_l5i_code_gen_complex_sampled(own::span<std::complex<float>> dest, uint3
|
|||||||
// === Digitizing ==================================================
|
// === Digitizing ==================================================
|
||||||
|
|
||||||
// --- Make index array to read L5 code values ---------------------
|
// --- Make index array to read L5 code values ---------------------
|
||||||
codeValueIndex = static_cast<int32_t>(std::ceil(ts * static_cast<float>(i + 1.0F) / tc)) - 1;
|
codeValueIndex = static_cast<int32_t>(std::ceil(ts * (i + 1.0F) / tc)) - 1;
|
||||||
|
|
||||||
// --- Make the digitized version of the L5I code ------------------
|
// --- Make the digitized version of the L5I code ------------------
|
||||||
if (i == samplesPerCode - 1)
|
if (i == samplesPerCode - 1)
|
||||||
@ -282,7 +282,7 @@ void gps_l5q_code_gen_complex_sampled(own::span<std::complex<float>> dest, uint3
|
|||||||
// === Digitizing ==================================================
|
// === Digitizing ==================================================
|
||||||
|
|
||||||
// --- Make index array to read L5 code values ---------------------
|
// --- Make index array to read L5 code values ---------------------
|
||||||
codeValueIndex = static_cast<int32_t>(std::ceil(ts * static_cast<float>(i + 1.0F) / tc)) - 1;
|
codeValueIndex = static_cast<int32_t>(std::ceil(ts * (i + 1.0F) / tc)) - 1;
|
||||||
|
|
||||||
// --- Make the digitized version of the L5Q code ------------------
|
// --- Make the digitized version of the L5Q code ------------------
|
||||||
if (i == samplesPerCode - 1)
|
if (i == samplesPerCode - 1)
|
||||||
|
@ -43,7 +43,7 @@ ZmqSignalSource::ZmqSignalSource(const ConfigurationInterface* configuration,
|
|||||||
{
|
{
|
||||||
LOG(INFO) << "Connecting to ZMQ pub at " << endpoint;
|
LOG(INFO) << "Connecting to ZMQ pub at " << endpoint;
|
||||||
// work around gnuradio interface const-deficiency
|
// work around gnuradio interface const-deficiency
|
||||||
d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, endpoint.data(), timeout_ms, pass_tags, hwm);
|
d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, const_cast<char*>(endpoint.data()), timeout_ms, pass_tags, hwm);
|
||||||
|
|
||||||
// work around another bug. GNU Radio passes tags through the ZMQ block
|
// work around another bug. GNU Radio passes tags through the ZMQ block
|
||||||
// unconditionally if pass_tags is true, but that flag controls protocol more
|
// unconditionally if pass_tags is true, but that flag controls protocol more
|
||||||
|
@ -423,8 +423,9 @@ int Viterbi_Decoder_Sbas::parity_counter(int symbol, int length)
|
|||||||
|
|
||||||
|
|
||||||
// prev helper class
|
// prev helper class
|
||||||
Viterbi_Decoder_Sbas::Prev::Prev(int states, int t) : num_states(states),
|
Viterbi_Decoder_Sbas::Prev::Prev(int states,
|
||||||
t(t),
|
int tt) : num_states(states),
|
||||||
|
t(tt),
|
||||||
refcount(1)
|
refcount(1)
|
||||||
{
|
{
|
||||||
state = std::vector<int>(num_states);
|
state = std::vector<int>(num_states);
|
||||||
|
@ -56,7 +56,7 @@ private:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int num_states;
|
int num_states;
|
||||||
Prev(int states, int t);
|
Prev(int states, int tt);
|
||||||
Prev(const Prev& prev);
|
Prev(const Prev& prev);
|
||||||
Prev& operator=(const Prev& other);
|
Prev& operator=(const Prev& other);
|
||||||
~Prev();
|
~Prev();
|
||||||
|
@ -602,10 +602,10 @@ float Galileo_HAS_data::get_code_bias_m(const std::string& signal, int PRN) cons
|
|||||||
if (!code_bias.empty() && !targeted_system.empty())
|
if (!code_bias.empty() && !targeted_system.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> systems = this->get_systems_string();
|
std::vector<std::string> systems = this->get_systems_string();
|
||||||
auto Nsys = systems.size();
|
auto Nsys_ = systems.size();
|
||||||
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
||||||
|
|
||||||
if (static_cast<size_t>(nsys_index) < Nsys)
|
if (static_cast<size_t>(nsys_index) < Nsys_)
|
||||||
{
|
{
|
||||||
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
||||||
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
||||||
@ -678,10 +678,10 @@ float Galileo_HAS_data::get_phase_bias_cycle(const std::string& signal, int PRN)
|
|||||||
if (!phase_bias.empty() && !targeted_system.empty())
|
if (!phase_bias.empty() && !targeted_system.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> systems = this->get_systems_string();
|
std::vector<std::string> systems = this->get_systems_string();
|
||||||
auto Nsys = systems.size();
|
auto Nsys_ = systems.size();
|
||||||
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
auto nsys_index = std::distance(systems.cbegin(), std::find(systems.cbegin(), systems.cend(), targeted_system));
|
||||||
|
|
||||||
if (static_cast<size_t>(nsys_index) < Nsys)
|
if (static_cast<size_t>(nsys_index) < Nsys_)
|
||||||
{
|
{
|
||||||
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
std::vector<std::string> signals = get_signals_in_mask(static_cast<uint8_t>(nsys_index));
|
||||||
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
auto sig_index = std::distance(signals.cbegin(), std::find(signals.cbegin(), signals.cend(), signal));
|
||||||
|
@ -32,7 +32,7 @@ TEST(ComplexCarrierTest, StandardComplexImplementation)
|
|||||||
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
|
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
|
||||||
const double _f = 2000.0;
|
const double _f = 2000.0;
|
||||||
const double _fs = 2000000.0;
|
const double _fs = 2000000.0;
|
||||||
const auto phase_step = static_cast<double>((TWO_PI * _f) / _fs);
|
const auto phase_step = (TWO_PI * _f) / _fs;
|
||||||
double phase = 0.0;
|
double phase = 0.0;
|
||||||
|
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
@ -72,7 +72,7 @@ TEST(ComplexCarrierTest, C11ComplexImplementation)
|
|||||||
std::vector<std::complex<float>> output(FLAGS_size_carrier_test);
|
std::vector<std::complex<float>> output(FLAGS_size_carrier_test);
|
||||||
const double _f = 2000.0;
|
const double _f = 2000.0;
|
||||||
const double _fs = 2000000.0;
|
const double _fs = 2000000.0;
|
||||||
const auto phase_step = static_cast<double>((TWO_PI * _f) / _fs);
|
const auto phase_step = (TWO_PI * _f) / _fs;
|
||||||
double phase = 0.0;
|
double phase = 0.0;
|
||||||
|
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
|
@ -387,7 +387,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (static_cast<double>(gnss_synchro.Acq_delay_samples) - 5) * 1023.0 / static_cast<double>(fs_in * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (static_cast<double>(gnss_synchro.Acq_delay_samples) - 5) * 1023.0 / (fs_in * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -387,7 +387,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -501,7 +501,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -389,7 +389,7 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -467,19 +467,19 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::process_message()
|
|||||||
switch (sat)
|
switch (sat)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips1) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips1) - (gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
doppler_error_hz = std::abs(expected_doppler_hz1 - gnss_synchro.Acq_doppler_hz);
|
doppler_error_hz = std::abs(expected_doppler_hz1 - gnss_synchro.Acq_doppler_hz);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips2) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips2) - (gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
doppler_error_hz = std::abs(expected_doppler_hz2 - gnss_synchro.Acq_doppler_hz);
|
doppler_error_hz = std::abs(expected_doppler_hz2 - gnss_synchro.Acq_doppler_hz);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips3) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
delay_error_chips = std::abs(static_cast<double>(expected_delay_chips3) - (gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
doppler_error_hz = std::abs(expected_doppler_hz3 - gnss_synchro.Acq_doppler_hz);
|
doppler_error_hz = std::abs(expected_doppler_hz3 - gnss_synchro.Acq_doppler_hz);
|
||||||
break;
|
break;
|
||||||
default: // case 3
|
default: // case 3
|
||||||
|
@ -264,7 +264,7 @@ void GalileoE5bPcpsAcquisitionTest::process_message()
|
|||||||
{
|
{
|
||||||
if (message == 1)
|
if (message == 1)
|
||||||
{
|
{
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 10230.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
/*
|
/*
|
||||||
|
@ -264,7 +264,7 @@ void GalileoE6PcpsAcquisitionTest::process_message()
|
|||||||
{
|
{
|
||||||
if (message == 1)
|
if (message == 1)
|
||||||
{
|
{
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * GALILEO_E6_B_CODE_LENGTH_CHIPS / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * GALILEO_E6_B_CODE_LENGTH_CHIPS / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
/*
|
/*
|
||||||
|
@ -388,7 +388,7 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -388,7 +388,7 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -490,7 +490,7 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -382,7 +382,7 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test::process_message()
|
|||||||
detection_counter++;
|
detection_counter++;
|
||||||
|
|
||||||
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
// The term -5 is here to correct the additional delay introduced by the FIR filter
|
||||||
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - static_cast<double>(gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
double delay_error_chips = std::abs(static_cast<double>(expected_delay_chips) - (gnss_synchro.Acq_delay_samples - 5) * 1023.0 / (static_cast<double>(fs_in) * 1e-3));
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
mse_delay += std::pow(delay_error_chips, 2);
|
mse_delay += std::pow(delay_error_chips, 2);
|
||||||
|
@ -347,9 +347,9 @@ TEST_F(DataTypeAdapter, IshortToComplexValidationOfResults)
|
|||||||
{
|
{
|
||||||
while (ifs.read(reinterpret_cast<char*>(&iSample), sizeof(gr_complex)))
|
while (ifs.read(reinterpret_cast<char*>(&iSample), sizeof(gr_complex)))
|
||||||
{
|
{
|
||||||
EXPECT_EQ(input_data_shorts.at(i), static_cast<int16_t>(iSample.real()));
|
EXPECT_EQ(input_data_shorts.at(i), iSample.real());
|
||||||
i++;
|
i++;
|
||||||
EXPECT_EQ(input_data_shorts.at(i), static_cast<int16_t>(iSample.imag()));
|
EXPECT_EQ(input_data_shorts.at(i), iSample.imag());
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,9 +373,9 @@ TEST_F(DataTypeAdapter, IshortToCshortValidationOfResults)
|
|||||||
{
|
{
|
||||||
while (ifs.read(reinterpret_cast<char*>(&iSample), sizeof(lv_16sc_t)))
|
while (ifs.read(reinterpret_cast<char*>(&iSample), sizeof(lv_16sc_t)))
|
||||||
{
|
{
|
||||||
EXPECT_EQ(input_data_shorts.at(i), static_cast<int16_t>(iSample.real()));
|
EXPECT_EQ(input_data_shorts.at(i), iSample.real());
|
||||||
i++;
|
i++;
|
||||||
EXPECT_EQ(input_data_shorts.at(i), static_cast<int16_t>(iSample.imag()));
|
EXPECT_EQ(input_data_shorts.at(i), iSample.imag());
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user