1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-03 16:53:04 +00:00

bds_b3i: merging new changes, fixing D2 decoding bug

This commit is contained in:
Damian Miralles
2019-03-07 09:38:49 -06:00
270 changed files with 1283 additions and 1448 deletions

View File

@@ -41,7 +41,6 @@ set(GNSS_SPLIBS_SOURCES
conjugate_ic.cc
gnss_sdr_create_directory.cc
geofunctions.cc
rtcm.cc
)
set(GNSS_SPLIBS_HEADERS
@@ -68,7 +67,6 @@ set(GNSS_SPLIBS_HEADERS
gnss_sdr_create_directory.h
gnss_circular_deque.h
geofunctions.h
rtcm.h
)
if(ENABLE_FPGA)
@@ -116,20 +114,18 @@ target_link_libraries(algorithms_libs
Gflags::gflags
Gnuradio::runtime
Gnuradio::blocks
Volk::volk ${ORC_LIBRARIES}
Volkgnsssdr::volkgnsssdr
core_system_parameters
${OPT_LIBRARIES}
PRIVATE
core_system_parameters
Volk::volk ${ORC_LIBRARIES}
Volkgnsssdr::volkgnsssdr
Boost::filesystem
Gflags::gflags
Glog::glog
)
target_include_directories(algorithms_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
)
target_compile_definitions(algorithms_libs
@@ -141,15 +137,6 @@ set_property(TARGET algorithms_libs
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
target_compile_definitions(algorithms_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW
)
endif()
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(algorithms_libs

View File

@@ -31,7 +31,10 @@
#include "byte_x2_to_complex_byte.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
#include <complex> // for complex
#include <cstdint> // for int8_t
byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte()
@@ -44,7 +47,7 @@ byte_x2_to_complex_byte::byte_x2_to_complex_byte() : sync_block("byte_x2_to_comp
gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char)
gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char>
{
const int alignment_multiple = volk_get_alignment() / sizeof(lv_8sc_t);
const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_8sc_t);
set_alignment(std::max(1, alignment_multiple));
}

View File

@@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class byte_x2_to_complex_byte;
@@ -49,10 +50,9 @@ class byte_x2_to_complex_byte : public gr::sync_block
{
private:
friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
public:
byte_x2_to_complex_byte();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -32,6 +32,7 @@
#include "complex_byte_to_float_x2.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include <algorithm> // for max
complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2()

View File

@@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_byte_to_float_x2;
@@ -49,10 +50,9 @@ class complex_byte_to_float_x2 : public gr::sync_block
{
private:
friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
public:
complex_byte_to_float_x2();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -32,7 +32,7 @@
#include "complex_float_to_complex_byte.h"
#include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte()
{

View File

@@ -33,6 +33,8 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_float_to_complex_byte;
@@ -47,10 +49,9 @@ class complex_float_to_complex_byte : public gr::sync_block
{
private:
friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
public:
complex_float_to_complex_byte();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -31,6 +31,7 @@
#include "conjugate_cc.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include <algorithm> // for max
conjugate_cc_sptr make_conjugate_cc()

View File

@@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_cc;
@@ -48,10 +49,9 @@ class conjugate_cc : public gr::sync_block
{
private:
friend conjugate_cc_sptr make_conjugate_cc();
public:
conjugate_cc();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -31,6 +31,7 @@
#include "conjugate_ic.h"
#include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
conjugate_ic_sptr make_conjugate_ic()

View File

@@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_ic;
@@ -48,10 +49,9 @@ class conjugate_ic : public gr::sync_block
{
private:
friend conjugate_ic_sptr make_conjugate_ic();
public:
conjugate_ic();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -31,7 +31,7 @@
#include "conjugate_sc.h"
#include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
conjugate_sc_sptr make_conjugate_sc()
{

View File

@@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_sc;
@@ -48,10 +49,9 @@ class conjugate_sc : public gr::sync_block
{
private:
friend conjugate_sc_sptr make_conjugate_sc();
public:
conjugate_sc();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -32,6 +32,7 @@
#include "cshort_to_float_x2.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include <algorithm> // for max
cshort_to_float_x2_sptr make_cshort_to_float_x2()

View File

@@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class cshort_to_float_x2;
@@ -49,10 +50,9 @@ class cshort_to_float_x2 : public gr::sync_block
{
private:
friend cshort_to_float_x2_sptr make_cshort_to_float_x2();
public:
cshort_to_float_x2();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);

View File

@@ -131,6 +131,12 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
delete[] _code;
if (_fs != _codeFreqBasis)
{
free(_code);
}
else
{
delete[] _code;
}
}

View File

@@ -40,7 +40,6 @@
#include <string>
#include <sys/mman.h> // libraries used by the GIPO
using google::LogMessage;
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
#define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw)

View File

@@ -33,10 +33,11 @@
#include "pass_through.h"
#include "configuration_interface.h"
#include <glog/logging.h>
#include <volk/volk.h>
#include <complex>
#include <gnuradio/gr_complex.h>
#include <volk/volk_complex.h>
#include <cstdint> // for int8_t
#include <ostream> // for operator<<
using google::LogMessage;
Pass_Through::Pass_Through(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams,

View File

@@ -38,7 +38,8 @@
#include "conjugate_sc.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/copy.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/runtime_types.h>
#include <cstddef>
#include <string>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -66,9 +66,8 @@ source_group(Headers FILES ${RTKLIB_LIB_HEADERS})
add_library(algorithms_libs_rtklib ${RTKLIB_LIB_SOURCES} ${RTKLIB_LIB_HEADERS})
target_link_libraries(algorithms_libs_rtklib
PUBLIC
core_system_parameters
PRIVATE
core_system_parameters
Gflags::gflags
Glog::glog
)

View File

@@ -29,7 +29,20 @@
*/
#include "rtklib_conversions.h"
#include "MATH_CONSTANTS.h" // for PI, PI_2
#include "beidou_dnav_ephemeris.h" // for Beidou_Dnav_Ephemeris
#include "galileo_almanac.h" // for Galileo_Almanac
#include "galileo_ephemeris.h" // for Galileo_Ephemeris
#include "glonass_gnav_ephemeris.h" // for Glonass_Gnav_Ephemeris
#include "glonass_gnav_utc_model.h" // for Glonass_Gnav_Utc_Model
#include "gnss_obs_codes.h" // for CODE_L1C, CODE_L2S, CODE_L5X
#include "gnss_synchro.h" // for Gnss_Synchro
#include "gps_almanac.h" // for Gps_Almanac
#include "gps_cnav_ephemeris.h" // for Gps_CNAV_Ephemeris
#include "gps_ephemeris.h" // for Gps_Ephemeris
#include "rtklib_rtkcmn.h"
#include <cmath>
#include <cstdint>
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
{

View File

@@ -31,17 +31,18 @@
#ifndef GNSS_SDR_RTKLIB_CONVERSIONS_H_
#define GNSS_SDR_RTKLIB_CONVERSIONS_H_
#include "beidou_dnav_ephemeris.h"
#include "galileo_almanac.h"
#include "galileo_ephemeris.h"
#include "glonass_gnav_ephemeris.h"
#include "glonass_gnav_utc_model.h"
#include "gnss_synchro.h"
#include "gps_almanac.h"
#include "gps_cnav_ephemeris.h"
#include "gps_ephemeris.h"
#include "rtklib.h"
class Beidou_Dnav_Ephemeris;
class Galileo_Almanac;
class Galileo_Ephemeris;
class Glonass_Gnav_Ephemeris;
class Glonass_Gnav_Utc_Model;
class Gnss_Synchro;
class Gps_Almanac;
class Gps_CNAV_Ephemeris;
class Gps_Ephemeris;
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph);
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph);

View File

@@ -31,8 +31,9 @@
#include "short_x2_to_cshort.h"
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
#include <complex> // for complex
short_x2_to_cshort_sptr make_short_x2_to_cshort()
{
@@ -44,7 +45,7 @@ short_x2_to_cshort::short_x2_to_cshort() : sync_block("short_x2_to_cshort",
gr::io_signature::make(2, 2, sizeof(int16_t)),
gr::io_signature::make(1, 1, sizeof(lv_16sc_t)))
{
const int alignment_multiple = volk_get_alignment() / sizeof(lv_16sc_t);
const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_16sc_t);
set_alignment(std::max(1, alignment_multiple));
}
@@ -61,7 +62,6 @@ int short_x2_to_cshort::work(int noutput_items,
int16_t imag_part;
for (int number = 0; number < noutput_items; number++)
{
// lv_cmake(r, i) defined at volk/volk_complex.h
real_part = *in0++;
imag_part = *in1++;
*out++ = lv_cmake(real_part, imag_part);

View File

@@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class short_x2_to_cshort;
@@ -48,10 +49,9 @@ class short_x2_to_cshort : public gr::sync_block
{
private:
friend short_x2_to_cshort_sptr make_short_x2_to_cshort();
public:
short_x2_to_cshort();
public:
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);