mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 19:29:17 +00:00
Merge branch 'next' of github.com:gnss-sdr/gnss-sdr into pps_lime
This commit is contained in:
commit
8734a9f5c1
@ -7226,6 +7226,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
signal_ = "E6";
|
||||
const std::size_t found_E6 = galileo_bands.find(signal_);
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
line += satelliteSystem.find("Galileo")->second;
|
||||
line += std::string(2, ' ');
|
||||
@ -7279,6 +7285,22 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
line += observationCode["GALILEO_E5b_IQ"];
|
||||
}
|
||||
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["PSEUDORANGE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["CARRIER_PHASE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["DOPPLER"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
}
|
||||
|
||||
line += std::string(60 - line.size(), ' ');
|
||||
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -8441,6 +8463,13 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
signal_ = "E6";
|
||||
const std::size_t found_E6 = galileo_bands.find(signal_);
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
line += satelliteSystem.find("Galileo")->second;
|
||||
line += std::string(2, ' ');
|
||||
line += Rinex_Printer::rightJustify(std::to_string(number_of_observations_gal), 3);
|
||||
@ -8489,6 +8518,21 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E5b_IQ"];
|
||||
}
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["PSEUDORANGE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["CARRIER_PHASE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["DOPPLER"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
}
|
||||
line += std::string(60 - line.size(), ' ');
|
||||
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -8766,6 +8810,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
signal_ = "E6";
|
||||
const std::size_t found_E6 = galileo_bands.find(signal_);
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
line += satelliteSystem.find("Galileo")->second;
|
||||
line += std::string(2, ' ');
|
||||
line += Rinex_Printer::rightJustify(std::to_string(number_of_observations_gal), 3);
|
||||
@ -8814,6 +8864,22 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E5b_IQ"];
|
||||
}
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["PSEUDORANGE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["CARRIER_PHASE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["DOPPLER"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
}
|
||||
|
||||
line += std::string(60 - line.size(), ' ');
|
||||
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -9348,7 +9414,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
line.clear();
|
||||
signal_ = "7X";
|
||||
const std::size_t found_7X = galileo_bands.find(signal_);
|
||||
if (found_7X != std::string::npos)
|
||||
@ -9356,6 +9421,14 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
signal_ = "E6";
|
||||
const std::size_t found_E6 = galileo_bands.find(signal_);
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
number_of_observations_gal = number_of_observations_gal + 4;
|
||||
}
|
||||
|
||||
line.clear();
|
||||
line += satelliteSystem.find("Galileo")->second;
|
||||
line += std::string(2, ' ');
|
||||
line += Rinex_Printer::rightJustify(std::to_string(number_of_observations_gal), 3);
|
||||
@ -9408,6 +9481,22 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
line += observationCode["GALILEO_E5b_IQ"];
|
||||
}
|
||||
|
||||
if (found_E6 != std::string::npos)
|
||||
{
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["PSEUDORANGE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["CARRIER_PHASE"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["DOPPLER"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
line += std::string(1, ' ');
|
||||
line += observationType["SIGNAL_STRENGTH"];
|
||||
line += observationCode["GALILEO_E56_B"];
|
||||
}
|
||||
|
||||
line += std::string(60 - line.size(), ' ');
|
||||
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
|
@ -3994,6 +3994,8 @@ std::map<std::string, int> Rtcm::galileo_signal_map = [] {
|
||||
galileo_signal_map_["5I"] = 22;
|
||||
galileo_signal_map_["5Q"] = 23;
|
||||
galileo_signal_map_["5X"] = 24;
|
||||
|
||||
galileo_signal_map_["E6"] = 10;
|
||||
return galileo_signal_map_;
|
||||
}();
|
||||
|
||||
|
@ -781,7 +781,7 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
Print_Rtcm_MT1019(gps_eph_iter.second);
|
||||
}
|
||||
}
|
||||
if (flag_write_RTCM_1045_output == true)
|
||||
if (rtcm_MT1045_rate_ms != 0)
|
||||
{
|
||||
for (const auto& gal_eph_iter : pvt_solver->galileo_ephemeris_map)
|
||||
{
|
||||
@ -790,29 +790,18 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
}
|
||||
if (flag_write_RTCM_MSM_output == true)
|
||||
{
|
||||
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
|
||||
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
|
||||
int gps_channel = 0;
|
||||
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
|
||||
int gal_channel = 0;
|
||||
int gps_channel = 0;
|
||||
for (const auto& gnss_observables_iter : gnss_observables_map)
|
||||
{
|
||||
const std::string system(gnss_observables_iter.second.System, 1);
|
||||
if (gps_channel == 0)
|
||||
{
|
||||
if (system == "G")
|
||||
{
|
||||
// This is a channel with valid GPS signal
|
||||
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
gps_channel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gal_channel == 0)
|
||||
{
|
||||
if (system == "E")
|
||||
{
|
||||
// This is a channel with valid GPS signal
|
||||
gal_eph_iter = pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
|
||||
{
|
||||
@ -820,6 +809,17 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gps_channel == 0)
|
||||
{
|
||||
if (system == "G")
|
||||
{
|
||||
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
gps_channel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
@ -1421,27 +1421,16 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
{
|
||||
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
|
||||
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
|
||||
int gps_channel = 0;
|
||||
int gal_channel = 0;
|
||||
int gps_channel = 0;
|
||||
for (const auto& gnss_observables_iter : gnss_observables_map)
|
||||
{
|
||||
const std::string system(gnss_observables_iter.second.System, 1);
|
||||
if (gps_channel == 0)
|
||||
{
|
||||
if (system == "G")
|
||||
{
|
||||
// This is a channel with valid GPS signal
|
||||
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
gps_channel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gal_channel == 0)
|
||||
{
|
||||
if (system == "E")
|
||||
{
|
||||
// This is a channel with valid GPS signal
|
||||
gal_eph_iter = pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
|
||||
{
|
||||
@ -1449,6 +1438,17 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gps_channel == 0)
|
||||
{
|
||||
if (system == "G")
|
||||
{
|
||||
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
gps_channel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
@ -1471,10 +1471,8 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
}
|
||||
if (rtcm_MSM_rate_ms != 0)
|
||||
{
|
||||
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
|
||||
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
|
||||
int gps_channel = 0;
|
||||
int gal_channel = 0;
|
||||
for (const auto& gnss_observables_iter : gnss_observables_map)
|
||||
{
|
||||
const std::string system(gnss_observables_iter.second.System, 1);
|
||||
@ -1490,26 +1488,11 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gal_channel == 0)
|
||||
{
|
||||
if (system == "E")
|
||||
{
|
||||
gal_eph_iter = pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
|
||||
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
|
||||
{
|
||||
gal_channel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
|
||||
{
|
||||
Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
|
||||
}
|
||||
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
|
||||
{
|
||||
Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
|
||||
}
|
||||
}
|
||||
d_rtcm_writing_started = true;
|
||||
break;
|
||||
|
@ -55,6 +55,7 @@ endif()
|
||||
|
||||
set_property(TARGET acquisition_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${GNSSSDR_SOURCE_DIR}/src/core/interfaces>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_string_literals.h"
|
||||
#include <glog/logging.h>
|
||||
#include <vector>
|
||||
|
||||
using namespace std::string_literals;
|
||||
|
||||
@ -39,18 +38,23 @@ ZmqSignalSource::ZmqSignalSource(const ConfigurationInterface* configuration,
|
||||
|
||||
auto property = role + ".endpoint"s;
|
||||
auto endpoint = configuration->property(property, ""s);
|
||||
std::vector<char> address(endpoint.c_str(), endpoint.c_str() + endpoint.size() + 1);
|
||||
|
||||
if (!endpoint.empty())
|
||||
{
|
||||
LOG(INFO) << "Connecting to ZMQ pub at " << endpoint;
|
||||
d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, address.data(), timeout_ms, pass_tags, hwm);
|
||||
// work around gnuradio interface deficiency
|
||||
d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, const_cast<char*>(endpoint.data()), timeout_ms, pass_tags, hwm);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "For ZMQ_Signal_Source " << property << " must be defined" << std::endl;
|
||||
throw std::invalid_argument(property + ": undefined");
|
||||
}
|
||||
|
||||
if (vlen > 1)
|
||||
{
|
||||
d_vec_block = gr::blocks::vector_to_stream::make(item_size(), vlen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -59,10 +63,14 @@ auto ZmqSignalSource::item_size() -> size_t { return d_item_size; }
|
||||
|
||||
auto ZmqSignalSource::connect(gr::top_block_sptr top_block) -> void
|
||||
{
|
||||
if (d_vec_block)
|
||||
{
|
||||
top_block->connect(d_source_block, 0, d_vec_block, 0);
|
||||
}
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_sink = gr::blocks::file_sink::make(item_size(), d_dump_filename.data());
|
||||
top_block->connect(d_source_block, 0, d_dump_sink, 0);
|
||||
top_block->connect(get_right_block(), 0, d_dump_sink, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,10 +81,22 @@ auto ZmqSignalSource::disconnect(gr::top_block_sptr top_block) -> void
|
||||
{
|
||||
top_block->disconnect(d_dump_sink);
|
||||
}
|
||||
|
||||
if (d_vec_block)
|
||||
{
|
||||
top_block->disconnect(d_vec_block);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
auto ZmqSignalSource::get_right_block() -> gr::basic_block_sptr
|
||||
{
|
||||
return d_source_block;
|
||||
auto result = gr::basic_block_sptr();
|
||||
|
||||
if (d_vec_block)
|
||||
result = d_vec_block; // NOLINT
|
||||
else
|
||||
result = d_source_block; // NOLINT
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
//
|
||||
#include "concurrent_queue.h"
|
||||
#include <gnuradio/blocks/file_sink.h> // for dump
|
||||
#include <gnuradio/blocks/vector_to_stream.h>
|
||||
#include <gnuradio/zeromq/sub_source.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
@ -66,6 +67,7 @@ public:
|
||||
|
||||
private:
|
||||
gr::zeromq::sub_source::sptr d_source_block;
|
||||
gr::blocks::vector_to_stream::sptr d_vec_block;
|
||||
gr::blocks::file_sink::sptr d_dump_sink;
|
||||
|
||||
size_t d_item_size;
|
||||
|
Loading…
Reference in New Issue
Block a user