mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-08 06:53:54 +00:00
Avoid claah between volk and volk_gnsssdr defines
This commit is contained in:
parent
faf27fff22
commit
0494d9b5a8
@ -40,7 +40,6 @@
|
|||||||
#include "gps_sdr_signal_processing.h"
|
#include "gps_sdr_signal_processing.h"
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <gnuradio/fft/fft.h>
|
||||||
#include <volk/volk.h>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
@ -57,9 +57,9 @@
|
|||||||
#define GNSS_SDR_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
|
|
||||||
#include <gnuradio/block.h>
|
|
||||||
#include "fpga_acquisition.h"
|
#include "fpga_acquisition.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include <gnuradio/block.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -33,18 +33,13 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// libraries used by the GIPO
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
|
|
||||||
// logging
|
|
||||||
#include <glog/logging.h>
|
|
||||||
|
|
||||||
// GPS L1
|
|
||||||
#include "GPS_L1_CA.h"
|
|
||||||
|
|
||||||
#include "fpga_acquisition.h"
|
#include "fpga_acquisition.h"
|
||||||
|
#include "GPS_L1_CA.h"
|
||||||
#include "gps_sdr_signal_processing.h"
|
#include "gps_sdr_signal_processing.h"
|
||||||
|
#include <glog/logging.h>
|
||||||
|
#include <fcntl.h> // libraries used by the GIPO
|
||||||
|
#include <sys/mman.h> // libraries used by the GIPO
|
||||||
|
|
||||||
|
|
||||||
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
||||||
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
|
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
|
||||||
@ -68,6 +63,7 @@ bool fpga_acquisition::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool fpga_acquisition::set_local_code(unsigned int PRN)
|
bool fpga_acquisition::set_local_code(unsigned int PRN)
|
||||||
{
|
{
|
||||||
// select the code with the chosen PRN
|
// select the code with the chosen PRN
|
||||||
@ -76,6 +72,7 @@ bool fpga_acquisition::set_local_code(unsigned int PRN)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fpga_acquisition::fpga_acquisition(std::string device_name,
|
fpga_acquisition::fpga_acquisition(std::string device_name,
|
||||||
unsigned int nsamples,
|
unsigned int nsamples,
|
||||||
unsigned int doppler_max,
|
unsigned int doppler_max,
|
||||||
@ -125,19 +122,21 @@ fpga_acquisition::fpga_acquisition(std::string device_name,
|
|||||||
}
|
}
|
||||||
fpga_acquisition::reset_acquisition();
|
fpga_acquisition::reset_acquisition();
|
||||||
DLOG(INFO) << "Acquisition FPGA class created";
|
DLOG(INFO) << "Acquisition FPGA class created";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fpga_acquisition::~fpga_acquisition()
|
fpga_acquisition::~fpga_acquisition()
|
||||||
{
|
{
|
||||||
close_device();
|
close_device();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool fpga_acquisition::free()
|
bool fpga_acquisition::free()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned fpga_acquisition::fpga_acquisition_test_register(unsigned writeval)
|
unsigned fpga_acquisition::fpga_acquisition_test_register(unsigned writeval)
|
||||||
{
|
{
|
||||||
unsigned readval;
|
unsigned readval;
|
||||||
@ -149,6 +148,7 @@ unsigned fpga_acquisition::fpga_acquisition_test_register(unsigned writeval)
|
|||||||
return readval;
|
return readval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
||||||
{
|
{
|
||||||
unsigned short local_code;
|
unsigned short local_code;
|
||||||
@ -167,6 +167,7 @@ void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::run_acquisition(void)
|
void fpga_acquisition::run_acquisition(void)
|
||||||
{
|
{
|
||||||
// enable interrupts
|
// enable interrupts
|
||||||
@ -186,6 +187,7 @@ void fpga_acquisition::run_acquisition(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::configure_acquisition()
|
void fpga_acquisition::configure_acquisition()
|
||||||
{
|
{
|
||||||
d_map_base[0] = d_select_queue;
|
d_map_base[0] = d_select_queue;
|
||||||
@ -194,6 +196,7 @@ void fpga_acquisition::configure_acquisition()
|
|||||||
d_map_base[5] = (int)log2((float)d_vector_length); // log2 FFTlength
|
d_map_base[5] = (int)log2((float)d_vector_length); // log2 FFTlength
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::set_phase_step(unsigned int doppler_index)
|
void fpga_acquisition::set_phase_step(unsigned int doppler_index)
|
||||||
{
|
{
|
||||||
float phase_step_rad_real;
|
float phase_step_rad_real;
|
||||||
@ -217,6 +220,7 @@ void fpga_acquisition::set_phase_step(unsigned int doppler_index)
|
|||||||
d_map_base[3] = phase_step_rad_int;
|
d_map_base[3] = phase_step_rad_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::read_acquisition_results(uint32_t *max_index,
|
void fpga_acquisition::read_acquisition_results(uint32_t *max_index,
|
||||||
float *max_magnitude, unsigned *initial_sample, float *power_sum)
|
float *max_magnitude, unsigned *initial_sample, float *power_sum)
|
||||||
{
|
{
|
||||||
@ -231,6 +235,7 @@ void fpga_acquisition::read_acquisition_results(uint32_t* max_index,
|
|||||||
*max_index = readval;
|
*max_index = readval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::block_samples()
|
void fpga_acquisition::block_samples()
|
||||||
{
|
{
|
||||||
d_map_base[14] = 1; // block the samples
|
d_map_base[14] = 1; // block the samples
|
||||||
@ -242,6 +247,7 @@ void fpga_acquisition::unblock_samples()
|
|||||||
d_map_base[14] = 0; // unblock the samples
|
d_map_base[14] = 0; // unblock the samples
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::close_device()
|
void fpga_acquisition::close_device()
|
||||||
{
|
{
|
||||||
unsigned *aux = const_cast<unsigned *>(d_map_base);
|
unsigned *aux = const_cast<unsigned *>(d_map_base);
|
||||||
@ -252,6 +258,7 @@ void fpga_acquisition::close_device()
|
|||||||
close(d_fd);
|
close(d_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::reset_acquisition(void)
|
void fpga_acquisition::reset_acquisition(void)
|
||||||
{
|
{
|
||||||
d_map_base[6] = RESET_ACQUISITION; // writing a 2 to d_map_base[6] resets the multicorrelator
|
d_map_base[6] = RESET_ACQUISITION; // writing a 2 to d_map_base[6] resets the multicorrelator
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
||||||
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
||||||
|
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <gnuradio/fft/fft.h>
|
||||||
|
#include <volk/volk.h>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Class that implements carrier wipe-off and correlators.
|
* \brief Class that implements carrier wipe-off and correlators.
|
||||||
@ -51,7 +51,9 @@ public:
|
|||||||
unsigned int nsamples_total, long fs_in, long freq,
|
unsigned int nsamples_total, long fs_in, long freq,
|
||||||
unsigned int sampled_ms, unsigned select_queue,
|
unsigned int sampled_ms, unsigned select_queue,
|
||||||
lv_16sc_t *all_fft_codes);
|
lv_16sc_t *all_fft_codes);
|
||||||
~fpga_acquisition();bool init();bool set_local_code(
|
~fpga_acquisition();
|
||||||
|
bool init();
|
||||||
|
bool set_local_code(
|
||||||
unsigned int PRN);
|
unsigned int PRN);
|
||||||
bool free();
|
bool free();
|
||||||
void run_acquisition(void);
|
void run_acquisition(void);
|
||||||
@ -80,7 +82,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
long d_freq;
|
long d_freq;
|
||||||
long d_fs_in;
|
long d_fs_in;
|
||||||
gr::fft::fft_complex *d_fft_if; // function used to run the fft of the local codes
|
gr::fft::fft_complex *d_fft_if; // function used to run the fft of the local codes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user