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
620a74f150
@ -469,15 +469,6 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Check for availability of SSE
|
|
||||||
################################################################################
|
|
||||||
if(NOT ENABLE_GENERIC_ARCH)
|
|
||||||
include(TestForSSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Find the POSIX thread (pthread) libraries
|
# Find the POSIX thread (pthread) libraries
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -1866,12 +1857,6 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
|||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
if(OS_IS_MACOSX)
|
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -stdlib=libc++")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Processor-architecture related flags
|
# Processor-architecture related flags
|
||||||
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||||
if(NOT ARCH_COMPILER_FLAGS)
|
if(NOT ARCH_COMPILER_FLAGS)
|
||||||
|
@ -802,5 +802,5 @@ gr::basic_block_sptr RtklibPvt::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr RtklibPvt::get_right_block()
|
gr::basic_block_sptr RtklibPvt::get_right_block()
|
||||||
{
|
{
|
||||||
return pvt_; // this is a sink, nothing downstream
|
return nullptr; // this is a sink, nothing downstream
|
||||||
}
|
}
|
||||||
|
@ -562,8 +562,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
xml_base_path = xml_base_path + boost::filesystem::path::preferred_separator;
|
xml_base_path = xml_base_path + boost::filesystem::path::preferred_separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_pvt_solver = std::make_shared<rtklib_solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
|
||||||
d_pvt_solver->set_averaging_depth(1);
|
|
||||||
|
|
||||||
d_rx_time = 0.0;
|
d_rx_time = 0.0;
|
||||||
|
|
||||||
@ -580,7 +578,10 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
|
|
||||||
udp_sink_ptr = std::unique_ptr<Monitor_Pvt_Udp_Sink>(new Monitor_Pvt_Udp_Sink(udp_addr_vec, conf_.udp_port));
|
udp_sink_ptr = std::unique_ptr<Monitor_Pvt_Udp_Sink>(new Monitor_Pvt_Udp_Sink(udp_addr_vec, conf_.udp_port));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
udp_sink_ptr = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// Create Sys V message queue
|
// Create Sys V message queue
|
||||||
first_fix = true;
|
first_fix = true;
|
||||||
@ -591,6 +592,9 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d_pvt_solver = std::make_shared<rtklib_solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||||
|
d_pvt_solver->set_averaging_depth(1);
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1210,14 +1214,28 @@ bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim)
|
||||||
|
{
|
||||||
|
std::vector<std::string> v;
|
||||||
|
std::stringstream ss(s);
|
||||||
|
std::string item;
|
||||||
|
|
||||||
|
while (std::getline(ss, item, delim))
|
||||||
|
{
|
||||||
|
*(std::back_inserter(v)++) = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
||||||
double* latitude_deg,
|
double* latitude_deg,
|
||||||
double* height_m,
|
double* height_m,
|
||||||
double* ground_speed_kmh,
|
double* ground_speed_kmh,
|
||||||
double* course_over_ground_deg,
|
double* course_over_ground_deg,
|
||||||
time_t* UTC_time)
|
time_t* UTC_time) const
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock lock(d_setlock);
|
|
||||||
if (d_pvt_solver->is_valid_position())
|
if (d_pvt_solver->is_valid_position())
|
||||||
{
|
{
|
||||||
*latitude_deg = d_pvt_solver->get_latitude();
|
*latitude_deg = d_pvt_solver->get_latitude();
|
||||||
@ -1225,7 +1243,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
|||||||
*height_m = d_pvt_solver->get_height();
|
*height_m = d_pvt_solver->get_height();
|
||||||
*ground_speed_kmh = d_pvt_solver->get_speed_over_ground() * 3600.0 / 1000.0;
|
*ground_speed_kmh = d_pvt_solver->get_speed_over_ground() * 3600.0 / 1000.0;
|
||||||
*course_over_ground_deg = d_pvt_solver->get_course_over_ground();
|
*course_over_ground_deg = d_pvt_solver->get_course_over_ground();
|
||||||
*UTC_time = to_time_t(d_pvt_solver->get_position_UTC_time());
|
*UTC_time = convert_to_time_t(d_pvt_solver->get_position_UTC_time());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1237,8 +1255,6 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
|||||||
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
gr_vector_void_star& output_items __attribute__((unused)))
|
||||||
{
|
{
|
||||||
gr::thread::scoped_lock l(d_setlock);
|
|
||||||
|
|
||||||
for (int32_t epoch = 0; epoch < noutput_items; epoch++)
|
for (int32_t epoch = 0; epoch < noutput_items; epoch++)
|
||||||
{
|
{
|
||||||
bool flag_display_pvt = false;
|
bool flag_display_pvt = false;
|
||||||
@ -3284,17 +3300,3 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
|
|
||||||
return noutput_items;
|
return noutput_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim)
|
|
||||||
{
|
|
||||||
std::vector<std::string> v;
|
|
||||||
std::stringstream ss(s);
|
|
||||||
std::string item;
|
|
||||||
|
|
||||||
while (std::getline(ss, item, delim))
|
|
||||||
{
|
|
||||||
*(std::back_inserter(v)++) = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
@ -85,12 +85,12 @@ private:
|
|||||||
|
|
||||||
bool b_rtcm_writing_started;
|
bool b_rtcm_writing_started;
|
||||||
bool b_rtcm_enabled;
|
bool b_rtcm_enabled;
|
||||||
int32_t d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris
|
int32_t d_rtcm_MT1045_rate_ms; // Galileo Broadcast Ephemeris
|
||||||
int32_t d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits)
|
int32_t d_rtcm_MT1019_rate_ms; // GPS Broadcast Ephemeris (orbits)
|
||||||
int32_t d_rtcm_MT1020_rate_ms; //!< GLONASS Broadcast Ephemeris (orbits)
|
int32_t d_rtcm_MT1020_rate_ms; // GLONASS Broadcast Ephemeris (orbits)
|
||||||
int32_t d_rtcm_MT1077_rate_ms; //!< The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
int32_t d_rtcm_MT1077_rate_ms; // The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
||||||
int32_t d_rtcm_MT1087_rate_ms; //!< GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
int32_t d_rtcm_MT1087_rate_ms; // GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
||||||
int32_t d_rtcm_MT1097_rate_ms; //!< Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||||
int32_t d_rtcm_MSM_rate_ms;
|
int32_t d_rtcm_MSM_rate_ms;
|
||||||
|
|
||||||
int32_t d_last_status_print_seg; // for status printer
|
int32_t d_last_status_print_seg; // for status printer
|
||||||
@ -139,7 +139,7 @@ private:
|
|||||||
bool d_xml_storage;
|
bool d_xml_storage;
|
||||||
std::string xml_base_path;
|
std::string xml_base_path;
|
||||||
|
|
||||||
inline std::time_t to_time_t(boost::posix_time::ptime pt)
|
inline std::time_t convert_to_time_t(const boost::posix_time::ptime pt) const
|
||||||
{
|
{
|
||||||
return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
|
return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
|
||||||
}
|
}
|
||||||
@ -153,8 +153,10 @@ public:
|
|||||||
const Pvt_Conf& conf_,
|
const Pvt_Conf& conf_,
|
||||||
const rtk_t& rtk);
|
const rtk_t& rtk);
|
||||||
|
|
||||||
|
~rtklib_pvt_cc(); //!< Default destructor
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get latest set of ephemeris from PVT block
|
* \brief Get latest set of GPS ephemeris from PVT block
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
||||||
@ -183,9 +185,7 @@ public:
|
|||||||
double* height_m,
|
double* height_m,
|
||||||
double* ground_speed_kmh,
|
double* ground_speed_kmh,
|
||||||
double* course_over_ground_deg,
|
double* course_over_ground_deg,
|
||||||
time_t* UTC_time);
|
time_t* UTC_time) const;
|
||||||
|
|
||||||
~rtklib_pvt_cc(); //!< Default destructor
|
|
||||||
|
|
||||||
int work(int noutput_items, gr_vector_const_void_star& input_items,
|
int work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items); //!< PVT Signal Processing
|
gr_vector_void_star& output_items); //!< PVT Signal Processing
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
const unsigned int PVT_MAX_CHANNELS = 90;
|
|
||||||
const unsigned int PVT_MAX_PRN = 127; // 126 is SBAS
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Base class for a PVT solution
|
* \brief Base class for a PVT solution
|
||||||
|
@ -221,7 +221,9 @@ const int NSATQZS = 0;
|
|||||||
const int NSYSQZS = 0;
|
const int NSYSQZS = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
#define ENABDS
|
#define ENABDS
|
||||||
|
#endif
|
||||||
#ifdef ENABDS
|
#ifdef ENABDS
|
||||||
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
||||||
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou
|
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou
|
||||||
|
@ -43,25 +43,25 @@ using google::LogMessage;
|
|||||||
|
|
||||||
|
|
||||||
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
||||||
int output_rate_ms,
|
int decimation_factor,
|
||||||
int udp_port,
|
int udp_port,
|
||||||
const std::vector<std::string>& udp_addresses)
|
const std::vector<std::string>& udp_addresses)
|
||||||
{
|
{
|
||||||
return gnss_synchro_monitor_sptr(new gnss_synchro_monitor(n_channels,
|
return gnss_synchro_monitor_sptr(new gnss_synchro_monitor(n_channels,
|
||||||
output_rate_ms,
|
decimation_factor,
|
||||||
udp_port,
|
udp_port,
|
||||||
udp_addresses));
|
udp_addresses));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gnss_synchro_monitor::gnss_synchro_monitor(unsigned int n_channels,
|
gnss_synchro_monitor::gnss_synchro_monitor(unsigned int n_channels,
|
||||||
int output_rate_ms,
|
int decimation_factor,
|
||||||
int udp_port,
|
int udp_port,
|
||||||
const std::vector<std::string>& udp_addresses) : gr::sync_block("gnss_synchro_monitor",
|
const std::vector<std::string>& udp_addresses) : gr::sync_block("gnss_synchro_monitor",
|
||||||
gr::io_signature::make(n_channels, n_channels, sizeof(Gnss_Synchro)),
|
gr::io_signature::make(n_channels, n_channels, sizeof(Gnss_Synchro)),
|
||||||
gr::io_signature::make(0, 0, 0))
|
gr::io_signature::make(0, 0, 0))
|
||||||
{
|
{
|
||||||
d_output_rate_ms = output_rate_ms;
|
d_decimation_factor = decimation_factor;
|
||||||
d_nchannels = n_channels;
|
d_nchannels = n_channels;
|
||||||
|
|
||||||
udp_sink_ptr = std::unique_ptr<Gnss_Synchro_Udp_Sink>(new Gnss_Synchro_Udp_Sink(udp_addresses, udp_port));
|
udp_sink_ptr = std::unique_ptr<Gnss_Synchro_Udp_Sink>(new Gnss_Synchro_Udp_Sink(udp_addresses, udp_port));
|
||||||
@ -80,7 +80,7 @@ int gnss_synchro_monitor::work(int noutput_items, gr_vector_const_void_star& inp
|
|||||||
for (int epoch = 0; epoch < noutput_items; epoch++)
|
for (int epoch = 0; epoch < noutput_items; epoch++)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
if (count >= d_output_rate_ms)
|
if (count >= d_decimation_factor)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ class gnss_synchro_monitor;
|
|||||||
using gnss_synchro_monitor_sptr = boost::shared_ptr<gnss_synchro_monitor>;
|
using gnss_synchro_monitor_sptr = boost::shared_ptr<gnss_synchro_monitor>;
|
||||||
|
|
||||||
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
||||||
int output_rate_ms,
|
int decimation_factor,
|
||||||
int udp_port,
|
int udp_port,
|
||||||
const std::vector<std::string>& udp_addresses);
|
const std::vector<std::string>& udp_addresses);
|
||||||
|
|
||||||
@ -57,13 +57,13 @@ class gnss_synchro_monitor : public gr::sync_block
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int nchannels,
|
friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int nchannels,
|
||||||
int output_rate_ms,
|
int decimation_factor,
|
||||||
int udp_port,
|
int udp_port,
|
||||||
const std::vector<std::string>& udp_addresses);
|
const std::vector<std::string>& udp_addresses);
|
||||||
|
|
||||||
unsigned int d_nchannels;
|
unsigned int d_nchannels;
|
||||||
|
|
||||||
int d_output_rate_ms;
|
int d_decimation_factor;
|
||||||
|
|
||||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
gnss_synchro_monitor(unsigned int nchannels,
|
gnss_synchro_monitor(unsigned int nchannels,
|
||||||
int output_rate_ms,
|
int decimation_factor,
|
||||||
int udp_port,
|
int udp_port,
|
||||||
const std::vector<std::string>& udp_addresses);
|
const std::vector<std::string>& udp_addresses);
|
||||||
|
|
||||||
|
@ -293,7 +293,11 @@ int ControlThread::run()
|
|||||||
}
|
}
|
||||||
catch (const boost::thread_interrupted &interrupt)
|
catch (const boost::thread_interrupted &interrupt)
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "Thread interrupted";
|
DLOG(WARNING) << "Thread interrupted";
|
||||||
|
}
|
||||||
|
catch (const boost::system::system_error &e)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "System error";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restart_)
|
if (restart_)
|
||||||
|
@ -1538,7 +1538,7 @@ void GNSSFlowgraph::init()
|
|||||||
if (enable_monitor_)
|
if (enable_monitor_)
|
||||||
{
|
{
|
||||||
GnssSynchroMonitor_ = gr::basic_block_sptr(new gnss_synchro_monitor(channels_count_,
|
GnssSynchroMonitor_ = gr::basic_block_sptr(new gnss_synchro_monitor(channels_count_,
|
||||||
configuration_->property("Monitor.output_rate_ms", 1),
|
configuration_->property("Monitor.decimation_factor", 1),
|
||||||
configuration_->property("Monitor.udp_port", 1234),
|
configuration_->property("Monitor.udp_port", 1234),
|
||||||
udp_addr_vec));
|
udp_addr_vec));
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||||
set(DEBUG_PREFIX "Debug/")
|
set(DEBUG_PREFIX "Debug/")
|
||||||
|
set(DEBUG_POSTFIX "d")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -167,12 +168,6 @@ if(OPENSSL_FOUND)
|
|||||||
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
if(OS_IS_MACOSX)
|
|
||||||
set(CLANG_FLAGS "-stdlib=libc++ -lc++")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
||||||
endif()
|
endif()
|
||||||
@ -350,7 +345,6 @@ if(ENABLE_UNIT_TESTING)
|
|||||||
|
|
||||||
target_link_libraries(run_tests
|
target_link_libraries(run_tests
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CLANG_FLAGS}
|
|
||||||
Boost::chrono
|
Boost::chrono
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
Boost::system
|
Boost::system
|
||||||
|
Loading…
Reference in New Issue
Block a user