GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
gnss_signal_replica.h
Go to the documentation of this file.
1 /*!
2  * \file gnss_signal_replica.h
3  * \brief This library gathers a few functions used for GNSS signal replica
4  * generation regardless of system used
5  * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
6  *
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
11  * This file is part of GNSS-SDR.
12  *
13  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
14  * SPDX-License-Identifier: GPL-3.0-or-later
15  *
16  * -----------------------------------------------------------------------------
17  */
18 
19 #ifndef GNSS_SDR_GNSS_SIGNAL_REPLICA_H
20 #define GNSS_SDR_GNSS_SIGNAL_REPLICA_H
21 
22 #include <complex>
23 #include <cstdint>
24 #include <string>
25 #if HAS_STD_SPAN
26 #include <span>
27 namespace own = std;
28 #else
29 #include <gsl/gsl-lite.hpp>
30 namespace own = gsl;
31 #endif
32 
33 /** \addtogroup Algorithms_Library
34  * \{ */
35 /** \addtogroup Algorithm_libs algorithms_libs
36  * \{ */
37 
38 
39 /*!
40  * \brief This function generates a complex exponential in dest.
41  *
42  */
43 void complex_exp_gen(own::span<std::complex<float>> dest, double freq, double sampling_freq);
44 
45 /*!
46  * \brief This function generates a conjugate complex exponential in dest.
47  *
48  */
49 void complex_exp_gen_conj(own::span<std::complex<float>> dest, double freq, double sampling_freq);
50 
51 /*!
52  * \brief This function makes a conversion from hex (the input is a char)
53  * to binary (the output are 4 ints with +1 or -1 values).
54  *
55  */
56 void hex_to_binary_converter(own::span<int32_t> dest, char from);
57 
58 /*!
59  * \brief This function makes a conversion from hex (the input is a char)
60  * to binary (the output is a string of 4 char with 0 or 1 values).
61  *
62  */
63 std::string hex_to_binary_string(char from);
64 
65 /*!
66  * \brief This function resamples a sequence of float values.
67  *
68  */
69 void resampler(const own::span<float> from, own::span<float> dest,
70  float fs_in, float fs_out);
71 
72 /*!
73  * \brief This function resamples a sequence of complex values.
74  *
75  */
76 void resampler(own::span<const std::complex<float>> from, own::span<std::complex<float>> dest,
77  float fs_in, float fs_out);
78 
79 
80 /** \} */
81 /** \} */
82 #endif // GNSS_SDR_GNSS_SIGNAL_REPLICA_H
void complex_exp_gen_conj(own::span< std::complex< float >> dest, double freq, double sampling_freq)
This function generates a conjugate complex exponential in dest.
void resampler(const own::span< float > from, own::span< float > dest, float fs_in, float fs_out)
This function resamples a sequence of float values.
void complex_exp_gen(own::span< std::complex< float >> dest, double freq, double sampling_freq)
This function generates a complex exponential in dest.
STL namespace.
void hex_to_binary_converter(own::span< int32_t > dest, char from)
This function makes a conversion from hex (the input is a char) to binary (the output are 4 ints with...
std::string hex_to_binary_string(char from)
This function makes a conversion from hex (the input is a char) to binary (the output is a string of ...