1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-23 13:33:15 +00:00

Replace defines by constants and move them to the implementation

This commit is contained in:
Carles Fernandez 2019-08-14 02:34:00 +02:00
parent 3d146019dd
commit 5f176b084c
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 12 additions and 7 deletions

View File

@ -56,6 +56,10 @@
})
#endif
// floating point math constants related to the parameters that are written in the FPGA
const float PHASE_CARR_MAX_DIV_PI = 683565275.5764316; // 2^(31)/pi
const float TWO_PI = 6.283185307179586;
Fpga_Multicorrelator_8sc::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)

View File

@ -40,9 +40,6 @@
#include <gnuradio/block.h>
#include <cstdint>
// floating point math constants related to the parameters that are written in the FPGA
#define PHASE_CARR_MAX_DIV_PI 683565275.5764316 // 2^(31)/pi
#define TWO_PI 6.283185307179586
/*!
* \brief Class that implements carrier wipe-off and correlators.
@ -53,8 +50,14 @@ 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);
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
@ -153,10 +156,8 @@ public:
*/
void disable_secondary_codes();
private:
// FPGA register addresses
// write addresses
static const uint32_t code_phase_step_chips_num_reg_addr = 0;
static const uint32_t initial_index_reg_base_addr = 1;