mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-11 18:00:34 +00:00
Remove unused parameters
This commit is contained in:
parent
d2e0bf973a
commit
6a5dbd97e5
@ -182,8 +182,6 @@ Resampler.implementation=Pass_Through
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition.sampled_ms=1
|
||||
;#threshold: Acquisition threshold
|
||||
|
@ -52,7 +52,6 @@ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.threshold=0.01
|
||||
;Acquisition_1C.pfa=0.00001
|
||||
Acquisition_1C.if=0
|
||||
Acquisition_1C.doppler_max=10000
|
||||
Acquisition_1C.doppler_step=250
|
||||
Acquisition_1C.dump=false;
|
||||
@ -62,7 +61,6 @@ Acquisition_1C.dump_filename=/archive/gps_acquisition.dat
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.if=60000
|
||||
Tracking_1C.early_late_space_chips=0.5
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=3.0;
|
||||
|
@ -65,7 +65,6 @@ Channel.signal=1C
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.if=0
|
||||
Acquisition_1C.sampled_ms=1
|
||||
Acquisition_1C.threshold=0.015
|
||||
Acquisition_1C.doppler_max=10000
|
||||
@ -78,7 +77,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.if=0
|
||||
Tracking_1C.pll_bw_hz=40.0;
|
||||
Tracking_1C.dll_bw_hz=2.0;
|
||||
Tracking_1C.order=3;
|
||||
|
@ -2,7 +2,7 @@
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; Sample configuration file for IFEN SX-NSR software receiver front-end
|
||||
; http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html
|
||||
; https://www.ifen.com/products/sx3-gnss-software-receiver/
|
||||
; This sample configuration is able to process directly .sream binary files
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
|
@ -2,7 +2,7 @@
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; Sample configuration file for IFEN SX-NSR software receiver front-end
|
||||
; http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html
|
||||
; https://www.ifen.com/products/sx3-gnss-software-receiver/
|
||||
; This sample configuration is able to process directly .sream binary files
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
@ -105,7 +105,6 @@ Channel.signal=1C
|
||||
;######### GPS ACQUISITION CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.if=0
|
||||
Acquisition_1C.sampled_ms=1
|
||||
Acquisition_1C.threshold=0.0075
|
||||
;Acquisition_1C.pfa=0.01
|
||||
@ -118,7 +117,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
;######### TRACKING GPS CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.if=0
|
||||
Tracking_1C.pll_bw_hz=45.0;
|
||||
Tracking_1C.dll_bw_hz=2.0;
|
||||
Tracking_1C.order=3;
|
||||
|
@ -97,7 +97,6 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_
|
||||
;######### TRACKING GALILEO CONFIG ############
|
||||
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
|
||||
Tracking_1B.item_type=gr_complex
|
||||
Tracking_1B.if=0
|
||||
Tracking_1B.track_pilot=true
|
||||
Tracking_1B.pll_bw_hz=4.0;
|
||||
Tracking_1B.dll_bw_hz=0.5;
|
||||
|
@ -188,7 +188,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.if=0
|
||||
Tracking_1C.dump=false
|
||||
Tracking_1C.dump_filename=../data/epl_tracking_ch_
|
||||
Tracking_1C.pll_bw_hz=40.0;
|
||||
@ -199,7 +198,6 @@ Tracking_1C.early_late_space_chips=0.5;
|
||||
;# GPS L2C M
|
||||
Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition
|
||||
Acquisition_2S.item_type=gr_complex
|
||||
Acquisition_2S.if=0
|
||||
Acquisition_2S.threshold=0.0005
|
||||
;Acquisition_2S.pfa=0.001
|
||||
Acquisition_2S.doppler_max=5000
|
||||
@ -211,7 +209,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat
|
||||
|
||||
Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking
|
||||
Tracking_2S.item_type=gr_complex
|
||||
Tracking_2S.if=0
|
||||
Tracking_2S.pll_bw_hz=1.5;
|
||||
Tracking_2S.dll_bw_hz=0.3;
|
||||
Tracking_2S.order=3;
|
||||
|
@ -264,7 +264,6 @@ int ObsGpsL1SystemTest::configure_receiver()
|
||||
// Set Acquisition
|
||||
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
||||
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_1C.if", std::to_string(zero));
|
||||
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
|
||||
config->set_property("Acquisition_1C.threshold", std::to_string(threshold));
|
||||
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
|
||||
@ -279,7 +278,6 @@ int ObsGpsL1SystemTest::configure_receiver()
|
||||
config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
//config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_C_Aid_Tracking");
|
||||
config->set_property("Tracking_1C.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1C.if", std::to_string(zero));
|
||||
config->set_property("Tracking_1C.dump", "false");
|
||||
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
|
||||
config->set_property("Tracking_1C.pll_bw_hz", std::to_string(pll_bw_hz));
|
||||
|
@ -188,7 +188,6 @@ void TtffTest::config_1()
|
||||
// Set Acquisition
|
||||
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
||||
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_1C.if", std::to_string(zero));
|
||||
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
|
||||
config->set_property("Acquisition_1C.threshold", std::to_string(threshold));
|
||||
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
|
||||
@ -202,7 +201,6 @@ void TtffTest::config_1()
|
||||
// Set Tracking
|
||||
config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_1C.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1C.if", std::to_string(zero));
|
||||
config->set_property("Tracking_1C.dump", "false");
|
||||
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
|
||||
config->set_property("Tracking_1C.pll_bw_hz", std::to_string(pll_bw_hz));
|
||||
|
@ -137,11 +137,10 @@ void GlonassL1CaDllPllCAidTrackingTest::init()
|
||||
gnss_synchro.PRN = 11;
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "6625000");
|
||||
config->set_property("Tracking_1G.implementation", "GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking");
|
||||
config->set_property("Tracking_1G.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1G.dump", "false");
|
||||
config->set_property("Tracking_1G.if", "0.0");
|
||||
config->set_property("Tracking_1G.dump_filename", "./tracking_ch_");
|
||||
config->set_property("Tracking_1G.implementation", "GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking");
|
||||
config->set_property("Tracking_1G.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking_1G.order", "2");
|
||||
config->set_property("Tracking_1G.pll_bw_hz", "2");
|
||||
|
@ -137,11 +137,10 @@ void GlonassL1CaDllPllTrackingTest::init()
|
||||
gnss_synchro.PRN = 11;
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "6625000");
|
||||
config->set_property("Tracking_1G.implementation", "GLONASS_L1_CA_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_1G.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1G.dump", "false");
|
||||
config->set_property("Tracking_1G.if", "0.0");
|
||||
config->set_property("Tracking_1G.dump_filename", "./tracking_ch_");
|
||||
config->set_property("Tracking_1G.implementation", "GLONASS_L1_CA_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_1G.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking_1G.order", "2");
|
||||
config->set_property("Tracking_1G.pll_bw_hz", "2");
|
||||
|
@ -36,8 +36,8 @@
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <armadillo>
|
||||
#include <boost/thread.hpp>// to test the FPGA we have to create a simultaneous task to send the samples using the DMA and stop the test
|
||||
#include <stdio.h>// FPGA read input file
|
||||
#include <boost/thread.hpp> // to test the FPGA we have to create a simultaneous task to send the samples using the DMA and stop the test
|
||||
#include <stdio.h> // FPGA read input file
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/analog/sig_source_waveform.h>
|
||||
@ -61,17 +61,17 @@
|
||||
#include "signal_generator_flags.h"
|
||||
#include "interleaved_byte_to_complex_short.h"
|
||||
|
||||
#define DMA_TRACK_TRANSFER_SIZE 2046 // DMA transfer size for tracking
|
||||
#define MIN_SAMPLES_REMAINING 20000 // number of remaining samples in the DMA that causes the CPU to stop the flowgraph (it has to be a bit alrger than 2x max packet size)
|
||||
#define FIVE_SECONDS 5000000 // five seconds in microseconds
|
||||
#define DMA_TRACK_TRANSFER_SIZE 2046 // DMA transfer size for tracking
|
||||
#define MIN_SAMPLES_REMAINING 20000 // number of remaining samples in the DMA that causes the CPU to stop the flowgraph (it has to be a bit alrger than 2x max packet size)
|
||||
#define FIVE_SECONDS 5000000 // five seconds in microseconds
|
||||
|
||||
void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
||||
int num_remaining_samples, gr::top_block_sptr top_block)
|
||||
int num_remaining_samples, gr::top_block_sptr top_block)
|
||||
{
|
||||
int num_samples_transferred = 0; // number of samples that have been transferred to the DMA so far
|
||||
static int flowgraph_stopped = 0; // flag to indicate if the flowgraph is stopped already
|
||||
char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA
|
||||
int dma_descr; // DMA descriptor
|
||||
int num_samples_transferred = 0; // number of samples that have been transferred to the DMA so far
|
||||
static int flowgraph_stopped = 0; // flag to indicate if the flowgraph is stopped already
|
||||
char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA
|
||||
int dma_descr; // DMA descriptor
|
||||
dma_descr = open("/dev/loop_tx", O_WRONLY);
|
||||
if (dma_descr < 0)
|
||||
{
|
||||
@ -79,7 +79,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
buffer_DMA = (char *) malloc(DMA_TRACK_TRANSFER_SIZE);
|
||||
buffer_DMA = (char *)malloc(DMA_TRACK_TRANSFER_SIZE);
|
||||
if (!buffer_DMA)
|
||||
{
|
||||
fprintf(stderr, "Memory error!");
|
||||
@ -98,8 +98,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
||||
}
|
||||
if (num_remaining_samples > DMA_TRACK_TRANSFER_SIZE)
|
||||
{
|
||||
|
||||
fread(buffer_DMA, DMA_TRACK_TRANSFER_SIZE, 1,rx_signal_file);
|
||||
fread(buffer_DMA, DMA_TRACK_TRANSFER_SIZE, 1, rx_signal_file);
|
||||
|
||||
assert(DMA_TRACK_TRANSFER_SIZE == write(dma_descr, &buffer_DMA[0], DMA_TRACK_TRANSFER_SIZE));
|
||||
num_remaining_samples = num_remaining_samples - DMA_TRACK_TRANSFER_SIZE;
|
||||
@ -121,11 +120,11 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
||||
|
||||
|
||||
// thread that sends the samples to the FPGA
|
||||
void thread(gr::top_block_sptr top_block, const char * file_name)
|
||||
void thread(gr::top_block_sptr top_block, const char *file_name)
|
||||
{
|
||||
// file descriptor
|
||||
FILE *rx_signal_file; // file descriptor
|
||||
int file_length; // length of the file containing the received samples
|
||||
FILE *rx_signal_file; // file descriptor
|
||||
int file_length; // length of the file containing the received samples
|
||||
|
||||
rx_signal_file = fopen(file_name, "rb");
|
||||
if (!rx_signal_file)
|
||||
@ -137,7 +136,7 @@ void thread(gr::top_block_sptr top_block, const char * file_name)
|
||||
file_length = ftell(rx_signal_file);
|
||||
fseek(rx_signal_file, 0, SEEK_SET);
|
||||
|
||||
usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device
|
||||
usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device
|
||||
|
||||
//send_tracking_gps_input_samples(dma_descr, rx_signal_file, file_length);
|
||||
send_tracking_gps_input_samples(rx_signal_file, file_length, top_block);
|
||||
@ -163,14 +162,14 @@ private:
|
||||
|
||||
public:
|
||||
int rx_message;
|
||||
~GpsL1CADllPllTrackingTestFpga_msg_rx(); //!< Default destructor
|
||||
~GpsL1CADllPllTrackingTestFpga_msg_rx(); //!< Default destructor
|
||||
};
|
||||
|
||||
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_make()
|
||||
{
|
||||
return GpsL1CADllPllTrackingTestFpga_msg_rx_sptr(
|
||||
new GpsL1CADllPllTrackingTestFpga_msg_rx());
|
||||
new GpsL1CADllPllTrackingTestFpga_msg_rx());
|
||||
}
|
||||
|
||||
|
||||
@ -181,7 +180,7 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
long int message = pmt::to_long(msg);
|
||||
rx_message = message;
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
catch (boost::bad_any_cast &e)
|
||||
{
|
||||
LOG(WARNING) << "msg_handler_telemetry Bad any cast!";
|
||||
rx_message = 0;
|
||||
@ -189,22 +188,22 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
}
|
||||
|
||||
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx::GpsL1CADllPllTrackingTestFpga_msg_rx() :
|
||||
gr::block("GpsL1CADllPllTrackingTestFpga_msg_rx",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx::GpsL1CADllPllTrackingTestFpga_msg_rx() : gr::block("GpsL1CADllPllTrackingTestFpga_msg_rx",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_in(pmt::mp("events"));
|
||||
this->set_msg_handler(pmt::mp("events"),
|
||||
boost::bind(
|
||||
&GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events,
|
||||
this, _1));
|
||||
boost::bind(
|
||||
&GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events,
|
||||
this, _1));
|
||||
rx_message = 0;
|
||||
}
|
||||
|
||||
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx::~GpsL1CADllPllTrackingTestFpga_msg_rx()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -226,12 +225,12 @@ public:
|
||||
|
||||
int configure_generator();
|
||||
int generate_signal();
|
||||
void check_results_doppler(arma::vec & true_time_s, arma::vec & true_value,
|
||||
arma::vec & meas_time_s, arma::vec & meas_value);
|
||||
void check_results_acc_carrier_phase(arma::vec & true_time_s,
|
||||
arma::vec & true_value, arma::vec & meas_time_s, arma::vec & meas_value);
|
||||
void check_results_codephase(arma::vec & true_time_s, arma::vec & true_value,
|
||||
arma::vec & meas_time_s, arma::vec & meas_value);
|
||||
void check_results_doppler(arma::vec &true_time_s, arma::vec &true_value,
|
||||
arma::vec &meas_time_s, arma::vec &meas_value);
|
||||
void check_results_acc_carrier_phase(arma::vec &true_time_s,
|
||||
arma::vec &true_value, arma::vec &meas_time_s, arma::vec &meas_value);
|
||||
void check_results_codephase(arma::vec &true_time_s, arma::vec &true_value,
|
||||
arma::vec &meas_time_s, arma::vec &meas_value);
|
||||
|
||||
GpsL1CADllPllTrackingTestFpga()
|
||||
{
|
||||
@ -263,16 +262,15 @@ int GpsL1CADllPllTrackingTestFpga::configure_generator()
|
||||
p1 = std::string("-rinex_nav_file=") + FLAGS_rinex_nav_file;
|
||||
if (FLAGS_dynamic_position.empty())
|
||||
{
|
||||
p2 = std::string("-static_position=") + FLAGS_static_position
|
||||
+ std::string(",") + std::to_string(FLAGS_duration * 10);
|
||||
p2 = std::string("-static_position=") + FLAGS_static_position + std::string(",") + std::to_string(FLAGS_duration * 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
p2 = std::string("-obs_pos_file=") + std::string(FLAGS_dynamic_position);
|
||||
}
|
||||
p3 = std::string("-rinex_obs_file=") + FLAGS_filename_rinex_obs; // RINEX 2.10 observation file output
|
||||
p4 = std::string("-sig_out_file=") + FLAGS_filename_raw_data; // Baseband signal output file. Will be stored in int8_t IQ multiplexed samples
|
||||
p5 = std::string("-sampling_freq=") + std::to_string(baseband_sampling_freq); //Baseband sampling frequency [MSps]
|
||||
p3 = std::string("-rinex_obs_file=") + FLAGS_filename_rinex_obs; // RINEX 2.10 observation file output
|
||||
p4 = std::string("-sig_out_file=") + FLAGS_filename_raw_data; // Baseband signal output file. Will be stored in int8_t IQ multiplexed samples
|
||||
p5 = std::string("-sampling_freq=") + std::to_string(baseband_sampling_freq); //Baseband sampling frequency [MSps]
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -281,8 +279,8 @@ int GpsL1CADllPllTrackingTestFpga::generate_signal()
|
||||
{
|
||||
int child_status;
|
||||
|
||||
char * const parmList[] = { &generator_binary[0], &generator_binary[0], &p1[0], &p2[0], &p3[0],
|
||||
&p4[0], &p5[0], NULL };
|
||||
char *const parmList[] = {&generator_binary[0], &generator_binary[0], &p1[0], &p2[0], &p3[0],
|
||||
&p4[0], &p5[0], NULL};
|
||||
|
||||
int pid;
|
||||
if ((pid = fork()) == -1)
|
||||
@ -310,14 +308,13 @@ void GpsL1CADllPllTrackingTestFpga::configure_receiver()
|
||||
gnss_synchro.PRN = FLAGS_test_satellite_PRN;
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps",
|
||||
std::to_string(baseband_sampling_freq));
|
||||
std::to_string(baseband_sampling_freq));
|
||||
// Set Tracking
|
||||
//config->set_property("Tracking_1C.implementation",
|
||||
// "GPS_L1_CA_DLL_PLL_C_Aid_Tracking_Fpga");
|
||||
config->set_property("Tracking_1C.implementation",
|
||||
"GPS_L1_CA_DLL_PLL_Tracking_Fpga");
|
||||
"GPS_L1_CA_DLL_PLL_Tracking_Fpga");
|
||||
config->set_property("Tracking_1C.item_type", "cshort");
|
||||
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", "30.0");
|
||||
@ -328,8 +325,8 @@ void GpsL1CADllPllTrackingTestFpga::configure_receiver()
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec & true_time_s,
|
||||
arma::vec & true_value, arma::vec & meas_time_s, arma::vec & meas_value)
|
||||
void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec &true_time_s,
|
||||
arma::vec &true_value, arma::vec &meas_time_s, arma::vec &meas_value)
|
||||
{
|
||||
//1. True value interpolation to match the measurement times
|
||||
arma::vec true_value_interp;
|
||||
@ -362,13 +359,13 @@ void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec & true_time_
|
||||
<< ", mean=" << error_mean << ", stdev=" << sqrt(error_var)
|
||||
<< " (max,min)=" << max_error << "," << min_error << " [Hz]"
|
||||
<< std::endl;
|
||||
std::cout.precision (ss);
|
||||
std::cout.precision(ss);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CADllPllTrackingTestFpga::check_results_acc_carrier_phase(
|
||||
arma::vec & true_time_s, arma::vec & true_value, arma::vec & meas_time_s,
|
||||
arma::vec & meas_value)
|
||||
arma::vec &true_time_s, arma::vec &true_value, arma::vec &meas_time_s,
|
||||
arma::vec &meas_value)
|
||||
{
|
||||
//1. True value interpolation to match the measurement times
|
||||
arma::vec true_value_interp;
|
||||
@ -401,13 +398,13 @@ void GpsL1CADllPllTrackingTestFpga::check_results_acc_carrier_phase(
|
||||
<< ", mean=" << error_mean << ", stdev=" << sqrt(error_var)
|
||||
<< " (max,min)=" << max_error << "," << min_error << " [Hz]"
|
||||
<< std::endl;
|
||||
std::cout.precision (ss);
|
||||
std::cout.precision(ss);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CADllPllTrackingTestFpga::check_results_codephase(
|
||||
arma::vec & true_time_s, arma::vec & true_value, arma::vec & meas_time_s,
|
||||
arma::vec & meas_value)
|
||||
arma::vec &true_time_s, arma::vec &true_value, arma::vec &meas_time_s,
|
||||
arma::vec &meas_value)
|
||||
{
|
||||
//1. True value interpolation to match the measurement times
|
||||
arma::vec true_value_interp;
|
||||
@ -439,7 +436,7 @@ void GpsL1CADllPllTrackingTestFpga::check_results_codephase(
|
||||
<< ", mean=" << error_mean << ", stdev=" << sqrt(error_var)
|
||||
<< " (max,min)=" << max_error << "," << min_error << " [Chips]"
|
||||
<< std::endl;
|
||||
std::cout.precision (ss);
|
||||
std::cout.precision(ss);
|
||||
}
|
||||
|
||||
|
||||
@ -463,27 +460,29 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
true_obs_file.append(std::to_string(test_satellite_PRN));
|
||||
true_obs_file.append(".dat");
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
if (true_obs_data.open_obs_file(true_obs_file) == false)
|
||||
{
|
||||
if (true_obs_data.open_obs_file(true_obs_file) == false)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
}) << "Failure opening true observables file";
|
||||
throw std::exception();
|
||||
};
|
||||
})
|
||||
<< "Failure opening true observables file";
|
||||
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
//std::shared_ptr<GpsL1CaDllPllCAidTrackingFpga> tracking = std::make_shared<GpsL1CaDllPllCAidTrackingFpga> (config.get(), "Tracking_1C", 1, 1);
|
||||
std::shared_ptr<GpsL1CaDllPllTrackingFpga> tracking = std::make_shared<GpsL1CaDllPllTrackingFpga> (config.get(), "Tracking_1C", 1, 1);
|
||||
std::shared_ptr<GpsL1CaDllPllTrackingFpga> tracking = std::make_shared<GpsL1CaDllPllTrackingFpga>(config.get(), "Tracking_1C", 1, 1);
|
||||
|
||||
boost::shared_ptr<GpsL1CADllPllTrackingTestFpga_msg_rx> msg_rx = GpsL1CADllPllTrackingTestFpga_msg_rx_make();
|
||||
|
||||
// load acquisition data based on the first epoch of the true observations
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
if (true_obs_data.read_binary_obs() == false)
|
||||
{
|
||||
if (true_obs_data.read_binary_obs() == false)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
}) << "Failure reading true observables file";
|
||||
throw std::exception();
|
||||
};
|
||||
})
|
||||
<< "Failure reading true observables file";
|
||||
|
||||
//restart the epoch counter
|
||||
true_obs_data.restart();
|
||||
@ -492,52 +491,54 @@ 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;
|
||||
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
|
||||
gnss_synchro.Acq_samplestamp_samples = 0;
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
}) << "Failure setting channel.";
|
||||
{
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
})
|
||||
<< "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
{
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
})
|
||||
<< "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->connect(top_block);
|
||||
}) << "Failure connecting tracking to the top_block.";
|
||||
{
|
||||
tracking->connect(top_block);
|
||||
})
|
||||
<< "Failure connecting tracking to the top_block.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
{
|
||||
gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
})
|
||||
<< "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
// assemble again the file name in a null terminated string (not available by default in the main program flow)
|
||||
std::string file = "./" + filename_raw_data;
|
||||
const char * file_name = file.c_str();
|
||||
const char *file_name = file.c_str();
|
||||
|
||||
// start thread that sends the DMA samples to the FPGA
|
||||
boost::thread t
|
||||
{ thread, top_block, file_name };
|
||||
boost::thread t{thread, top_block, file_name};
|
||||
|
||||
EXPECT_NO_THROW(
|
||||
{
|
||||
start = std::chrono::system_clock::now();
|
||||
top_block->run(); // Start threads and wait
|
||||
//tracking->reset();// unlock the channel
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block.";
|
||||
{
|
||||
start = std::chrono::system_clock::now();
|
||||
top_block->run(); // Start threads and wait
|
||||
//tracking->reset();// unlock the channel
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
})
|
||||
<< "Failure running the top_block.";
|
||||
|
||||
// wait until child thread terminates
|
||||
t.join();
|
||||
@ -567,12 +568,13 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
//load the measured values
|
||||
tracking_dump_reader trk_dump;
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false)
|
||||
{
|
||||
if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
}) << "Failure opening tracking dump file";
|
||||
throw std::exception();
|
||||
};
|
||||
})
|
||||
<< "Failure opening tracking dump file";
|
||||
|
||||
nepoch = trk_dump.num_epochs();
|
||||
std::cout << "Measured observation epochs=" << nepoch << std::endl;
|
||||
@ -585,14 +587,11 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
epoch_counter = 0;
|
||||
while (trk_dump.read_binary_obs())
|
||||
{
|
||||
trk_timestamp_s(epoch_counter) = static_cast<double>(trk_dump.PRN_start_sample_count)
|
||||
/ static_cast<double>(baseband_sampling_freq);
|
||||
trk_timestamp_s(epoch_counter) = static_cast<double>(trk_dump.PRN_start_sample_count) / static_cast<double>(baseband_sampling_freq);
|
||||
trk_acc_carrier_phase_cycles(epoch_counter) = trk_dump.acc_carrier_phase_rad / GPS_TWO_PI;
|
||||
trk_Doppler_Hz(epoch_counter) = trk_dump.carrier_doppler_hz;
|
||||
|
||||
double delay_chips = GPS_L1_CA_CODE_LENGTH_CHIPS - GPS_L1_CA_CODE_LENGTH_CHIPS
|
||||
* (fmod( (static_cast<double>(trk_dump.PRN_start_sample_count) + trk_dump.aux1)
|
||||
/ static_cast<double>(baseband_sampling_freq), 1.0e-3) / 1.0e-3);
|
||||
double delay_chips = GPS_L1_CA_CODE_LENGTH_CHIPS - GPS_L1_CA_CODE_LENGTH_CHIPS * (fmod((static_cast<double>(trk_dump.PRN_start_sample_count) + trk_dump.aux1) / static_cast<double>(baseband_sampling_freq), 1.0e-3) / 1.0e-3);
|
||||
|
||||
trk_prn_delay_chips(epoch_counter) = delay_chips;
|
||||
epoch_counter++;
|
||||
@ -600,7 +599,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
|
||||
//Align initial measurements and cut the tracking pull-in transitory
|
||||
double pull_in_offset_s = 1.0;
|
||||
arma::uvec initial_meas_point = arma::find( trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first");
|
||||
arma::uvec initial_meas_point = arma::find(trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first");
|
||||
|
||||
trk_timestamp_s = trk_timestamp_s.subvec(initial_meas_point(0), trk_timestamp_s.size() - 1);
|
||||
trk_acc_carrier_phase_cycles = trk_acc_carrier_phase_cycles.subvec(initial_meas_point(0), trk_acc_carrier_phase_cycles.size() - 1);
|
||||
@ -610,8 +609,8 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
check_results_doppler(true_timestamp_s, true_Doppler_Hz, trk_timestamp_s, trk_Doppler_Hz);
|
||||
check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips);
|
||||
check_results_acc_carrier_phase(true_timestamp_s,
|
||||
true_acc_carrier_phase_cycles, trk_timestamp_s,
|
||||
trk_acc_carrier_phase_cycles);
|
||||
true_acc_carrier_phase_cycles, trk_timestamp_s,
|
||||
trk_acc_carrier_phase_cycles);
|
||||
|
||||
std::cout << "Signal tracking completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user