mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Replace defines by constants and move them to the implementation
This commit is contained in:
parent
3d146019dd
commit
5f176b084c
@ -56,6 +56,10 @@
|
|||||||
})
|
})
|
||||||
#endif
|
#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,
|
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,
|
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)
|
uint32_t code_samples_per_chip)
|
||||||
|
@ -40,9 +40,6 @@
|
|||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <cstdint>
|
#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.
|
* \brief Class that implements carrier wipe-off and correlators.
|
||||||
@ -53,8 +50,14 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
*/
|
*/
|
||||||
Fpga_Multicorrelator_8sc(int32_t n_correlators, std::string device_name,
|
Fpga_Multicorrelator_8sc(int32_t n_correlators,
|
||||||
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);
|
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
|
* \brief Destructor
|
||||||
@ -153,10 +156,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
void disable_secondary_codes();
|
void disable_secondary_codes();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// FPGA register addresses
|
// FPGA register addresses
|
||||||
|
|
||||||
// write addresses
|
// write addresses
|
||||||
static const uint32_t code_phase_step_chips_num_reg_addr = 0;
|
static const uint32_t code_phase_step_chips_num_reg_addr = 0;
|
||||||
static const uint32_t initial_index_reg_base_addr = 1;
|
static const uint32_t initial_index_reg_base_addr = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user