1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-17 20:53:02 +00:00

Fix tests

This commit is contained in:
Antonio Ramos 2018-03-20 17:24:16 +01:00
parent 06dbe4cf4e
commit 5a86de623b
8 changed files with 119 additions and 116 deletions

View File

@ -78,7 +78,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl;
}
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
}

View File

@ -81,7 +81,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
}
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
}

View File

@ -84,7 +84,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
{
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
}
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)
if ((symbols_extended_correlator > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
}

View File

@ -80,7 +80,7 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking(
extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
}
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
}

View File

@ -641,7 +641,6 @@ private:
{
public:
Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {}
inline void start()
{
room_.join(shared_from_this());
@ -665,12 +664,13 @@ private:
boost::asio::async_read(socket_,
boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length),
[this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec && read_msg_.decode_header())
if (!ec and read_msg_.decode_header())
{
do_read_message_body();
}
else if (!ec && !read_msg_.decode_header())
else if (!ec and !read_msg_.decode_header())
{
/* TODO: The commented code throws an exception. Solve it!
client_says += read_msg_.data();
bool first = true;
while (client_says.length() >= 80)
@ -683,6 +683,7 @@ private:
std::cout << client_says.substr(0, 80) << std::endl;
client_says = client_says.substr(80, client_says.length() - 80);
}
*/
do_read_message_header();
}
else
@ -719,8 +720,7 @@ private:
{
auto self(shared_from_this());
boost::asio::async_write(socket_,
boost::asio::buffer(write_msgs_.front().body(),
write_msgs_.front().body_length()),
boost::asio::buffer(write_msgs_.front().body(), write_msgs_.front().body_length()),
[this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec)
{

View File

@ -281,12 +281,12 @@ void HybridObservablesTest::configure_receiver()
// Set Tracking
config->set_property("Tracking_1C.item_type", "gr_complex");
config->set_property("Tracking_1C.if", "0");
config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
config->set_property("Tracking_1C.pll_bw_hz", "35.0");
config->set_property("Tracking_1C.dll_bw_hz", "0.5");
config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.unified", "true");
config->set_property("TelemetryDecoder_1C.dump", "true");
config->set_property("Observables.dump", "true");
@ -690,18 +690,26 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
//Cut measurement tail zeros
arma::uvec index = arma::find(measured_ch0.col(0) > 0.0, 1, "last");
if ((index.size() > 0) and index(0) < (nepoch - 1))
{ measured_ch0.shed_rows(index(0) + 1, nepoch - 1); }
{
measured_ch0.shed_rows(index(0) + 1, nepoch - 1);
}
index = arma::find(measured_ch1.col(0) > 0.0, 1, "last");
if ((index.size() > 0) and index(0) < (nepoch - 1))
{ measured_ch1.shed_rows(index(0) + 1, nepoch - 1); }
{
measured_ch1.shed_rows(index(0) + 1, nepoch - 1);
}
//Cut measurement initial transitory of the measurements
index = arma::find(measured_ch0.col(0) >= true_ch0(0, 0), 1, "first");
if ((index.size() > 0) and (index(0) > 0))
{ measured_ch0.shed_rows(0, index(0)); }
{
measured_ch0.shed_rows(0, index(0));
}
index = arma::find(measured_ch1.col(0) >= true_ch1(0, 0), 1, "first");
if ((index.size() > 0) and (index(0) > 0))
{ measured_ch1.shed_rows(0, index(0)); }
{
measured_ch1.shed_rows(0, index(0));
}
//Correct the clock error using true values (it is not possible for a receiver to correct
//the receiver clock offset error at the observables level because it is required the

View File

@ -265,13 +265,12 @@ void GpsL1CATelemetryDecoderTest::configure_receiver()
// Set Tracking
config->set_property("Tracking_1C.item_type", "gr_complex");
config->set_property("Tracking_1C.if", "0");
config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
config->set_property("Tracking_1C.pll_bw_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_hz", "1.5");
config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.unified", "true");
config->set_property("TelemetryDecoder_1C.dump", "true");
}

View File

@ -225,11 +225,7 @@ void GpsL1CADllPllTrackingTest::configure_receiver()
config->set_property("Tracking_1C.pll_bw_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_hz", "2.0");
config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.pll_bw_narrow_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_narrow_hz", "2.0");
config->set_property("Tracking_1C.early_late_space_narrow_chips", "0.5");
config->set_property("Tracking_1C.unified", "true");
config->set_property("Tracking_1C.extend_correlation_ms", "1");
config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
}
@ -395,7 +391,7 @@ TEST_F(GpsL1CADllPllTrackingTest, 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) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD;
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
gnss_synchro.Acq_samplestamp_samples = 0;