1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-12 23:39:46 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-03-28 17:38:17 +02:00
commit e55be0c0d5
2 changed files with 13 additions and 61 deletions

View File

@ -16,40 +16,11 @@
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
#if(ENABLE_CUDA)
# # Append current NVCC flags by something, eg comput capability
# # set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --gpu-architecture sm_30)
# list(APPEND CUDA_NVCC_FLAGS "-gencode arch=compute_30,code=sm_30; -std=c++11;-O3; -use_fast_math -default-stream per-thread")
# set(CUDA_PROPAGATE_HOST_FLAGS OFF)
# CUDA_INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR})
# set(LIB_TYPE STATIC) #set the lib type
# CUDA_ADD_LIBRARY(CUDA_CORRELATOR_LIB ${LIB_TYPE} cuda_multicorrelator.h cuda_multicorrelator.cu)
# set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} CUDA_CORRELATOR_LIB)
# set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS} )
#endif(ENABLE_CUDA)
#set(TRACKING_LIB_SOURCES
set(ACQUISITION_LIB_SOURCES
gps_fpga_acquisition_8sc.cc
# cpu_multicorrelator.cc
# cpu_multicorrelator_16sc.cc
# lock_detectors.cc
# tcp_communication.cc
# tcp_packet_data.cc
# tracking_2nd_DLL_filter.cc
# tracking_2nd_PLL_filter.cc
# tracking_discriminators.cc
# tracking_FLL_PLL_filter.cc
# tracking_loop_filter.cc
)
#if(ENABLE_FPGA)
# SET(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} fpga_acquisition_8sc.cc)
#endif(ENABLE_FPGA)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@ -59,34 +30,17 @@ include_directories(
${VOLK_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDES}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
if(ENABLE_GENERIC_ARCH)
add_definitions( -DGENERIC_ARCH=1 )
endif(ENABLE_GENERIC_ARCH)
if (SSE3_AVAILABLE)
add_definitions( -DHAVE_SSE3=1 )
endif(SSE3_AVAILABLE)
#file(GLOB TRACKING_LIB_HEADERS "*.h")
file(GLOB ACQUISITION_LIB_HEADERS "*.h")
#list(SORT TRACKING_LIB_HEADERS)
list(SORT ACQUISITION_LIB_HEADERS)
#add_library(tracking_lib ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
add_library(acquisition_lib ${ACQUISITION_LIB_SOURCES} ${ACQUISITION_LIB_HEADERS})
#source_group(Headers FILES ${TRACKING_LIB_HEADERS})
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
#target_link_libraries(tracking_lib ${OPT_TRACKING_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
target_link_libraries(acquisition_lib ${OPT_ACQUISITION_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
target_link_libraries(acquisition_lib ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
if(VOLK_GNSSSDR_FOUND)
# add_dependencies(tracking_lib glog-${glog_RELEASE})
add_dependencies(acquisition_lib glog-${glog_RELEASE})
else(VOLK_GNSSSDR_FOUND)
# add_dependencies(tracking_lib glog-${glog_RELEASE} volk_gnsssdr_module)
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
endif()

View File

@ -35,34 +35,32 @@
#include "gps_fpga_acquisition_8sc.h"
#include "gps_sdr_signal_processing.h"
#include "GPS_L1_CA.h"
#include <cmath>
#include <volk/volk.h>
// allocate memory dynamically
#include <new>
// libraries used by DMA test code and GIPO test code
#include <stdio.h>
#include <cstdio>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <cerrno>
// libraries used by DMA test code
#include <sys/stat.h>
#include <stdint.h>
#include <unistd.h>
#include <assert.h>
#include <cstdint>
#include <cassert>
// libraries used by GPIO test code
#include <stdlib.h>
#include <signal.h>
#include <cstdlib>
#include <csignal>
#include <sys/mman.h>
// logging
#include <glog/logging.h>
#include <volk/volk.h>
#include "GPS_L1_CA.h"
#define PAGE_SIZE 0x10000
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
@ -110,7 +108,7 @@ gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc(std::string device_name,
// allocate memory to compute all the PRNs
// and compute all the possible codes
std::complex<float>* code = new std::complex<float>[nsamples_total]; // buffer for the local code
std::complex<float>* code_total = new gr_complex[vector_length]; // buffer for the local code repeate every number of ms
std::complex<float>* code_total = new gr_complex[vector_length]; // buffer for the local code repeat every number of ms
gr_complex* d_fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(vector_length * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
@ -252,8 +250,8 @@ void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index)
{
phase_step_rad_real = MAX_PHASE_STEP_RAD;
}
phase_step_rad_int_temp = phase_step_rad_real * 4; // * 2^2
phase_step_rad_int = (int32_t)(phase_step_rad_int_temp * (536870912)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
phase_step_rad_int_temp = phase_step_rad_real * 4; // * 2^2
phase_step_rad_int = static_cast<int32_t>(phase_step_rad_int_temp * (536870912)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
d_map_base[3] = phase_step_rad_int;
}