1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-29 02:14:51 +00:00

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

This commit is contained in:
Carles Fernandez 2017-12-04 18:40:10 +01:00
commit ee37dabb1f
3 changed files with 109 additions and 97 deletions

View File

@ -30,8 +30,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_GPS_L2C_SIGNAL_H_ #ifndef GNSS_SDR_GPS_L2C_SIGNAL_H_
#define GNSS_GPS_L2C_SIGNAL_H_ #define GNSS_SDR_GPS_L2C_SIGNAL_H_
#include <complex> #include <complex>

View File

@ -1,13 +1,13 @@
/*! /*!
* \file gps_l2c_signal.cc * \file gps_l5_signal.cc
* \brief This class implements signal generators for the GPS L2C signals * \brief This class implements signal generators for the GPS L5 signals
* \author Javier Arribas, 2015. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
* Detailed description of the file here if needed. * Detailed description of the file here if needed.
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -35,35 +35,39 @@
#include <cmath> #include <cmath>
#include <cinttypes> #include <cinttypes>
#include <complex> #include <complex>
#include "GPS_L5.h" #include "GPS_L5.h"
using namespace std;
std::deque<bool> l5i_xa_shift(std::deque<bool> xa) std::deque<bool> l5i_xa_shift(std::deque<bool> xa)
{ {
if (xa == std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,0,1}) if (xa == std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,0,1})
{ {
return std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,1,1}; return std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,1,1};
}else{ }
else
{
std::deque<bool> out(xa.begin(), xa.end() - 1); std::deque<bool> out(xa.begin(), xa.end() - 1);
out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]);
return out; return out;
} }
} }
std::deque<bool> l5q_xa_shift(std::deque<bool> xa) std::deque<bool> l5q_xa_shift(std::deque<bool> xa)
{ {
if (xa == std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,0,1}) if (xa == std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,0,1})
{ {
return std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,1,1}; return std::deque<bool>{1,1,1,1,1,1,1,1,1,1,1,1,1};
}else{ }
else
{
std::deque<bool> out(xa.begin(), xa.end() - 1); std::deque<bool> out(xa.begin(), xa.end() - 1);
out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]);
return out; return out;
} }
} }
std::deque<bool> l5i_xb_shift(std::deque<bool> xb) std::deque<bool> l5i_xb_shift(std::deque<bool> xb)
{ {
std::deque<bool> out(xb.begin(), xb.end() - 1); std::deque<bool> out(xb.begin(), xb.end() - 1);
@ -71,6 +75,7 @@ std::deque<bool> l5i_xb_shift(std::deque<bool> xb)
return out; return out;
} }
std::deque<bool> l5q_xb_shift(std::deque<bool> xb) std::deque<bool> l5q_xb_shift(std::deque<bool> xb)
{ {
std::deque<bool> out(xb.begin(), xb.end()-1); std::deque<bool> out(xb.begin(), xb.end()-1);
@ -78,6 +83,7 @@ std::deque<bool> l5q_xb_shift(std::deque<bool> xb)
return out; return out;
} }
std::deque<bool> make_l5i_xa() std::deque<bool> make_l5i_xa()
{ {
std::deque<bool> xa = {1,1,1,1,1,1,1,1,1,1,1,1,1}; std::deque<bool> xa = {1,1,1,1,1,1,1,1,1,1,1,1,1};
@ -91,6 +97,7 @@ std::deque<bool> make_l5i_xa()
return y; return y;
} }
std::deque<bool> make_l5i_xb() std::deque<bool> make_l5i_xb()
{ {
std::deque<bool> xb = {1,1,1,1,1,1,1,1,1,1,1,1,1}; std::deque<bool> xb = {1,1,1,1,1,1,1,1,1,1,1,1,1};
@ -104,6 +111,7 @@ std::deque<bool> make_l5i_xb()
return y; return y;
} }
std::deque<bool> make_l5q_xa() std::deque<bool> make_l5q_xa()
{ {
std::deque<bool> xa = {1,1,1,1,1,1,1,1,1,1,1,1,1}; std::deque<bool> xa = {1,1,1,1,1,1,1,1,1,1,1,1,1};
@ -117,6 +125,7 @@ std::deque<bool> make_l5q_xa()
return y; return y;
} }
std::deque<bool> make_l5q_xb() std::deque<bool> make_l5q_xb()
{ {
std::deque<bool> xb = {1,1,1,1,1,1,1,1,1,1,1,1,1}; std::deque<bool> xb = {1,1,1,1,1,1,1,1,1,1,1,1,1};
@ -130,6 +139,7 @@ std::deque<bool> make_l5q_xb()
return y; return y;
} }
void make_l5i(int32_t * _dest, int prn) void make_l5i(int32_t * _dest, int prn)
{ {
int xb_offset = GPS_L5i_INIT_REG[prn]; int xb_offset = GPS_L5i_INIT_REG[prn];
@ -149,6 +159,7 @@ void make_l5i(int32_t * _dest, int prn)
} }
} }
void make_l5q(int32_t * _dest, int prn) void make_l5q(int32_t * _dest, int prn)
{ {
int xb_offset = GPS_L5q_INIT_REG[prn]; int xb_offset = GPS_L5q_INIT_REG[prn];
@ -168,6 +179,7 @@ void make_l5q(int32_t * _dest, int prn)
} }
} }
void gps_l5i_code_gen_complex(std::complex<float>* _dest, unsigned int _prn) void gps_l5i_code_gen_complex(std::complex<float>* _dest, unsigned int _prn)
{ {
int32_t* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS]; int32_t* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];

View File

@ -1,13 +1,13 @@
/*! /*!
* \file gps_l5_signal.h * \file gps_l5_signal.h
* \brief This class implements signal generators for the GPS L2C signals * \brief This class implements signal generators for the GPS L5 signals
* \author Javier Arribas, 2017. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
* Detailed description of the file here if needed. * Detailed description of the file here if needed.
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -30,8 +30,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_GPS_L5_SIGNAL_H_ #ifndef GNSS_SDR_GPS_L5_SIGNAL_H_
#define GNSS_GPS_L5_SIGNAL_H_ #define GNSS_SDR_GPS_L5_SIGNAL_H_
#include <complex> #include <complex>
@ -49,4 +49,4 @@ void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _
void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _prn, signed int _fs); void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _prn, signed int _fs);
#endif /* GNSS_GPS_L5_SIGNAL_H_ */ #endif /* GNSS_SDR_GPS_L5_SIGNAL_H_ */