1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

updated doxygen comments

This commit is contained in:
Marc Majoral 2019-07-23 19:05:43 +02:00
parent 6ee9fedd76
commit f30d8a60ec
16 changed files with 450 additions and 66 deletions

View File

@ -50,13 +50,23 @@ class ConfigurationInterface;
class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface
{
public:
/*!
* \brief Constructor
*/
GalileoE1PcpsAmbiguousAcquisitionFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
~GalileoE1PcpsAmbiguousAcquisitionFpga() = default;
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
@ -70,14 +80,32 @@ public:
return "Galileo_E1_PCPS_Ambiguous_Acquisition_Fpga";
}
/*!
* \brief Returns size of lv_16sc_t
*/
size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -150,6 +178,9 @@ public:
*/
void stop_acquisition() override;
/*!
* \brief Set resampler latency
*/
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
private:
@ -164,7 +195,6 @@ private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
bool acquire_pilot_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;

View File

@ -50,13 +50,23 @@ class ConfigurationInterface;
class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface
{
public:
/*!
* \brief Constructor
*/
GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
~GalileoE5aPcpsAcquisitionFpga() = default;
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
@ -70,14 +80,32 @@ public:
return "Galileo_E5a_Pcps_Acquisition_Fpga";
}
/*!
* \brief Returns size of lv_16sc_t
*/
inline size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -158,7 +186,7 @@ public:
void stop_acquisition() override;
/*!
* \brief Sets the resampler latency to account it in the acquisition code delay estimation
* \brief Set resampler latency
*/
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
@ -174,7 +202,6 @@ private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
std::string item_type_;
std::string dump_filename_;
std::string role_;

View File

@ -52,13 +52,23 @@ class ConfigurationInterface;
class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface
{
public:
/*!
* \brief Constructor
*/
GpsL1CaPcpsAcquisitionFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
~GpsL1CaPcpsAcquisitionFpga() = default;
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
@ -72,14 +82,32 @@ public:
return "GPS_L1_CA_PCPS_Acquisition_Fpga";
}
/*!
* \brief Returns size of lv_16sc_t
*/
inline size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -152,6 +180,9 @@ public:
*/
void stop_acquisition() override;
/*!
* \brief Set Resampler Latency
*/
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
private:
@ -168,7 +199,6 @@ private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;
uint32_t doppler_max_;

View File

@ -50,13 +50,23 @@ class ConfigurationInterface;
class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface
{
public:
/*!
* \brief Constructor
*/
GpsL5iPcpsAcquisitionFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
~GpsL5iPcpsAcquisitionFpga() = default;
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
@ -70,14 +80,32 @@ public:
return "GPS_L5i_PCPS_Acquisition_Fpga";
}
/*!
* \brief Returns size of lv_16sc_t
*/
inline size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -150,6 +178,9 @@ public:
*/
void stop_acquisition() override;
/*!
* \brief Set resampler latency
*/
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
private:
@ -165,7 +196,6 @@ private:
ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_;
size_t item_size_;
std::string item_type_;
uint32_t channel_;
std::weak_ptr<ChannelFsm> channel_fsm_;

View File

@ -89,6 +89,9 @@ pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
class pcps_acquisition_fpga
{
public:
/*!
* \brief Destructor
*/
~pcps_acquisition_fpga() = default;
/*!
@ -116,7 +119,6 @@ public:
/*!
* \brief Sets local code for PCPS acquisition algorithm.
* \param code - Pointer to the PRN code.
*/
void set_local_code();

View File

@ -176,11 +176,6 @@ void Fpga_Acquisition::run_acquisition(void)
std::cout << "acquisition module Interrupt number " << irq_count << std::endl;
}
// nbytes = TEMP_FAILURE_RETRY(write(d_fd, reinterpret_cast<void *>(&disable_int), sizeof(int32_t)));
// if (nbytes != sizeof(int32_t))
// {
// std::cerr << "Error disabling interruptions in the FPGA." << std::endl;
// }
}
@ -213,7 +208,7 @@ void Fpga_Acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_s
void Fpga_Acquisition::configure_acquisition()
{
//Fpga_Acquisition::open_device();
//Fpga_Acquisition::();
d_map_base[0] = d_select_queue;
d_map_base[1] = d_vector_length;
d_map_base[2] = d_nsamples;
@ -258,18 +253,6 @@ void Fpga_Acquisition::read_acquisition_results(uint32_t *max_index,
}
void Fpga_Acquisition::block_samples()
{
d_map_base[14] = 1; // block the samples
}
void Fpga_Acquisition::unblock_samples()
{
d_map_base[14] = 0; // unblock the samples
}
void Fpga_Acquisition::close_device()
{
auto *aux = const_cast<uint32_t *>(d_map_base);

View File

@ -45,6 +45,10 @@
class Fpga_Acquisition
{
public:
/*!
* \brief Constructor
*/
Fpga_Acquisition(
std::string device_name,
uint32_t nsamples,
@ -56,14 +60,29 @@ public:
uint32_t *all_fft_codes,
uint32_t excludelimit);
/*!
* \brief Destructor
*/
~Fpga_Acquisition() = default;
/*!
* \brief Select the code with the chosen PRN
*/
bool set_local_code(uint32_t PRN);
/*!
* \brief Configure the doppler sweep parameters in the FPGA
*/
void set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_step, int32_t doppler_min);
/*!
* \brief Run the acquisition process in the FPGA
*/
void run_acquisition(void);
/*!
* \brief Read the results of the acquisition process
*/
void read_acquisition_results(
uint32_t *max_index,
float *firstpeak,
@ -73,10 +92,6 @@ public:
uint32_t *doppler_index,
uint32_t *total_blk_exp);
void block_samples();
void unblock_samples();
/*!
* \brief Set maximum Doppler grid search
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
@ -101,18 +116,33 @@ public:
void reset_acquisition(void);
/*!
* \brief read the scaling factor that has been used by the FFT-IFFT
* \brief Read the scaling factor that has been used by the FFT-IFFT
*/
void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor);
/*!
* \brief Set the block exponent of the FFT in the FPGA.
*/
void set_block_exp(uint32_t total_block_exp);
/*!
* \brief Write the PRN code in the FPGA
*/
void write_local_code(void);
/*!
* \brief Write the acquisition parameters into the FPGA
*/
void configure_acquisition(void);
/*!
* \brief Open the device driver
*/
void open_device();
/*!
* \brief Close the device driver
*/
void close_device();
private:

View File

@ -39,11 +39,27 @@
#include <string>
/*!
* \brief Class that controls the switch in the FPGA, which connects the FPGA acquisition and multicorrelator modules to
* either the DMA or the Analog Front-End.
*/
class Fpga_Switch
{
public:
/*!
* \brief Constructor
*/
Fpga_Switch(const std::string& device_name);
/*!
* \brief Destructor
*/
~Fpga_Switch();
/*!
* \brief This function configures the switch in th eFPGA
*/
void set_switch_position(int32_t switch_position);
private:

View File

@ -51,32 +51,62 @@ class ConfigurationInterface;
class GalileoE1DllPllVemlTrackingFpga : public TrackingInterface
{
public:
/*!
* \brief Constructor
*/
GalileoE1DllPllVemlTrackingFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
virtual ~GalileoE1DllPllVemlTrackingFpga();
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
}
//! Returns "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga"
/*!
* \brief Returns "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga"
*/
inline std::string implementation() override
{
return "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga";
}
inline size_t item_size() override
/*!
* \brief Returns size of lv_16sc_t
*/
size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -91,9 +121,13 @@ public:
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
* \brief Start the tracking process in the FPGA
*/
void start_tracking() override;
/*!
* \brief Stop the tracking process in the FPGA
*/
void stop_tracking() override;
@ -105,7 +139,6 @@ private:
static const int32_t LOCAL_CODE_FPGA_CORRELATOR_SELECT_COUNT = 0x20000000; // flag that selects the writing of the pilot code in the FPGA (as opposed to the data code)
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -44,32 +44,61 @@ class ConfigurationInterface;
class GalileoE5aDllPllTrackingFpga : public TrackingInterface
{
public:
/*!
* \brief Constructor
*/
GalileoE5aDllPllTrackingFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
virtual ~GalileoE5aDllPllTrackingFpga();
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
}
//! Returns "Galileo_E5a_DLL_PLL_Tracking_Fpga"
/*!
* \brief Returns "Galileo_E5a_DLL_PLL_Tracking_Fpga"
*/
inline std::string implementation() override
{
return "Galileo_E5a_DLL_PLL_Tracking_Fpga";
}
inline size_t item_size() override
/*!
* \brief Returns size of lv_16sc_t
*/
size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -83,9 +112,13 @@ public:
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
* \brief Start the tracking process in the FPGA
*/
void start_tracking() override;
/*!
* \brief Stop the tracking process in the FPGA
*/
void stop_tracking() override;
@ -98,7 +131,6 @@ private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -49,32 +49,61 @@ class ConfigurationInterface;
class GpsL1CaDllPllTrackingFpga : public TrackingInterface
{
public:
/*!
* \brief Constructor
*/
GpsL1CaDllPllTrackingFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
virtual ~GpsL1CaDllPllTrackingFpga();
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
}
//! Returns "GPS_L1_CA_DLL_PLL_Tracking_Fpga"
/*!
* \brief Returns "GPS_L1_CA_DLL_PLL_Tracking_Fpga"
*/
inline std::string implementation() override
{
return "GPS_L1_CA_DLL_PLL_Tracking_Fpga";
}
inline size_t item_size() override
/*!
* \brief Returns size of lv_16sc_t
*/
size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -88,10 +117,13 @@ public:
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
/*!
* \brief Start the tracking process in the FPGA
*/
void start_tracking() override;
/*!
* \brief Stop running tracking
* \brief Stop the tracking process in the FPGA
*/
void stop_tracking() override;
@ -105,7 +137,6 @@ private:
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -50,32 +50,61 @@ class ConfigurationInterface;
class GpsL5DllPllTrackingFpga : public TrackingInterface
{
public:
/*!
* \brief Constructor
*/
GpsL5DllPllTrackingFpga(ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
/*!
* \brief Destructor
*/
virtual ~GpsL5DllPllTrackingFpga();
/*!
* \brief Role
*/
inline std::string role() override
{
return role_;
}
//! Returns "GPS_L5_DLL_PLL_Tracking_Fpga"
/*!
* \brief Returns "GPS_L5_DLL_PLL_Tracking_Fpga"
*/
inline std::string implementation() override
{
return "GPS_L5_DLL_PLL_Tracking_Fpga";
}
inline size_t item_size() override
/*!
* \brief Returns size of lv_16sc_t
*/
size_t item_size() override
{
return item_size_;
return sizeof(int16_t);
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
@ -89,9 +118,13 @@ public:
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
* \brief Start the tracking process in the FPGA
*/
void start_tracking() override;
/*!
* \brief Stop the tracking process in the FPGA
*/
void stop_tracking() override;
@ -104,7 +137,6 @@ private:
static const int32_t LOCAL_CODE_FPGA_CORRELATOR_SELECT_COUNT = 0x20000000; // flag that selects the writing of the pilot code in the FPGA (as opposed to the data code)
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc;
size_t item_size_;
uint32_t channel_;
std::string role_;
uint32_t in_streams_;

View File

@ -1851,10 +1851,10 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
// this must be computed for the secondary prn code
if (d_secondary)
{
uint32_t first_length_secondary_code = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t next_length_secondary_code = static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t first_prn_length = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t next_prn_length = static_cast<int32_t>(std::floor(T_prn_samples));
multicorrelator_fpga->update_secondary_code_length(first_length_secondary_code, next_length_secondary_code);
multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length);
}
// perform a correlation step
@ -1898,10 +1898,10 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
// this must be computed for the secondary prn code
if (d_secondary)
{
uint32_t first_length_secondary_code = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t next_length_secondary_code = static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t first_prn_length = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast<int32_t>(std::floor(T_prn_samples));
uint32_t next_prn_length = static_cast<int32_t>(std::floor(T_prn_samples));
multicorrelator_fpga->update_secondary_code_length(first_length_secondary_code, next_length_secondary_code);
multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length);
}
// perform a correlation step

View File

@ -62,16 +62,45 @@ dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Co
class dll_pll_veml_tracking_fpga : public gr::block
{
public:
/*!
* \brief Destructor
*/
~dll_pll_veml_tracking_fpga();
/*!
* \brief Set the channel number and configure some multicorrelator parameters
*/
void set_channel(uint32_t channel);
/*!
* \brief This function is used with two purposes:
* 1 -> To set the gnss_synchro
* 2 -> A set_gnss_synchro command with a valid PRN is received when the system is going to run
* acquisition with that PRN. We can use this command to pre-initialize tracking parameters and
* variables before the actual acquisition process takes place. In this way we minimize the
* latency between acquisition and tracking once the acquisition has been made.
*/
void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro);
/*!
* \brief This function starts the tracking process
*/
void start_tracking();
/*!
* \brief This function sets a flag that makes general_work to stop in order to finish the tracking process.
*/
void stop_tracking();
/*!
* \brief General Work
*/
int general_work(int noutput_items, gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
/*!
* \brief This function disables the HW multicorrelator in the FPGA in order to stop the tracking process
*/
void reset(void);
private:

View File

@ -491,10 +491,10 @@ void Fpga_Multicorrelator_8sc::set_secondary_code_lengths(uint32_t secondary_cod
d_map_base[secondary_code_lengths_reg_addr] = secondary_code_length_1_minus_1 * 256 + secondary_code_length_0_minus_1;
}
void Fpga_Multicorrelator_8sc::update_secondary_code_length(uint32_t first_length_secondary_code, uint32_t next_length_secondary_code)
void Fpga_Multicorrelator_8sc::update_prn_code_length(uint32_t first_prn_length, uint32_t next_prn_length)
{
d_map_base[first_prn_length_minus_1_reg_addr] = first_length_secondary_code - 1;
d_map_base[next_prn_length_minus_1_reg_addr] = next_length_secondary_code - 1;
d_map_base[first_prn_length_minus_1_reg_addr] = first_prn_length - 1;
d_map_base[next_prn_length_minus_1_reg_addr] = next_prn_length - 1;
}
void Fpga_Multicorrelator_8sc::initialize_secondary_code(uint32_t secondary_code, std::string *secondary_code_string)

View File

@ -50,29 +50,108 @@
class Fpga_Multicorrelator_8sc
{
public:
/*!
* \brief Constructor
*/
Fpga_Multicorrelator_8sc(int32_t n_correlators, std::string device_name,
uint32_t device_base, int32_t *ca_codes, int32_t *data_codes, uint32_t code_length_chips, bool track_pilot, uint32_t code_samples_per_chip);
/*!
* \brief Destructor
*/
~Fpga_Multicorrelator_8sc();
/*!
* \brief Configure pointers to the FPGA multicorrelator results
*/
void set_output_vectors(gr_complex *corr_out, gr_complex *Prompt_Data);
/*!
* \brief Configure the local code in the FPGA multicorrelator
*/
void set_local_code_and_taps(
float *shifts_chips, float *prompt_data_shift, int32_t PRN);
/*!
* \brief Configure code phase and code rate parameters in the FPGA
*/
void update_local_code();
/*!
* \brief Perform a multicorrelation
*/
void Carrier_wipeoff_multicorrelator_resampler(
float rem_carrier_phase_in_rad, float phase_step_rad,
float carrier_phase_rate_step_rad,
float rem_code_phase_chips, float code_phase_step_chips,
float code_phase_rate_step_chips,
int32_t signal_length_samples);
/*!
* \brief Stop the correlation process in the FPGA and free code phase and code rate parameters
*/
bool free();
/*!
* \brief Set channel number and open the FPGA device driver
*/
void set_channel(uint32_t channel);
/*!
* \brief Set the initial sample number where the tracking process begins
*/
void set_initial_sample(uint64_t samples_offset);
/*!
* \brief Read the sample counter in the FPGA
*/
uint64_t read_sample_counter();
/*!
* \brief Start the tracking process in the FPGA
*/
void lock_channel(void);
/*!
* \brief finish the tracking process in the FPGA
*/
void unlock_channel(void);
/*!
* \brief Set the secondary code length in the FPGA. This is only used when extended coherent integration
* is enabled in the FPGA. If tracking the pilot is enabled then secondary_code_0_length is the length of the pilot
* secondary code and secondary_code_1_length is the length of the data secondary code. If tracking the pilot is disabled
* then secondary_code_0_length is the length of the data secondary code, and secondary_code_1_length must be set to zero.
*/
void set_secondary_code_lengths(uint32_t secondary_code_0_length, uint32_t secondary_code_1_length);
/*!
* \brief Initialize the secondary code in the FPGA. If tracking the pilot is enabled then the pilot secondary code is
* configured when secondary_code = 0 and the data secondary code is configured when secondary_code = 1. If tracking the
* pilot is disabled then the data secondary code is configured when secondary code = 0.
*/
void initialize_secondary_code(uint32_t secondary_code, std::string *secondary_code_string);
void update_secondary_code_length(uint32_t first_length_secondary_code, uint32_t next_length_secondary_code);
/*!
* \brief Set the PRN length in the FPGA in number of samples. This function is only used then extended coherent integration is enabled in the
* FPGA. The FPGA allows for the configuration of two PRN lengths. When the length of the extended coherent integration is bigger than the
* length of the PRN code, the FPGA uses the first_length_secondary_code as the length of the PRN code immediately following the beginning
* of the extended coherent integration, and the next_length_secondary_code as the length of the remaining PRN codes.
* The purpose of this is to have the option to allow the FPGA to compensate for a possible deviation between the nominal value of the PRN
* code length and the measured PRN code length in the PRN immediately following the start of the coherent integration only.
* If this option is not used then write the same value to first_length_secondary_code and next_length_secondary_code.
*/
void update_prn_code_length(uint32_t first_length_secondary_code, uint32_t next_length_secondary_code);
/*!
* \brief Enable the use of secondary codes in the FPGA
*/
void enable_secondary_codes();
/*!
* \brief Disable the use of secondary codes in the FPGA
*/
void disable_secondary_codes();