mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-21 21:40:18 +00:00
Remove tabs
This commit is contained in:
parent
b2045076bd
commit
c5b3e7597a
@ -58,8 +58,8 @@ extern "C"
|
||||
} UncompressedEphemeris_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_ephemE_17; // (Use -fall-defs-global to expose) */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_ephemAPowerHalf_19; // (Use -fall-defs-global to expose) */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_ephemE_17; // (Use -fall-defs-global to expose) */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_ephemAPowerHalf_19; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_UncompressedEphemeris;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -116,8 +116,8 @@ typedef unsigned int uint32_t;
|
||||
|
||||
#ifndef MIN /* Suitable for comparing primitive types (integers) */
|
||||
#if defined(__GNUC__)
|
||||
#define MIN(a, b) ({ __typeof a _a = a; __typeof b _b = b; \
|
||||
((_a)<(_b)?(_a):(_b)); })
|
||||
#define MIN(a, b) ({ __typeof a _a = a; __typeof b _b = b; \
|
||||
((_a)<(_b)?(_a):(_b)); })
|
||||
#else /* !__GNUC__ */
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b)) /* Unsafe variant */
|
||||
#endif /* __GNUC__ */
|
||||
|
@ -43,7 +43,7 @@ extern "C"
|
||||
} AltitudeInfo_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_altitudeDirection_2; // (Use -fall-defs-global to expose) */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_altitudeDirection_2; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_AltitudeInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -57,7 +57,7 @@ extern "C"
|
||||
} PositionEstimate_t;
|
||||
|
||||
/* Implementation */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_latitudeSign_2; // (Use -fall-defs-global to expose) */
|
||||
/* extern asn_TYPE_descriptor_t asn_DEF_latitudeSign_2; // (Use -fall-defs-global to expose) */
|
||||
extern asn_TYPE_descriptor_t asn_DEF_PositionEstimate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -116,8 +116,8 @@ typedef unsigned int uint32_t;
|
||||
|
||||
#ifndef MIN /* Suitable for comparing primitive types (integers) */
|
||||
#if defined(__GNUC__)
|
||||
#define MIN(a, b) ({ __typeof a _a = a; __typeof b _b = b; \
|
||||
((_a)<(_b)?(_a):(_b)); })
|
||||
#define MIN(a, b) ({ __typeof a _a = a; __typeof b _b = b; \
|
||||
((_a)<(_b)?(_a):(_b)); })
|
||||
#else /* !__GNUC__ */
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b)) /* Unsafe variant */
|
||||
#endif /* __GNUC__ */
|
||||
|
@ -148,7 +148,7 @@ private:
|
||||
///\brief checks if file is available
|
||||
///
|
||||
/// \param filename --> the filename
|
||||
/// \param mode --> the mode [optional,default value = 0]
|
||||
/// \param mode --> the mode [optional,default value = 0]
|
||||
///
|
||||
/// \return file exists (yes == true, no == false)
|
||||
// ---------------------------------------------------------------------------------
|
||||
@ -158,7 +158,7 @@ private:
|
||||
///\brief checks if file exists
|
||||
///
|
||||
/// \param filename --> the filename
|
||||
/// \param mode --> the mode [optional,default value = 0]
|
||||
/// \param mode --> the mode [optional,default value = 0]
|
||||
///
|
||||
/// \return file exists (yes == true, no == false)
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
@ -615,7 +615,6 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
int acq_doppler_max = config->property("Acquisition.doppler_max", FLAGS_external_signal_acquisition_doppler_max_hz);
|
||||
int acq_doppler_step = config->property("Acquisition.doppler_step", FLAGS_external_signal_acquisition_doppler_step_hz);
|
||||
|
||||
|
||||
for (unsigned int PRN = 1; PRN < MAX_PRN_IDX; PRN++)
|
||||
{
|
||||
tmp_gnss_synchro.PRN = PRN;
|
||||
@ -709,7 +708,6 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
tmp_gnss_synchro.Acq_samplestamp_samples = 0; // do not take into account the filter internal state initialisation
|
||||
tmp_gnss_synchro.Acq_samplestamp_samples = tmp_gnss_synchro.Acq_samplestamp_samples; // delay due to the downsampling filter in the acquisition
|
||||
|
||||
|
||||
gnss_synchro_vec.push_back(tmp_gnss_synchro);
|
||||
}
|
||||
else
|
||||
@ -717,10 +715,7 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
std::cout << " . ";
|
||||
}
|
||||
|
||||
|
||||
top_block->stop();
|
||||
|
||||
|
||||
std::cout.flush();
|
||||
}
|
||||
std::cout << "]" << std::endl;
|
||||
@ -857,6 +852,7 @@ void HybridObservablesTestFpga::configure_receiver(
|
||||
std::cout << "*****************************************\n";
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTestFpga::check_results_carrier_phase(
|
||||
arma::mat& true_ch0,
|
||||
arma::vec& true_tow_s,
|
||||
@ -1195,6 +1191,7 @@ void HybridObservablesTestFpga::check_results_carrier_doppler(
|
||||
ASSERT_LT(rmse_ch0, 30);
|
||||
}
|
||||
|
||||
|
||||
bool HybridObservablesTestFpga::save_mat_xy(std::vector<double>& x, std::vector<double>& y, std::string filename)
|
||||
{
|
||||
try
|
||||
@ -1230,6 +1227,7 @@ bool HybridObservablesTestFpga::save_mat_xy(std::vector<double>& x, std::vector<
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTestFpga::check_results_code_pseudorange(
|
||||
arma::mat& true_ch0,
|
||||
arma::mat& true_ch1,
|
||||
@ -1319,6 +1317,7 @@ void HybridObservablesTestFpga::check_results_code_pseudorange(
|
||||
ASSERT_GT(min_error, -10.0);
|
||||
}
|
||||
|
||||
|
||||
bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_Synchro gnss)
|
||||
{
|
||||
// Open and read reference RINEX observables file
|
||||
@ -1459,6 +1458,8 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
{
|
||||
// pointer to the DMA thread that sends the samples to the acquisition engine
|
||||
@ -1475,7 +1476,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
generate_signal();
|
||||
}
|
||||
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
std::chrono::duration<double> elapsed_seconds(0);
|
||||
|
||||
@ -1556,7 +1556,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The HW has been reset after the acquisition phase when the acquisition class was destroyed.
|
||||
// No more samples remained in the DMA. Therefore any intermediate state in the LPF of the
|
||||
// GPS L1 / Galileo E1 filter has been cleared.
|
||||
@ -1567,7 +1566,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
// instantiate the acquisition modules in order to use them to reset the HW.
|
||||
// (note that the constructor of the acquisition modules resets the HW too)
|
||||
|
||||
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
|
||||
// reset the HW to clear the sample counters: the acquisition constructor generates a reset
|
||||
@ -1597,18 +1595,16 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
throw(std::exception());
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<TrackingInterface>> tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface>> tlm_ch_vec;
|
||||
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sink_vec;
|
||||
for (unsigned int n = 0; n < gnss_synchro_vec.size(); n++)
|
||||
{
|
||||
//set channels ids
|
||||
// set channels ids
|
||||
gnss_synchro_vec.at(n).Channel_ID = n;
|
||||
|
||||
//create the tracking channels and create the telemetry decoders
|
||||
|
||||
// create the tracking channels and create the telemetry decoders
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", config->property("Tracking.implementation", std::string("undefined")), 1, 1);
|
||||
tracking_ch_vec.push_back(std::dynamic_pointer_cast<TrackingInterface>(trk_));
|
||||
std::shared_ptr<GNSSBlockInterface> tlm_ = factory->GetBlock(config, "TelemetryDecoder", config->property("TelemetryDecoder.implementation", std::string("undefined")), 1, 1);
|
||||
@ -1673,7 +1669,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
gnss_sdr_fpga_sample_counter_sptr ch_out_fpga_sample_counter;
|
||||
ch_out_fpga_sample_counter = gnss_sdr_make_fpga_sample_counter(fs, observable_interval_ms);
|
||||
|
||||
|
||||
for (unsigned int n = 0; n < tracking_ch_vec.size(); n++)
|
||||
{
|
||||
//top_block->connect(gr_interleaved_char_to_complex, 0, tracking_ch_vec.at(n)->get_left_block(), 0);
|
||||
@ -1687,10 +1682,8 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
top_block->connect(ch_out_fpga_sample_counter, 0, observables->get_left_block(), tracking_ch_vec.size()); //extra port for the sample counter pulse
|
||||
}) << "Failure connecting the blocks.";
|
||||
|
||||
|
||||
args.file = file;
|
||||
args.nsamples_tx = baseband_sampling_freq * FLAGS_duration;
|
||||
;
|
||||
|
||||
args.skip_used_samples = 0;
|
||||
|
||||
@ -1699,7 +1692,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
for (auto& n : tracking_ch_vec)
|
||||
{
|
||||
n->start_tracking();
|
||||
@ -1709,10 +1701,8 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
send_samples_start_obs_test = 1;
|
||||
pthread_mutex_unlock(&mutex_obs_test);
|
||||
|
||||
|
||||
top_block->start();
|
||||
|
||||
|
||||
EXPECT_NO_THROW({
|
||||
start = std::chrono::system_clock::now();
|
||||
//top_block->run(); // Start threads and wait
|
||||
@ -1720,30 +1710,25 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
|
||||
// wait for the child DMA process to finish
|
||||
pthread_join(thread_DMA, nullptr);
|
||||
|
||||
|
||||
top_block->stop();
|
||||
|
||||
|
||||
// reset the HW AGAIN
|
||||
acquisition->stop_acquisition();
|
||||
|
||||
// pthread_mutex_lock(&mutex_obs_test);
|
||||
// send_samples_start_obs_test = 0;
|
||||
// pthread_mutex_unlock(&mutex_obs_test);
|
||||
|
||||
// pthread_mutex_lock(&mutex_obs_test);
|
||||
// send_samples_start_obs_test = 0;
|
||||
// pthread_mutex_unlock(&mutex_obs_test);
|
||||
|
||||
|
||||
//check results
|
||||
// check results
|
||||
// Matrices for storing columnwise true GPS time, Range, Doppler and Carrier phase
|
||||
std::vector<arma::mat> true_obs_vec;
|
||||
|
||||
if (!FLAGS_enable_external_signal_file)
|
||||
{
|
||||
//load the true values
|
||||
// load the true values
|
||||
True_Observables_Reader true_observables;
|
||||
ASSERT_NO_THROW({
|
||||
if (true_observables.open_obs_file(std::string("./obs_out.bin")) == false)
|
||||
@ -1789,8 +1774,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
<< "Failure reading RINEX file";
|
||||
}
|
||||
|
||||
|
||||
//read measured values
|
||||
// read measured values
|
||||
Observables_Dump_Reader estimated_observables(tracking_ch_vec.size());
|
||||
ASSERT_NO_THROW({
|
||||
if (estimated_observables.open_obs_file(std::string("./observables.dat")) == false)
|
||||
@ -1828,8 +1812,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Cut measurement tail zeros
|
||||
// Cut measurement tail zeros
|
||||
arma::uvec index;
|
||||
for (auto& n : measured_obs_vec)
|
||||
{
|
||||
@ -1840,7 +1823,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
//Cut measurement initial transitory of the measurements
|
||||
// Cut measurement initial transitory of the measurements
|
||||
|
||||
double initial_transitory_s = FLAGS_skip_obs_transitory_s;
|
||||
|
||||
@ -1859,12 +1842,11 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
// decoding of the ephemeris data and solve the PVT equations)
|
||||
|
||||
//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
|
||||
//decoding of the ephemeris data and solve the PVT equations)
|
||||
|
||||
//Find the reference satellite (the nearest) and compute the receiver time offset at observable level
|
||||
// Find the reference satellite (the nearest) and compute the receiver time offset at observable level
|
||||
double min_pr = std::numeric_limits<double>::max();
|
||||
unsigned int min_pr_ch_id = 0;
|
||||
for (unsigned int n = 0; n < measured_obs_vec.size(); n++)
|
||||
@ -1969,6 +1951,5 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user