mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +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."
|
||||
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_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)
|
||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
@ -1811,6 +1828,20 @@ if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
|
||||
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}"
|
||||
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()
|
||||
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
|
||||
find_program(PROTOC_EXECUTABLE protoc
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
||||
|
||||
@ -218,8 +219,9 @@ public:
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class galileo_pcps_8ms_acquisition_cc;
|
||||
|
||||
@ -182,14 +183,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class Gnss_Synchro;
|
||||
class pcps_acquisition;
|
||||
@ -209,13 +210,12 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
d_channel_fsm = std::move(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class pcps_acquisition_fine_doppler_cc;
|
||||
|
||||
@ -185,14 +186,14 @@ public:
|
||||
d_dump_channel = d_channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class pcps_assisted_acquisition_cc;
|
||||
|
||||
@ -195,13 +196,12 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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 <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
||||
class pcps_cccwsr_acquisition_cc;
|
||||
@ -182,14 +183,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class pcps_quicksync_acquisition_cc;
|
||||
|
||||
@ -215,14 +216,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
||||
class pcps_tong_acquisition_cc;
|
||||
@ -198,14 +199,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
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.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -218,8 +218,6 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
||||
uint32_t GPS_frame_4bytes = 0;
|
||||
float symbol_accumulator = 0;
|
||||
bool subframe_synchro_confirmation = false;
|
||||
bool CRC_ok = true;
|
||||
|
||||
for (float subframe_symbol : d_symbol_history)
|
||||
{
|
||||
// ******* SYMBOL TO BIT *******
|
||||
@ -269,11 +267,6 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
||||
{
|
||||
subframe_synchro_confirmation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// std::cout << "word invalid sat " << this->d_satellite << std::endl;
|
||||
CRC_ok = false;
|
||||
}
|
||||
// add word to 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));
|
||||
@ -290,7 +283,7 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
||||
|
||||
// decode subframe
|
||||
// NEW GPS SUBFRAME HAS ARRIVED!
|
||||
if (CRC_ok)
|
||||
if (subframe_synchro_confirmation)
|
||||
{
|
||||
int32_t subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe
|
||||
if (subframe_ID > 0 and subframe_ID < 6)
|
||||
@ -329,21 +322,28 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return subframe_synchro_confirmation;
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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_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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
d_stat = 1; // enter into frame pre-detection status
|
||||
}
|
||||
flag_TOW_set = false;
|
||||
break;
|
||||
}
|
||||
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)
|
||||
{
|
||||
d_stat = 0; // start again
|
||||
flag_TOW_set = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -485,11 +487,18 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
||||
|
||||
// 2. Add the telemetry decoder information
|
||||
if (d_flag_preamble == true)
|
||||
{
|
||||
if (!d_nav.d_TOW == 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
if (flag_TOW_set == true)
|
||||
|
Loading…
Reference in New Issue
Block a user