mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
9759e0f580
@ -1797,7 +1797,24 @@ set_package_properties(Protobuf PROPERTIES
|
|||||||
PURPOSE "Used to serialize output data in a way that can be read by other applications."
|
PURPOSE "Used to serialize output data in a way that can be read by other applications."
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
)
|
)
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.6)
|
||||||
|
if(PROTOBUF_FOUND)
|
||||||
|
set(Protobuf_FOUND ${PROTOBUF_FOUND})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
|
if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
|
||||||
|
if(PROTOBUF_INCLUDE_DIR)
|
||||||
|
set(Protobuf_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(PROTOBUF_LIBRARY)
|
||||||
|
set(Protobuf_LIBRARY ${PROTOBUF_LIBRARY})
|
||||||
|
endif()
|
||||||
|
if(PROTOBUF_PROTOC_EXECUTABLE)
|
||||||
|
set(Protobuf_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
if(PROTOBUF_PROTOC_LIBRARY)
|
||||||
|
set(Protobuf_PROTOC_LIBRARY ${PROTOBUF_PROTOC_EXECUTABLE})
|
||||||
|
endif()
|
||||||
add_library(protobuf::libprotobuf SHARED IMPORTED)
|
add_library(protobuf::libprotobuf SHARED IMPORTED)
|
||||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||||
@ -1811,6 +1828,20 @@ if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
|
|||||||
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}"
|
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}"
|
||||||
INTERFACE_LINK_LIBRARIES "${Protobuf_PROTOC_LIBRARY}"
|
INTERFACE_LINK_LIBRARIES "${Protobuf_PROTOC_LIBRARY}"
|
||||||
)
|
)
|
||||||
|
if(${Protobuf_VERSION} VERSION_EQUAL "0.0.0")
|
||||||
|
set(_PROTOBUF_COMMON_HEADER ${Protobuf_INCLUDE_DIR}/google/protobuf/stubs/common.h)
|
||||||
|
set(Protobuf_VERSION "")
|
||||||
|
set(Protobuf_LIB_VERSION "")
|
||||||
|
file(STRINGS ${_PROTOBUF_COMMON_HEADER} _PROTOBUF_COMMON_H_CONTENTS REGEX "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+")
|
||||||
|
if(_PROTOBUF_COMMON_H_CONTENTS MATCHES "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+([0-9]+)")
|
||||||
|
set(Protobuf_LIB_VERSION "${CMAKE_MATCH_1}")
|
||||||
|
endif()
|
||||||
|
unset(_PROTOBUF_COMMON_H_CONTENTS)
|
||||||
|
math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
|
||||||
|
math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
|
||||||
|
math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
|
||||||
|
set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
|
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
|
||||||
find_program(PROTOC_EXECUTABLE protoc
|
find_program(PROTOC_EXECUTABLE protoc
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
||||||
|
|
||||||
@ -159,98 +160,99 @@ public:
|
|||||||
~galileo_e5a_noncoherentIQ_acquisition_caf_cc();
|
~galileo_e5a_noncoherentIQ_acquisition_caf_cc();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||||
* to exchange synchronization data between acquisition and tracking blocks.
|
* to exchange synchronization data between acquisition and tracking blocks.
|
||||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||||
*/
|
*/
|
||||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||||
{
|
{
|
||||||
d_gnss_synchro = p_gnss_synchro;
|
d_gnss_synchro = p_gnss_synchro;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the maximum peak of grid search.
|
* \brief Returns the maximum peak of grid search.
|
||||||
*/
|
*/
|
||||||
inline unsigned int mag() const
|
inline unsigned int mag() const
|
||||||
{
|
{
|
||||||
return d_mag;
|
return d_mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initializes acquisition algorithm.
|
* \brief Initializes acquisition algorithm.
|
||||||
*/
|
*/
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets local code for PCPS acquisition algorithm.
|
* \brief Sets local code for PCPS acquisition algorithm.
|
||||||
* \param code - Pointer to the PRN code.
|
* \param code - Pointer to the PRN code.
|
||||||
*/
|
*/
|
||||||
void set_local_code(std::complex<float>* code, std::complex<float>* codeQ);
|
void set_local_code(std::complex<float>* code, std::complex<float>* codeQ);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||||
* active mode
|
* active mode
|
||||||
* \param active - bool that activates/deactivates the block.
|
* \param active - bool that activates/deactivates the block.
|
||||||
*/
|
*/
|
||||||
inline void set_active(bool active)
|
inline void set_active(bool active)
|
||||||
{
|
{
|
||||||
d_active = active;
|
d_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief If set to 1, ensures that acquisition starts at the
|
* \brief If set to 1, ensures that acquisition starts at the
|
||||||
* first available sample.
|
* first available sample.
|
||||||
* \param state - int=1 forces start of acquisition
|
* \param state - int=1 forces start of acquisition
|
||||||
*/
|
*/
|
||||||
void set_state(int state);
|
void set_state(int state);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
* \param channel - receiver channel.
|
* \param channel - receiver channel.
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm.
|
* \brief Set statistics threshold of PCPS algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
* Algorithm 1, for a definition of this threshold).
|
* Algorithm 1, for a definition of this threshold).
|
||||||
*/
|
*/
|
||||||
inline void set_threshold(float threshold)
|
inline void set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
d_threshold = threshold;
|
d_threshold = threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set maximum Doppler grid search
|
* \brief Set maximum Doppler grid search
|
||||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_max(unsigned int doppler_max)
|
inline void set_doppler_max(unsigned int doppler_max)
|
||||||
{
|
{
|
||||||
d_doppler_max = doppler_max;
|
d_doppler_max = doppler_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set Doppler steps for the grid search
|
* \brief Set Doppler steps for the grid search
|
||||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_step(unsigned int doppler_step)
|
inline void set_doppler_step(unsigned int doppler_step)
|
||||||
{
|
{
|
||||||
d_doppler_step = doppler_step;
|
d_doppler_step = doppler_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||||
*/
|
*/
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||||
gr_vector_const_void_star& input_items,
|
gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items);
|
gr_vector_void_star& output_items);
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class galileo_pcps_8ms_acquisition_cc;
|
class galileo_pcps_8ms_acquisition_cc;
|
||||||
|
|
||||||
@ -182,14 +183,14 @@ public:
|
|||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm.
|
* \brief Set statistics threshold of PCPS algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class Gnss_Synchro;
|
class Gnss_Synchro;
|
||||||
class pcps_acquisition;
|
class pcps_acquisition;
|
||||||
@ -153,10 +154,10 @@ public:
|
|||||||
~pcps_acquisition();
|
~pcps_acquisition();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||||
* to exchange synchronization data between acquisition and tracking blocks.
|
* to exchange synchronization data between acquisition and tracking blocks.
|
||||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||||
*/
|
*/
|
||||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
@ -172,21 +173,21 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initializes acquisition algorithm and reserves memory.
|
* \brief Initializes acquisition algorithm and reserves memory.
|
||||||
*/
|
*/
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets local code for PCPS acquisition algorithm.
|
* \brief Sets local code for PCPS acquisition algorithm.
|
||||||
* \param code - Pointer to the PRN code.
|
* \param code - Pointer to the PRN code.
|
||||||
*/
|
*/
|
||||||
void set_local_code(std::complex<float>* code);
|
void set_local_code(std::complex<float>* code);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||||
* active mode
|
* active mode
|
||||||
* \param active - bool that activates/deactivates the block.
|
* \param active - bool that activates/deactivates the block.
|
||||||
*/
|
*/
|
||||||
inline void set_active(bool active)
|
inline void set_active(bool active)
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
@ -194,35 +195,34 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief If set to 1, ensures that acquisition starts at the
|
* \brief If set to 1, ensures that acquisition starts at the
|
||||||
* first available sample.
|
* first available sample.
|
||||||
* \param state - int=1 forces start of acquisition
|
* \param state - int=1 forces start of acquisition
|
||||||
*/
|
*/
|
||||||
void set_state(int32_t state);
|
void set_state(int32_t state);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
* \param channel - receiver channel.
|
* \param channel - receiver channel.
|
||||||
*/
|
*/
|
||||||
inline void set_channel(uint32_t channel)
|
inline void set_channel(uint32_t channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm.
|
* \brief Set statistics threshold of PCPS algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
* Algorithm 1, for a definition of this threshold).
|
* Algorithm 1, for a definition of this threshold).
|
||||||
*/
|
*/
|
||||||
inline void set_threshold(float threshold)
|
inline void set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
@ -230,9 +230,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set maximum Doppler grid search
|
* \brief Set maximum Doppler grid search
|
||||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_max(uint32_t doppler_max)
|
inline void set_doppler_max(uint32_t doppler_max)
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
@ -240,9 +240,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set Doppler steps for the grid search
|
* \brief Set Doppler steps for the grid search
|
||||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_step(uint32_t doppler_step)
|
inline void set_doppler_step(uint32_t doppler_step)
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
@ -253,8 +253,8 @@ public:
|
|||||||
void set_resampler_latency(uint32_t latency_samples);
|
void set_resampler_latency(uint32_t latency_samples);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||||
*/
|
*/
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||||
gr_vector_const_void_star& input_items,
|
gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items);
|
gr_vector_void_star& output_items);
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class pcps_acquisition_fine_doppler_cc;
|
class pcps_acquisition_fine_doppler_cc;
|
||||||
|
|
||||||
@ -185,14 +186,14 @@ public:
|
|||||||
d_dump_channel = d_channel;
|
d_dump_channel = d_channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm.
|
* \brief Set statistics threshold of PCPS algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class pcps_assisted_acquisition_cc;
|
class pcps_assisted_acquisition_cc;
|
||||||
|
|
||||||
@ -195,13 +196,12 @@ public:
|
|||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
class pcps_cccwsr_acquisition_cc;
|
class pcps_cccwsr_acquisition_cc;
|
||||||
@ -137,90 +138,90 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the maximum peak of grid search.
|
* \brief Returns the maximum peak of grid search.
|
||||||
*/
|
*/
|
||||||
inline uint32_t mag() const
|
inline uint32_t mag() const
|
||||||
{
|
{
|
||||||
return d_mag;
|
return d_mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initializes acquisition algorithm.
|
* \brief Initializes acquisition algorithm.
|
||||||
*/
|
*/
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets local code for CCCWSR acquisition algorithm.
|
* \brief Sets local code for CCCWSR acquisition algorithm.
|
||||||
* \param data_code - Pointer to the data PRN code.
|
* \param data_code - Pointer to the data PRN code.
|
||||||
* \param pilot_code - Pointer to the pilot PRN code.
|
* \param pilot_code - Pointer to the pilot PRN code.
|
||||||
*/
|
*/
|
||||||
void set_local_code(std::complex<float>* code_data, std::complex<float>* code_pilot);
|
void set_local_code(std::complex<float>* code_data, std::complex<float>* code_pilot);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||||
* active mode
|
* active mode
|
||||||
* \param active - bool that activates/deactivates the block.
|
* \param active - bool that activates/deactivates the block.
|
||||||
*/
|
*/
|
||||||
inline void set_active(bool active)
|
inline void set_active(bool active)
|
||||||
{
|
{
|
||||||
d_active = active;
|
d_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief If set to 1, ensures that acquisition starts at the
|
* \brief If set to 1, ensures that acquisition starts at the
|
||||||
* first available sample.
|
* first available sample.
|
||||||
* \param state - int=1 forces start of acquisition
|
* \param state - int=1 forces start of acquisition
|
||||||
*/
|
*/
|
||||||
void set_state(int32_t state);
|
void set_state(int32_t state);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
* \param channel - receiver channel.
|
* \param channel - receiver channel.
|
||||||
*/
|
*/
|
||||||
inline void set_channel(uint32_t channel)
|
inline void set_channel(uint32_t channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of CCCWSR algorithm.
|
* \brief Set statistics threshold of CCCWSR algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
* Algorithm 1, for a definition of this threshold).
|
* Algorithm 1, for a definition of this threshold).
|
||||||
*/
|
*/
|
||||||
inline void set_threshold(float threshold)
|
inline void set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
d_threshold = threshold;
|
d_threshold = threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set maximum Doppler grid search
|
* \brief Set maximum Doppler grid search
|
||||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_max(uint32_t doppler_max)
|
inline void set_doppler_max(uint32_t doppler_max)
|
||||||
{
|
{
|
||||||
d_doppler_max = doppler_max;
|
d_doppler_max = doppler_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set Doppler steps for the grid search
|
* \brief Set Doppler steps for the grid search
|
||||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_step(uint32_t doppler_step)
|
inline void set_doppler_step(uint32_t doppler_step)
|
||||||
{
|
{
|
||||||
d_doppler_step = doppler_step;
|
d_doppler_step = doppler_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Coherent Channel Combining With Sign Recovery Acquisition signal processing.
|
* \brief Coherent Channel Combining With Sign Recovery Acquisition signal processing.
|
||||||
*/
|
*/
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||||
gr_vector_const_void_star& input_items,
|
gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items);
|
gr_vector_void_star& output_items);
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
class pcps_quicksync_acquisition_cc;
|
class pcps_quicksync_acquisition_cc;
|
||||||
|
|
||||||
@ -215,14 +216,14 @@ public:
|
|||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm.
|
* \brief Set statistics threshold of PCPS algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
class pcps_tong_acquisition_cc;
|
class pcps_tong_acquisition_cc;
|
||||||
@ -144,99 +145,99 @@ public:
|
|||||||
~pcps_tong_acquisition_cc();
|
~pcps_tong_acquisition_cc();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||||
* to exchange synchronization data between acquisition and tracking blocks.
|
* to exchange synchronization data between acquisition and tracking blocks.
|
||||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||||
*/
|
*/
|
||||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||||
{
|
{
|
||||||
d_gnss_synchro = p_gnss_synchro;
|
d_gnss_synchro = p_gnss_synchro;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the maximum peak of grid search.
|
* \brief Returns the maximum peak of grid search.
|
||||||
*/
|
*/
|
||||||
inline uint32_t mag() const
|
inline uint32_t mag() const
|
||||||
{
|
{
|
||||||
return d_mag;
|
return d_mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initializes acquisition algorithm.
|
* \brief Initializes acquisition algorithm.
|
||||||
*/
|
*/
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets local code for TONG acquisition algorithm.
|
* \brief Sets local code for TONG acquisition algorithm.
|
||||||
* \param code - Pointer to the PRN code.
|
* \param code - Pointer to the PRN code.
|
||||||
*/
|
*/
|
||||||
void set_local_code(std::complex<float>* code);
|
void set_local_code(std::complex<float>* code);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||||
* active mode
|
* active mode
|
||||||
* \param active - bool that activates/deactivates the block.
|
* \param active - bool that activates/deactivates the block.
|
||||||
*/
|
*/
|
||||||
inline void set_active(bool active)
|
inline void set_active(bool active)
|
||||||
{
|
{
|
||||||
d_active = active;
|
d_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief If set to 1, ensures that acquisition starts at the
|
* \brief If set to 1, ensures that acquisition starts at the
|
||||||
* first available sample.
|
* first available sample.
|
||||||
* \param state - int=1 forces start of acquisition
|
* \param state - int=1 forces start of acquisition
|
||||||
*/
|
*/
|
||||||
void set_state(int32_t state);
|
void set_state(int32_t state);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
* \param channel - receiver channel.
|
* \param channel - receiver channel.
|
||||||
*/
|
*/
|
||||||
inline void set_channel(uint32_t channel)
|
inline void set_channel(uint32_t channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||||
{
|
{
|
||||||
d_channel_fsm = channel_fsm;
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of TONG algorithm.
|
* \brief Set statistics threshold of TONG algorithm.
|
||||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||||
* Algorithm 1, for a definition of this threshold).
|
* Algorithm 1, for a definition of this threshold).
|
||||||
*/
|
*/
|
||||||
inline void set_threshold(float threshold)
|
inline void set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
d_threshold = threshold;
|
d_threshold = threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set maximum Doppler grid search
|
* \brief Set maximum Doppler grid search
|
||||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_max(uint32_t doppler_max)
|
inline void set_doppler_max(uint32_t doppler_max)
|
||||||
{
|
{
|
||||||
d_doppler_max = doppler_max;
|
d_doppler_max = doppler_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set Doppler steps for the grid search
|
* \brief Set Doppler steps for the grid search
|
||||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||||
*/
|
*/
|
||||||
inline void set_doppler_step(uint32_t doppler_step)
|
inline void set_doppler_step(uint32_t doppler_step)
|
||||||
{
|
{
|
||||||
d_doppler_step = doppler_step;
|
d_doppler_step = doppler_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||||
*/
|
*/
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||||
gr_vector_const_void_star& input_items,
|
gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items);
|
gr_vector_void_star& output_items);
|
||||||
|
@ -218,8 +218,6 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
|||||||
uint32_t GPS_frame_4bytes = 0;
|
uint32_t GPS_frame_4bytes = 0;
|
||||||
float symbol_accumulator = 0;
|
float symbol_accumulator = 0;
|
||||||
bool subframe_synchro_confirmation = false;
|
bool subframe_synchro_confirmation = false;
|
||||||
bool CRC_ok = true;
|
|
||||||
|
|
||||||
for (float subframe_symbol : d_symbol_history)
|
for (float subframe_symbol : d_symbol_history)
|
||||||
{
|
{
|
||||||
// ******* SYMBOL TO BIT *******
|
// ******* SYMBOL TO BIT *******
|
||||||
@ -269,11 +267,6 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
|||||||
{
|
{
|
||||||
subframe_synchro_confirmation = true;
|
subframe_synchro_confirmation = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// std::cout << "word invalid sat " << this->d_satellite << std::endl;
|
|
||||||
CRC_ok = false;
|
|
||||||
}
|
|
||||||
// add word to subframe
|
// add word to subframe
|
||||||
// insert the word in the correct position of the subframe
|
// insert the word in the correct position of the subframe
|
||||||
std::memcpy(&subframe[word_index * GPS_WORD_LENGTH], &GPS_frame_4bytes, sizeof(uint32_t));
|
std::memcpy(&subframe[word_index * GPS_WORD_LENGTH], &GPS_frame_4bytes, sizeof(uint32_t));
|
||||||
@ -290,7 +283,7 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
|||||||
|
|
||||||
// decode subframe
|
// decode subframe
|
||||||
// NEW GPS SUBFRAME HAS ARRIVED!
|
// NEW GPS SUBFRAME HAS ARRIVED!
|
||||||
if (CRC_ok)
|
if (subframe_synchro_confirmation)
|
||||||
{
|
{
|
||||||
int32_t subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe
|
int32_t subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe
|
||||||
if (subframe_ID > 0 and subframe_ID < 6)
|
if (subframe_ID > 0 and subframe_ID < 6)
|
||||||
@ -329,21 +322,28 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
return subframe_synchro_confirmation;
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_telemetry_decoder_gs::reset()
|
void gps_l1_ca_telemetry_decoder_gs::reset()
|
||||||
{
|
{
|
||||||
|
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||||
d_last_valid_preamble = d_sample_counter;
|
d_last_valid_preamble = d_sample_counter;
|
||||||
d_sent_tlm_failed_msg = false;
|
d_sent_tlm_failed_msg = false;
|
||||||
|
flag_TOW_set = false;
|
||||||
|
d_symbol_history.clear();
|
||||||
|
d_stat = 0;
|
||||||
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,6 +400,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
DLOG(INFO) << "Preamble detection for GPS L1 satellite " << this->d_satellite;
|
DLOG(INFO) << "Preamble detection for GPS L1 satellite " << this->d_satellite;
|
||||||
d_stat = 1; // enter into frame pre-detection status
|
d_stat = 1; // enter into frame pre-detection status
|
||||||
}
|
}
|
||||||
|
flag_TOW_set = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: // possible preamble lock
|
case 1: // possible preamble lock
|
||||||
@ -438,6 +439,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
if (preamble_diff > d_preamble_period_symbols)
|
if (preamble_diff > d_preamble_period_symbols)
|
||||||
{
|
{
|
||||||
d_stat = 0; // start again
|
d_stat = 0; // start again
|
||||||
|
flag_TOW_set = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -486,9 +488,16 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
// 2. Add the telemetry decoder information
|
// 2. Add the telemetry decoder information
|
||||||
if (d_flag_preamble == true)
|
if (d_flag_preamble == true)
|
||||||
{
|
{
|
||||||
d_TOW_at_current_symbol_ms = static_cast<uint32_t>(d_nav.d_TOW * 1000.0);
|
if (!d_nav.d_TOW == 0)
|
||||||
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_nav.d_TOW * 1000.0);
|
{
|
||||||
flag_TOW_set = true;
|
d_TOW_at_current_symbol_ms = static_cast<uint32_t>(d_nav.d_TOW * 1000.0);
|
||||||
|
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_nav.d_TOW * 1000.0);
|
||||||
|
flag_TOW_set = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DLOG(INFO) << "Received GPS L1 TOW equal to zero at sat " << d_nav.i_satellite_PRN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user