mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-07-26 13:52:54 +00:00
Fixing test
This commit is contained in:
parent
8cd59646bb
commit
85c35ea0a5
@ -304,6 +304,11 @@ float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
|||||||
return threshold;
|
return threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_state(int state)
|
||||||
|
{
|
||||||
|
acquisition_cc_->set_state(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::connect(gr::top_block_sptr top_block)
|
void GalileoE5aNoncoherentIQAcquisitionCaf::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
|
@ -129,6 +129,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief If set to 1, ensures that acquisition starts at the
|
||||||
|
* first available sample.
|
||||||
|
* \param state - int=1 forces start of acquisition
|
||||||
|
*/
|
||||||
|
void set_state(int state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;
|
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;
|
||||||
|
@ -304,6 +304,8 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items,
|
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items,
|
||||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items)
|
gr_vector_void_star &output_items)
|
||||||
|
@ -172,13 +172,13 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int state)
|
|||||||
d_state = state;
|
d_state = state;
|
||||||
if (d_state == 1)
|
if (d_state == 1)
|
||||||
{
|
{
|
||||||
d_gnss_synchro->Acq_delay_samples = 0.0;
|
d_gnss_synchro->Acq_delay_samples = 0.0;
|
||||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||||
d_well_count = 0;
|
d_well_count = 0;
|
||||||
d_mag = 0.0;
|
d_mag = 0.0;
|
||||||
d_input_power = 0.0;
|
d_input_power = 0.0;
|
||||||
d_test_statistics = 0.0;
|
d_test_statistics = 0.0;
|
||||||
}
|
}
|
||||||
else if (d_state == 0)
|
else if (d_state == 0)
|
||||||
{}
|
{}
|
||||||
|
@ -646,6 +646,8 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
||||||
|
|
||||||
|
acquisition->reset();
|
||||||
|
acquisition->init();
|
||||||
// USING SIGNAL FROM FILE SOURCE
|
// USING SIGNAL FROM FILE SOURCE
|
||||||
/*
|
/*
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
@ -676,7 +678,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
{
|
{
|
||||||
gnss_synchro.PRN = 19; //real
|
gnss_synchro.PRN = 19; //real
|
||||||
//gnss_synchro.PRN = 11; //sim
|
//gnss_synchro.PRN = 11; //sim
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
// case 1:
|
// case 1:
|
||||||
// {
|
// {
|
||||||
@ -702,10 +704,14 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
// {
|
// {
|
||||||
// gnss_synchro.PRN = 19; // This satellite is not visible
|
// gnss_synchro.PRN = 19; // This satellite is not visible
|
||||||
// }
|
// }
|
||||||
acquisition->set_local_code();
|
|
||||||
|
|
||||||
start_queue();
|
start_queue();
|
||||||
|
|
||||||
|
acquisition->reset();
|
||||||
|
acquisition->init();
|
||||||
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
|
acquisition->set_local_code();
|
||||||
|
acquisition->set_state(1);
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block."<< std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user