mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-30 09:27:58 +00:00
Merge branch 'MathieuFavreau-remove_receiver_type' into next
This commit is contained in:
@@ -31,6 +31,9 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||
implementations, greatly improving maintainability, simplifying the addition
|
||||
of new signals, and eliminating a lot of duplicated code. Awesome contribution
|
||||
by @MathieuFavreau.
|
||||
- Refactored the internal handling of multi-signal configurations in the PVT
|
||||
block for improved maintainability and extensibility. Another excellent
|
||||
contribution by @MathieuFavreau.
|
||||
|
||||
### Improvements in Portability:
|
||||
|
||||
|
@@ -25,8 +25,8 @@
|
||||
#include "gps_almanac.h" // for Gps_Almanac
|
||||
#include "gps_ephemeris.h" // for Gps_Ephemeris
|
||||
#include "pvt_conf.h" // for Pvt_Conf
|
||||
#include "receiver_type.h" // for get_type_of_receiver
|
||||
#include "rtklib_rtkpos.h" // for rtkfree, rtkinit
|
||||
#include "signal_enabled_flags.h" // for signal_enabled_flags
|
||||
#include <iostream> // for std::cout
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
@@ -191,7 +191,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
|
||||
pvt_output_parameters.an_rate_ms = configuration->property(role + ".an_rate_ms", pvt_output_parameters.an_rate_ms);
|
||||
|
||||
const Signal_Enabled_Flags signal_enabled_flags(configuration);
|
||||
pvt_output_parameters.type_of_receiver = get_type_of_receiver(signal_enabled_flags);
|
||||
pvt_output_parameters.signal_enabled_flags = signal_enabled_flags.flags;
|
||||
|
||||
// RTKLIB PVT solver options
|
||||
// Settings 1
|
||||
|
@@ -58,6 +58,7 @@
|
||||
#include "rtcm_printer.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_solver.h"
|
||||
#include "signal_enabled_flags.h"
|
||||
#include "trackingcmd.h"
|
||||
#include <boost/archive/xml_iarchive.hpp> // for xml_iarchive
|
||||
#include <boost/archive/xml_oarchive.hpp> // for xml_oarchive
|
||||
@@ -169,7 +170,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
d_report_rate_ms(1000),
|
||||
d_max_obs_block_rx_clock_offset_ms(conf_.max_obs_block_rx_clock_offset_ms),
|
||||
d_nchannels(nchannels),
|
||||
d_type_of_rx(conf_.type_of_receiver),
|
||||
d_signal_enabled_flags(conf_.signal_enabled_flags),
|
||||
d_observable_interval_ms(conf_.observable_interval_ms),
|
||||
d_pvt_errors_counter(0),
|
||||
d_dump(conf_.dump),
|
||||
@@ -455,8 +456,10 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
d_xml_base_path = d_xml_base_path + fs::path::preferred_separator;
|
||||
}
|
||||
|
||||
const Signal_Enabled_Flags signal_enabled_flags(d_signal_enabled_flags);
|
||||
|
||||
// Initialize HAS simple printer
|
||||
d_enable_has_messages = (((d_type_of_rx >= 100) && (d_type_of_rx < 109)) && (conf_.output_enabled));
|
||||
d_enable_has_messages = (signal_enabled_flags.check_any_enabled(GAL_E6) && (conf_.output_enabled));
|
||||
if (d_enable_has_messages)
|
||||
{
|
||||
d_has_simple_printer = std::make_unique<Has_Simple_Printer>(conf_.has_output_file_path);
|
||||
@@ -573,19 +576,19 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
{
|
||||
// setup two PVT solvers: internal solver for rx clock and user solver
|
||||
// user PVT solver
|
||||
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
|
||||
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_signal_enabled_flags, d_dump, d_dump_mat);
|
||||
d_user_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
|
||||
// internal PVT solver, mainly used to estimate the receiver clock
|
||||
rtk_t internal_rtk = rtk;
|
||||
internal_rtk.opt.mode = PMODE_SINGLE; // use single positioning mode in internal PVT solver
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, false, false);
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, conf_, dump_ls_pvt_filename, d_signal_enabled_flags, false, false);
|
||||
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
// only one solver, customized by the user options
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_signal_enabled_flags, d_dump, d_dump_mat);
|
||||
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
d_user_pvt_solver = d_internal_pvt_solver;
|
||||
}
|
||||
@@ -1232,7 +1235,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// New record!
|
||||
std::map<int32_t, Gps_Ephemeris> new_eph;
|
||||
new_eph[gps_eph->PRN] = *gps_eph;
|
||||
d_rp->log_rinex_nav_gps_nav(d_type_of_rx, new_eph);
|
||||
d_rp->log_rinex_nav_gps_nav(d_signal_enabled_flags, new_eph);
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->gps_ephemeris_map[gps_eph->PRN] = *gps_eph;
|
||||
@@ -1300,7 +1303,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// New record!
|
||||
std::map<int32_t, Gps_CNAV_Ephemeris> new_cnav_eph;
|
||||
new_cnav_eph[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris;
|
||||
d_rp->log_rinex_nav_gps_cnav(d_type_of_rx, new_cnav_eph);
|
||||
d_rp->log_rinex_nav_gps_cnav(d_signal_enabled_flags, new_cnav_eph);
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris;
|
||||
@@ -1392,7 +1395,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// New record!
|
||||
std::map<int32_t, Galileo_Ephemeris> new_gal_eph;
|
||||
new_gal_eph[galileo_eph->PRN] = *galileo_eph;
|
||||
d_rp->log_rinex_nav_gal_nav(d_type_of_rx, new_gal_eph);
|
||||
d_rp->log_rinex_nav_gal_nav(d_signal_enabled_flags, new_gal_eph);
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN] = *galileo_eph;
|
||||
@@ -1515,7 +1518,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// New record!
|
||||
std::map<int32_t, Glonass_Gnav_Ephemeris> new_glo_eph;
|
||||
new_glo_eph[glonass_gnav_eph->PRN] = *glonass_gnav_eph;
|
||||
d_rp->log_rinex_nav_glo_gnav(d_type_of_rx, new_glo_eph);
|
||||
d_rp->log_rinex_nav_glo_gnav(d_signal_enabled_flags, new_glo_eph);
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN] = *glonass_gnav_eph;
|
||||
@@ -1578,7 +1581,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// New record!
|
||||
std::map<int32_t, Beidou_Dnav_Ephemeris> new_bds_eph;
|
||||
new_bds_eph[bds_dnav_eph->PRN] = *bds_dnav_eph;
|
||||
d_rp->log_rinex_nav_bds_dnav(d_type_of_rx, new_bds_eph);
|
||||
d_rp->log_rinex_nav_bds_dnav(d_signal_enabled_flags, new_bds_eph);
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN] = *bds_dnav_eph;
|
||||
@@ -2346,6 +2349,16 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// save_gnss_synchro_map_xml("./gnss_synchro_map.xml");
|
||||
// getchar(); // stop the execution
|
||||
// end debug
|
||||
|
||||
// allows deactivating messages by setting rate = 0
|
||||
const bool rtcm_MT1019_enabled = d_rtcm_MT1019_rate_ms != 0;
|
||||
const bool rtcm_MT1020_enabled = d_rtcm_MT1020_rate_ms != 0;
|
||||
const bool rtcm_MT1045_enabled = d_rtcm_MT1045_rate_ms != 0;
|
||||
const bool rtcm_MT1077_enabled = d_rtcm_MT1077_rate_ms != 0;
|
||||
const bool rtcm_MT1087_enabled = d_rtcm_MT1087_rate_ms != 0;
|
||||
const bool rtcm_MT1097_enabled = d_rtcm_MT1097_rate_ms != 0;
|
||||
const bool rtcm_MSM_enabled = d_rtcm_MSM_rate_ms != 0;
|
||||
|
||||
if (d_display_rate_ms != 0)
|
||||
{
|
||||
if (current_RX_time_ms % d_display_rate_ms == 0)
|
||||
@@ -2353,27 +2366,28 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
flag_display_pvt = true;
|
||||
}
|
||||
}
|
||||
if (d_rtcm_MT1019_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
||||
if (rtcm_MT1019_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_rtcm_MT1019_rate_ms == 0)
|
||||
{
|
||||
flag_write_RTCM_1019_output = true;
|
||||
}
|
||||
}
|
||||
if (d_rtcm_MT1020_rate_ms != 0) // allows deactivating messages by setting rate = 0
|
||||
if (rtcm_MT1020_enabled) // allows deactivating messages by setting rate = 0
|
||||
{
|
||||
if (current_RX_time_ms % d_rtcm_MT1020_rate_ms == 0)
|
||||
{
|
||||
flag_write_RTCM_1020_output = true;
|
||||
}
|
||||
}
|
||||
if (d_rtcm_MT1045_rate_ms != 0)
|
||||
if (rtcm_MT1045_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_rtcm_MT1045_rate_ms == 0)
|
||||
{
|
||||
flag_write_RTCM_1045_output = true;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: RTCM 1077, 1087 and 1097 are not used, so, disable the output rates
|
||||
// if (current_RX_time_ms % d_rtcm_MT1077_rate_ms==0 && d_rtcm_MT1077_rate_ms != 0)
|
||||
// {
|
||||
@@ -2387,7 +2401,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// {
|
||||
// last_RTCM_1097_output_time = current_RX_time;
|
||||
// }
|
||||
if (d_rtcm_MSM_rate_ms != 0)
|
||||
|
||||
if (rtcm_MSM_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_rtcm_MSM_rate_ms == 0)
|
||||
{
|
||||
@@ -2451,20 +2466,21 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
if (d_rinex_output_enabled)
|
||||
{
|
||||
d_rp->print_rinex_annotation(d_user_pvt_solver.get(), d_gnss_observables_map, d_rx_time, d_type_of_rx, flag_write_RINEX_obs_output);
|
||||
d_rp->print_rinex_annotation(d_user_pvt_solver.get(), d_gnss_observables_map, d_rx_time, d_signal_enabled_flags, flag_write_RINEX_obs_output);
|
||||
}
|
||||
if (d_rtcm_enabled)
|
||||
{
|
||||
d_rtcm_printer->Print_Rtcm_Messages(d_user_pvt_solver.get(),
|
||||
d_gnss_observables_map,
|
||||
d_rx_time,
|
||||
d_type_of_rx,
|
||||
d_rtcm_MSM_rate_ms,
|
||||
d_rtcm_MT1019_rate_ms,
|
||||
d_rtcm_MT1020_rate_ms,
|
||||
d_rtcm_MT1045_rate_ms,
|
||||
d_rtcm_MT1077_rate_ms,
|
||||
d_rtcm_MT1097_rate_ms,
|
||||
d_signal_enabled_flags,
|
||||
rtcm_MSM_enabled,
|
||||
rtcm_MT1019_enabled,
|
||||
rtcm_MT1020_enabled,
|
||||
rtcm_MT1045_enabled,
|
||||
rtcm_MT1077_enabled,
|
||||
rtcm_MT1087_enabled,
|
||||
rtcm_MT1097_enabled,
|
||||
flag_write_RTCM_MSM_output,
|
||||
flag_write_RTCM_1019_output,
|
||||
flag_write_RTCM_1020_output,
|
||||
|
@@ -262,7 +262,7 @@ private:
|
||||
int32_t d_max_obs_block_rx_clock_offset_ms;
|
||||
|
||||
uint32_t d_nchannels;
|
||||
uint32_t d_type_of_rx;
|
||||
uint32_t d_signal_enabled_flags;
|
||||
uint32_t d_observable_interval_ms;
|
||||
uint32_t d_pvt_errors_counter;
|
||||
|
||||
|
@@ -24,7 +24,7 @@ set(PVT_LIB_SOURCES
|
||||
has_simple_printer.cc
|
||||
geohash.cc
|
||||
pvt_kf.cc
|
||||
receiver_type.cc
|
||||
signal_enabled_flags.cc
|
||||
)
|
||||
|
||||
set(PVT_LIB_HEADERS
|
||||
@@ -48,7 +48,7 @@ set(PVT_LIB_HEADERS
|
||||
has_simple_printer.h
|
||||
geohash.h
|
||||
pvt_kf.h
|
||||
receiver_type.h
|
||||
signal_enabled_flags.h
|
||||
)
|
||||
|
||||
list(SORT PVT_LIB_HEADERS)
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
std::string udp_eph_addresses;
|
||||
std::string log_source_timetag_file;
|
||||
|
||||
uint32_t type_of_receiver = 0;
|
||||
uint32_t signal_enabled_flags = 0;
|
||||
uint32_t observable_interval_ms = 20;
|
||||
|
||||
int32_t output_rate_ms = 0;
|
||||
|
@@ -1,282 +0,0 @@
|
||||
/*!
|
||||
* \file receiver_type.cc
|
||||
* \brief Helper function to get the receiver type
|
||||
* \author Mathieu Favreau, 2025. favreau.mathieu(at)hotmail.com
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "receiver_type.h"
|
||||
#include "configuration_interface.h" // for ConfigurationInterface
|
||||
#include <vector> // for vector
|
||||
|
||||
Signal_Enabled_Flags::Signal_Enabled_Flags(const ConfigurationInterface* configuration) : flags_(0)
|
||||
{
|
||||
const std::vector<std::pair<uint32_t, std::string>> signal_flag_to_prop = {
|
||||
{GPS_1C, "Channels_1C.count"},
|
||||
{GPS_2S, "Channels_2S.count"},
|
||||
{GPS_L5, "Channels_L5.count"},
|
||||
{GAL_1B, "Channels_1B.count"},
|
||||
{GAL_E5a, "Channels_5X.count"},
|
||||
{GAL_E5b, "Channels_7X.count"},
|
||||
{GAL_E6, "Channels_E6.count"},
|
||||
{GLO_1G, "Channels_1G.count"},
|
||||
{GLO_2G, "Channels_2G.count"},
|
||||
{BDS_B1, "Channels_B1.count"},
|
||||
{BDS_B3, "Channels_B3.count"}};
|
||||
|
||||
#if NO_FOLD_EXPRESSIONS
|
||||
for (const auto& pair_aux : signal_flag_to_prop)
|
||||
{
|
||||
auto flag = pair_aux.first;
|
||||
auto prop = pair_aux.second;
|
||||
#else
|
||||
for (const auto& [flag, prop] : signal_flag_to_prop)
|
||||
{
|
||||
#endif
|
||||
const auto enabled = configuration->property(prop, 0) > 0;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
flags_ |= flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint32_t get_type_of_receiver(const Signal_Enabled_Flags& signal_enabled_flags)
|
||||
{
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C))
|
||||
{
|
||||
return 1; // GPS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S))
|
||||
{
|
||||
return 2; // GPS L2C
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_L5))
|
||||
{
|
||||
return 3; // L5
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B))
|
||||
{
|
||||
return 4; // E1
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E5a))
|
||||
{
|
||||
return 5; // E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E5b))
|
||||
{
|
||||
return 6; // E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GPS_2S))
|
||||
{
|
||||
return 7; // GPS L1 C/A + GPS L2C
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GPS_L5))
|
||||
{
|
||||
return 8; // L1+L5
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B))
|
||||
{
|
||||
return 9; // L1+E1
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_E5a))
|
||||
{
|
||||
return 10; // GPS L1 C/A + Galileo E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_E5b))
|
||||
{
|
||||
return 11; // GPS L1 C/A + Galileo E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GAL_1B))
|
||||
{
|
||||
return 12; // Galileo E1B + GPS L2C
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_L5, GAL_E5a))
|
||||
{
|
||||
return 13; // L5+E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GAL_E5a))
|
||||
{
|
||||
return 14; // Galileo E1B + Galileo E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GAL_E5b))
|
||||
{
|
||||
return 15; // Galileo E1B + Galileo E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GPS_L5))
|
||||
{
|
||||
return 16; // GPS L2C + GPS L5
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GAL_E5a))
|
||||
{
|
||||
return 17; // GPS L2C + Galileo E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GAL_E5b))
|
||||
{
|
||||
return 18; // GPS L2C + Galileo E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E5a, GAL_E5b))
|
||||
{
|
||||
return 19; // Galileo E5a + Galileo E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_L5, GAL_E5b))
|
||||
{
|
||||
return 20; // GPS L5 + Galileo E5b
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GPS_2S))
|
||||
{
|
||||
return 21; // GPS L1 C/A + Galileo E1B + GPS L2C
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GPS_L5))
|
||||
{
|
||||
return 22; // GPS L1 C/A + Galileo E1B + GPS L5
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GLO_1G))
|
||||
{
|
||||
return 23; // GLONASS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GLO_2G))
|
||||
{
|
||||
return 24; // GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GLO_1G, GLO_2G))
|
||||
{
|
||||
return 25; // GLONASS L1 C/A + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GLO_1G))
|
||||
{
|
||||
return 26; // GPS L1 C/A + GLONASS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GLO_1G))
|
||||
{
|
||||
return 27; // Galileo E1B + GLONASS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GLO_1G))
|
||||
{
|
||||
return 28; // GPS L2C + GLONASS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GLO_2G))
|
||||
{
|
||||
return 29; // GPS L1 C/A + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GLO_2G))
|
||||
{
|
||||
return 30; // Galileo E1B + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_2S, GLO_2G))
|
||||
{
|
||||
return 31; // GPS L2C + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GPS_L5, GAL_E5a))
|
||||
{
|
||||
return 32; // L1+E1+L5+E5a
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GAL_E5a))
|
||||
{
|
||||
return 33; // L1+E1+E5a
|
||||
}
|
||||
// Galileo E6
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E6))
|
||||
{
|
||||
return 100; // Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GAL_E6))
|
||||
{
|
||||
return 101; // Galileo E1B + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E5a, GAL_E6))
|
||||
{
|
||||
return 102; // Galileo E5a + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_E5b, GAL_E6))
|
||||
{
|
||||
return 103; // Galileo E5b + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GAL_E5a, GAL_E6))
|
||||
{
|
||||
return 104; // Galileo E1B + Galileo E5a + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GAL_1B, GAL_E5b, GAL_E6))
|
||||
{
|
||||
return 105; // Galileo E1B + Galileo E5b + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GAL_E6))
|
||||
{
|
||||
return 106; // GPS L1 C/A + Galileo E1B + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_E6))
|
||||
{
|
||||
return 107; // GPS L1 C/A + Galileo E6B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GPS_L5, GAL_E5a, GAL_E6))
|
||||
{
|
||||
return 108; // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
}
|
||||
// BeiDou B1I Receiver
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1))
|
||||
{
|
||||
return 500; // Beidou B1I
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, GPS_1C))
|
||||
{
|
||||
return 501; // Beidou B1I + GPS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, GAL_1B))
|
||||
{
|
||||
return 502; // Beidou B1I + Galileo E1B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, GLO_1G))
|
||||
{
|
||||
return 503; // Beidou B1I + GLONASS L1 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, GPS_1C, GAL_1B))
|
||||
{
|
||||
return 504; // Beidou B1I + GPS L1 C/A + Galileo E1B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, GPS_1C, GLO_1G, GAL_1B))
|
||||
{
|
||||
return 505; // Beidou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B1, BDS_B3))
|
||||
{
|
||||
return 506; // Beidou B1I + Beidou B3I
|
||||
}
|
||||
// BeiDou B3I Receiver
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B3))
|
||||
{
|
||||
return 600; // Beidou B3I
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B3, GPS_2S))
|
||||
{
|
||||
return 601; // Beidou B3I + GPS L2C
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B3, GLO_2G))
|
||||
{
|
||||
return 602; // Beidou B3I + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(BDS_B3, GPS_2S, GLO_2G))
|
||||
{
|
||||
return 603; // Beidou B3I + GPS L2C + GLONASS L2 C/A
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GPS_2S, GPS_L5))
|
||||
{
|
||||
return 1000; // GPS L1 + GPS L2C + GPS L5
|
||||
}
|
||||
if (signal_enabled_flags.check_only_enabled(GPS_1C, GAL_1B, GPS_2S, GPS_L5, GAL_E5a))
|
||||
{
|
||||
return 1001; // GPS L1 + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,154 +0,0 @@
|
||||
/*!
|
||||
* \file receiver_type.h
|
||||
* \brief Helper function to get the receiver type
|
||||
* \author Mathieu Favreau, 2025. favreau.mathieu(at)hotmail.com
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_RECEIVER_TYPE_H
|
||||
#define GNSS_SDR_RECEIVER_TYPE_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
enum signal_flag : uint32_t
|
||||
{
|
||||
GPS_1C = 0x1 << 0,
|
||||
GPS_2S = 0x1 << 1,
|
||||
GPS_L5 = 0x1 << 2,
|
||||
GAL_1B = 0x1 << 3,
|
||||
GAL_E5a = 0x1 << 4,
|
||||
GAL_E5b = 0x1 << 5,
|
||||
GAL_E6 = 0x1 << 6,
|
||||
GLO_1G = 0x1 << 7,
|
||||
GLO_2G = 0x1 << 8,
|
||||
BDS_B1 = 0x1 << 9,
|
||||
BDS_B3 = 0x1 << 10
|
||||
};
|
||||
|
||||
class Signal_Enabled_Flags
|
||||
{
|
||||
public:
|
||||
explicit Signal_Enabled_Flags(const ConfigurationInterface* configuration);
|
||||
|
||||
#if NO_FOLD_EXPRESSIONS
|
||||
template <typename T>
|
||||
uint32_t or_all(const T& value) const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
template <typename T, typename... Args>
|
||||
uint32_t or_all(const T& first, const Args&... rest) const
|
||||
{
|
||||
return first | or_all(rest...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool check_only_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags_ ^ or_all(args...)) == 0;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool check_any_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags_ & or_all(args...)) > 0;
|
||||
}
|
||||
#else
|
||||
template <typename... Args>
|
||||
bool check_only_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags_ ^ (args | ...)) == 0;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool check_any_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags_ & (args | ...)) > 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
uint32_t flags_;
|
||||
};
|
||||
|
||||
// Infer the type of receiver
|
||||
/*
|
||||
* TYPE | RECEIVER
|
||||
* 0 | Unknown
|
||||
* 1 | GPS L1 C/A
|
||||
* 2 | GPS L2C
|
||||
* 3 | GPS L5
|
||||
* 4 | Galileo E1B
|
||||
* 5 | Galileo E5a
|
||||
* 6 | Galileo E5b
|
||||
* 7 | GPS L1 C/A + GPS L2C
|
||||
* 8 | GPS L1 C/A + GPS L5
|
||||
* 9 | GPS L1 C/A + Galileo E1B
|
||||
* 10 | GPS L1 C/A + Galileo E5a
|
||||
* 11 | GPS L1 C/A + Galileo E5b
|
||||
* 12 | Galileo E1B + GPS L2C
|
||||
* 13 | Galileo E5a + GPS L5
|
||||
* 14 | Galileo E1B + Galileo E5a
|
||||
* 15 | Galileo E1B + Galileo E5b
|
||||
* 16 | GPS L2C + GPS L5
|
||||
* 17 | GPS L2C + Galileo E5a
|
||||
* 18 | GPS L2C + Galileo E5b
|
||||
* 19 | Galileo E5a + Galileo E5b
|
||||
* 20 | GPS L5 + Galileo E5b
|
||||
* 21 | GPS L1 C/A + Galileo E1B + GPS L2C
|
||||
* 22 | GPS L1 C/A + Galileo E1B + GPS L5
|
||||
* 23 | GLONASS L1 C/A
|
||||
* 24 | GLONASS L2 C/A
|
||||
* 25 | GLONASS L1 C/A + GLONASS L2 C/A
|
||||
* 26 | GPS L1 C/A + GLONASS L1 C/A
|
||||
* 27 | Galileo E1B + GLONASS L1 C/A
|
||||
* 28 | GPS L2C + GLONASS L1 C/A
|
||||
* 29 | GPS L1 C/A + GLONASS L2 C/A
|
||||
* 30 | Galileo E1B + GLONASS L2 C/A
|
||||
* 31 | GPS L2C + GLONASS L2 C/A
|
||||
* 32 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a
|
||||
* 33 | GPS L1 C/A + Galileo E1B + Galileo E5a
|
||||
*
|
||||
* Skipped previous values to avoid overlapping
|
||||
* 100 | Galileo E6B
|
||||
* 101 | Galileo E1B + Galileo E6B
|
||||
* 102 | Galileo E5a + Galileo E6B
|
||||
* 103 | Galileo E5b + Galileo E6B
|
||||
* 104 | Galileo E1B + Galileo E5a + Galileo E6B
|
||||
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
|
||||
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
|
||||
* 107 | GPS L1 C/A + Galileo E6B
|
||||
* 108 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
* Skipped previous values to avoid overlapping
|
||||
* 500 | BeiDou B1I
|
||||
* 501 | BeiDou B1I + GPS L1 C/A
|
||||
* 502 | BeiDou B1I + Galileo E1B
|
||||
* 503 | BeiDou B1I + GLONASS L1 C/A
|
||||
* 504 | BeiDou B1I + GPS L1 C/A + Galileo E1B
|
||||
* 505 | BeiDou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
|
||||
* 506 | BeiDou B1I + Beidou B3I
|
||||
* Skipped previous values to avoid overlapping
|
||||
* 600 | BeiDou B3I
|
||||
* 601 | BeiDou B3I + GPS L2C
|
||||
* 602 | BeiDou B3I + GLONASS L2 C/A
|
||||
* 603 | BeiDou B3I + GPS L2C + GLONASS L2 C/A
|
||||
*
|
||||
* 1000 | GPS L1 C/A + GPS L2C + GPS L5
|
||||
* 1001 | GPS L1 C/A + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a
|
||||
*/
|
||||
|
||||
uint32_t get_type_of_receiver(const Signal_Enabled_Flags& signal_enabled_flags);
|
||||
|
||||
#endif // GNSS_SDR_RECEIVER_TYPE_H
|
File diff suppressed because it is too large
Load Diff
@@ -100,107 +100,43 @@ public:
|
||||
* prints the RINEX headers for navigation and observation files. If it is
|
||||
* not the first annotation, it only annotates the observation, and updates
|
||||
* the navigation header if UTC data was not available when writing it for
|
||||
* the first time. The meaning of type_of_rx is as follows:
|
||||
*
|
||||
* type_of_rx | Signals
|
||||
* ------------- | -------------
|
||||
* 0 | Unknown
|
||||
* 1 | GPS L1 C/A
|
||||
* 2 | GPS L2C
|
||||
* 3 | GPS L5
|
||||
* 4 | Galileo E1B
|
||||
* 5 | Galileo E5a
|
||||
* 6 | Galileo E5b
|
||||
* 7 | GPS L1 C/A + GPS L2C
|
||||
* 8 | GPS L1 C/A + GPS L5
|
||||
* 9 | GPS L1 C/A + Galileo E1B
|
||||
* 10 | GPS L1 C/A + Galileo E5a
|
||||
* 11 | GPS L1 C/A + Galileo E5b
|
||||
* 12 | Galileo E1B + GPS L2C
|
||||
* 13 | Galileo E5a + GPS L5
|
||||
* 14 | Galileo E1B + Galileo E5a
|
||||
* 15 | Galileo E1B + Galileo E5b
|
||||
* 16 | GPS L2C + GPS L5
|
||||
* 17 | GPS L2C + Galileo E5a
|
||||
* 20 | GPS L5 + Galileo E5b
|
||||
* 21 | GPS L1 C/A + Galileo E1B + GPS L2C
|
||||
* 22 | GPS L1 C/A + Galileo E1B + GPS L5
|
||||
* 23 | GLONASS L1 C/A
|
||||
* 24 | GLONASS L2 C/A
|
||||
* 25 | GLONASS L1 C/A + GLONASS L2 C/A
|
||||
* 26 | GPS L1 C/A + GLONASS L1 C/A
|
||||
* 27 | Galileo E1B + GLONASS L1 C/A
|
||||
* 28 | GPS L2C + GLONASS L1 C/A
|
||||
* 29 | GPS L1 C/A + GLONASS L2 C/A
|
||||
* 30 | Galileo E1B + GLONASS L2 C/A
|
||||
* 31 | GPS L2C + GLONASS L2 C/A
|
||||
* 32 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a
|
||||
* 33 | GPS L1 C/A + Galileo E1B + Galileo E5a
|
||||
* 100 | Galileo E6B
|
||||
* 101 | Galileo E1B + Galileo E6B
|
||||
* 102 | Galileo E5a + Galileo E6B
|
||||
* 103 | Galileo E5b + Galileo E6B
|
||||
* 104 | Galileo E1B + Galileo E5a + Galileo E6B
|
||||
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
|
||||
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
|
||||
* 107 | GPS L1 C/A + Galileo E6B
|
||||
* 108 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
* 500 | BeiDou B1I
|
||||
* 501 | BeiDou B1I + GPS L1 C/A
|
||||
* 502 | BeiDou B1I + Galileo E1B
|
||||
* 503 | BeiDou B1I + GLONASS L1 C/A
|
||||
* 504 | BeiDou B1I + GPS L1 C/A + Galileo E1B
|
||||
* 505 | BeiDou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
|
||||
* 506 | BeiDou B1I + Beidou B3I
|
||||
* 600 | BeiDou B3I
|
||||
* 601 | BeiDou B3I + GPS L2C
|
||||
* 602 | BeiDou B3I + GLONASS L2 C/A
|
||||
* 603 | BeiDou B3I + GPS L2C + GLONASS L2 C/A
|
||||
* 604 | BeiDou B3I + GPS L1 C/A
|
||||
* 605 | BeiDou B3I + Galileo E1B
|
||||
* 606 | BeiDou B3I + GLONASS L1 C/A
|
||||
* 607 | BeiDou B3I + GPS L1 C/A + Galileo E1B
|
||||
* 608 | BeiDou B3I + GPS L1 C/A + Galileo E1B + BeiDou B1I
|
||||
* 609 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A
|
||||
* 610 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A + BeiDou B1I
|
||||
* 1000 | GPS L1 C/A + GPS L2C + GPS L5
|
||||
* 1001 | GPS L1 C/A + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a
|
||||
* the first time.
|
||||
*
|
||||
*/
|
||||
void print_rinex_annotation(const Rtklib_Solver* pvt_solver,
|
||||
const std::map<int, Gnss_Synchro>& gnss_observables_map,
|
||||
double rx_time,
|
||||
int type_of_rx,
|
||||
uint32_t signal_enabled_flags,
|
||||
bool flag_write_RINEX_obs_output);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for GPS NAV message
|
||||
*/
|
||||
void log_rinex_nav_gps_nav(int type_of_rx,
|
||||
void log_rinex_nav_gps_nav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Gps_Ephemeris>& new_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for GPS CNAV message
|
||||
*/
|
||||
void log_rinex_nav_gps_cnav(int type_of_rx,
|
||||
void log_rinex_nav_gps_cnav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Gps_CNAV_Ephemeris>& new_cnav_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for Galileo NAV message
|
||||
*/
|
||||
void log_rinex_nav_gal_nav(int type_of_rx,
|
||||
void log_rinex_nav_gal_nav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Galileo_Ephemeris>& new_gal_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for Glonass GNAV message
|
||||
*/
|
||||
void log_rinex_nav_glo_gnav(int type_of_rx,
|
||||
void log_rinex_nav_glo_gnav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Glonass_Gnav_Ephemeris>& new_glo_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for BeiDou DNAV message
|
||||
*/
|
||||
void log_rinex_nav_bds_dnav(int type_of_rx,
|
||||
void log_rinex_nav_bds_dnav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Beidou_Dnav_Ephemeris>& new_bds_eph);
|
||||
|
||||
/*!
|
||||
@@ -1002,7 +938,7 @@ private:
|
||||
std::fstream sbsFile; // Output file stream for RINEX SBAS raw data file
|
||||
std::fstream navGalFile; // Output file stream for RINEX Galileo navigation data file
|
||||
std::fstream navGloFile; // Output file stream for RINEX GLONASS navigation data file
|
||||
std::fstream navBdsFile; // Output file stream for RINEX Galileo navigation data file
|
||||
std::fstream navBdsFile; // Output file stream for RINEX Beidou navigation data file
|
||||
std::fstream navMixFile; // Output file stream for RINEX Mixed navigation data file
|
||||
|
||||
std::string navfilename; // Name of RINEX navigation file for GPS L1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -72,13 +72,14 @@ public:
|
||||
void Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
|
||||
const std::map<int, Gnss_Synchro>& gnss_observables_map,
|
||||
double rx_time,
|
||||
int32_t type_of_rx,
|
||||
int32_t rtcm_MSM_rate_ms,
|
||||
int32_t rtcm_MT1019_rate_ms,
|
||||
int32_t rtcm_MT1020_rate_ms,
|
||||
int32_t rtcm_MT1045_rate_ms,
|
||||
int32_t rtcm_MT1077_rate_ms,
|
||||
int32_t rtcm_MT1097_rate_ms,
|
||||
uint32_t signal_enabled_flags,
|
||||
bool rtcm_MSM_enabled,
|
||||
bool rtcm_MT1019_enabled,
|
||||
bool rtcm_MT1020_enabled,
|
||||
bool rtcm_MT1045_enabled,
|
||||
bool rtcm_MT1077_enabled,
|
||||
bool rtcm_MT1087_enabled,
|
||||
bool rtcm_MT1097_enabled,
|
||||
bool flag_write_RTCM_MSM_output,
|
||||
bool flag_write_RTCM_1019_output,
|
||||
bool flag_write_RTCM_1020_output,
|
||||
@@ -198,7 +199,7 @@ private:
|
||||
int32_t rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
|
||||
uint16_t port;
|
||||
uint16_t station_id;
|
||||
bool d_rtcm_writing_started;
|
||||
bool d_rtcm_has_written_once;
|
||||
bool d_rtcm_file_dump;
|
||||
};
|
||||
|
||||
|
@@ -34,9 +34,8 @@
|
||||
#include "Beidou_DNAV.h"
|
||||
#include "gnss_sdr_filesystem.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include "signal_enabled_flags.h"
|
||||
#include <matio.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <utility>
|
||||
@@ -51,12 +50,12 @@
|
||||
Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
|
||||
const Pvt_Conf &conf,
|
||||
const std::string &dump_filename,
|
||||
uint32_t type_of_rx,
|
||||
uint32_t signal_enabled_flags,
|
||||
bool flag_dump_to_file,
|
||||
bool flag_dump_to_mat) : d_dump_filename(dump_filename),
|
||||
d_rtk(rtk),
|
||||
d_conf(conf),
|
||||
d_type_of_rx(type_of_rx),
|
||||
d_signal_enabled_flags(signal_enabled_flags),
|
||||
d_flag_dump_enabled(flag_dump_to_file),
|
||||
d_flag_dump_mat_enabled(flag_dump_to_mat)
|
||||
{
|
||||
@@ -78,65 +77,58 @@ Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
|
||||
d_rtklib_band_index["L5"] = 2;
|
||||
d_rtklib_band_index["E6"] = 0;
|
||||
|
||||
switch (d_type_of_rx)
|
||||
const Signal_Enabled_Flags flags(d_signal_enabled_flags);
|
||||
|
||||
if (flags.check_only_enabled(GAL_E5b) ||
|
||||
flags.check_only_enabled(GPS_1C, GAL_E5b) ||
|
||||
flags.check_only_enabled(GAL_1B, GAL_E5b) ||
|
||||
flags.check_only_enabled(GPS_2S, GAL_E5b))
|
||||
{
|
||||
case 6: // E5b only
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 11: // GPS L1 C/A + Galileo E5b
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 15: // Galileo E1B + Galileo E5b
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 18: // GPS L2C + Galileo E5b
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 19: // Galileo E5a + Galileo E5b
|
||||
}
|
||||
else if (flags.check_only_enabled(GAL_E5a, GAL_E5b))
|
||||
{
|
||||
d_rtklib_band_index["5X"] = 0;
|
||||
d_rtklib_freq_index[0] = 2;
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 20: // GPS L5 + Galileo E5b
|
||||
}
|
||||
else if (flags.check_only_enabled(GPS_L5, GAL_E5b))
|
||||
{
|
||||
d_rtklib_band_index["L5"] = 0;
|
||||
d_rtklib_freq_index[0] = 2;
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 100: // E6B only
|
||||
}
|
||||
else if (flags.check_only_enabled(GAL_E6))
|
||||
{
|
||||
d_rtklib_freq_index[0] = 3;
|
||||
break;
|
||||
case 101: // E1 + E6B
|
||||
}
|
||||
else if (flags.check_only_enabled(GAL_1B, GAL_E6) ||
|
||||
flags.check_only_enabled(GAL_E5a, GAL_E6) ||
|
||||
flags.check_only_enabled(GAL_1B, GAL_E5a, GAL_E6))
|
||||
{
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 102: // E5a + E6B
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 103: // E5b + E6B
|
||||
}
|
||||
else if (flags.check_only_enabled(GAL_E5b, GAL_E6) ||
|
||||
flags.check_only_enabled(GAL_1B, GAL_E5b, GAL_E6))
|
||||
{
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
break;
|
||||
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
|
||||
}
|
||||
else if (flags.check_only_enabled(GAL_1B, GAL_E5a, GAL_E6) ||
|
||||
flags.check_only_enabled(GPS_1C, GAL_1B, GAL_E6) ||
|
||||
flags.check_only_enabled(GPS_1C, GAL_E6))
|
||||
{
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
|
||||
d_rtklib_freq_index[2] = 4;
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
|
||||
case 107: // GPS L1 C/A + Galileo E6B
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 108: // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
}
|
||||
else if (flags.check_only_enabled(GPS_1C, GAL_1B, GPS_L5, GAL_E5a, GAL_E5b))
|
||||
{
|
||||
d_rtklib_band_index["E6"] = 2;
|
||||
d_rtklib_freq_index[2] = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
// auto empty_map = std::map < int, HAS_obs_corrections >> ();
|
||||
// d_has_obs_corr_map["L1 C/A"] = empty_map;
|
||||
|
||||
|
@@ -85,7 +85,7 @@ public:
|
||||
Rtklib_Solver(const rtk_t& rtk,
|
||||
const Pvt_Conf& conf,
|
||||
const std::string& dump_filename,
|
||||
uint32_t type_of_rx,
|
||||
uint32_t signal_enabled_flags,
|
||||
bool flag_dump_to_file,
|
||||
bool flag_dump_to_mat);
|
||||
|
||||
@@ -155,7 +155,7 @@ private:
|
||||
Monitor_Pvt d_monitor_pvt{};
|
||||
Pvt_Conf d_conf;
|
||||
Pvt_Kf d_pvt_kf;
|
||||
uint32_t d_type_of_rx;
|
||||
uint32_t d_signal_enabled_flags;
|
||||
bool d_flag_dump_enabled;
|
||||
bool d_flag_dump_mat_enabled;
|
||||
};
|
||||
|
64
src/algorithms/PVT/libs/signal_enabled_flags.cc
Normal file
64
src/algorithms/PVT/libs/signal_enabled_flags.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*!
|
||||
* \file signal_enabled_flags.cc
|
||||
* \brief Class to check the enabled signals
|
||||
* \author Mathieu Favreau, 2025. favreau.mathieu(at)hotmail.com
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "signal_enabled_flags.h"
|
||||
#include "configuration_interface.h" // for ConfigurationInterface
|
||||
#include <vector> // for vector
|
||||
|
||||
namespace
|
||||
{
|
||||
uint32_t flags_from_config(const ConfigurationInterface* configuration)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
const std::vector<std::pair<uint32_t, std::string>> signal_flag_to_prop = {
|
||||
{GPS_1C, "Channels_1C.count"},
|
||||
{GPS_2S, "Channels_2S.count"},
|
||||
{GPS_L5, "Channels_L5.count"},
|
||||
{GAL_1B, "Channels_1B.count"},
|
||||
{GAL_E5a, "Channels_5X.count"},
|
||||
{GAL_E5b, "Channels_7X.count"},
|
||||
{GAL_E6, "Channels_E6.count"},
|
||||
{GLO_1G, "Channels_1G.count"},
|
||||
{GLO_2G, "Channels_2G.count"},
|
||||
{BDS_B1, "Channels_B1.count"},
|
||||
{BDS_B3, "Channels_B3.count"}};
|
||||
|
||||
for (const auto& pair_aux : signal_flag_to_prop)
|
||||
{
|
||||
auto flag = pair_aux.first;
|
||||
auto prop = pair_aux.second;
|
||||
const auto enabled = configuration->property(prop, 0) > 0;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
flags |= flag;
|
||||
}
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
Signal_Enabled_Flags::Signal_Enabled_Flags(const ConfigurationInterface* configuration) : flags(flags_from_config(configuration))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Signal_Enabled_Flags::Signal_Enabled_Flags(uint32_t flags_) : flags(flags_)
|
||||
{
|
||||
}
|
72
src/algorithms/PVT/libs/signal_enabled_flags.h
Normal file
72
src/algorithms/PVT/libs/signal_enabled_flags.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*!
|
||||
* \file signal_enabled_flags.h
|
||||
* \brief Class to check the enabled signals
|
||||
* \author Mathieu Favreau, 2025. favreau.mathieu(at)hotmail.com
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_SIGNAL_ENABLED_FLAGS_H
|
||||
#define GNSS_SDR_SIGNAL_ENABLED_FLAGS_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
enum signal_flag : uint32_t
|
||||
{
|
||||
GPS_1C = 0x1 << 0,
|
||||
GPS_2S = 0x1 << 1,
|
||||
GPS_L5 = 0x1 << 2,
|
||||
GAL_1B = 0x1 << 3,
|
||||
GAL_E5a = 0x1 << 4,
|
||||
GAL_E5b = 0x1 << 5,
|
||||
GAL_E6 = 0x1 << 6,
|
||||
GLO_1G = 0x1 << 7,
|
||||
GLO_2G = 0x1 << 8,
|
||||
BDS_B1 = 0x1 << 9,
|
||||
BDS_B3 = 0x1 << 10
|
||||
};
|
||||
|
||||
class Signal_Enabled_Flags
|
||||
{
|
||||
public:
|
||||
explicit Signal_Enabled_Flags(const ConfigurationInterface* configuration);
|
||||
explicit Signal_Enabled_Flags(uint32_t flags_);
|
||||
|
||||
template <typename T>
|
||||
uint32_t or_all(const T& value) const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
template <typename T, typename... Args>
|
||||
uint32_t or_all(const T& first, const Args&... rest) const
|
||||
{
|
||||
return first | or_all(rest...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool check_only_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags ^ or_all(args...)) == 0;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool check_any_enabled(const Args&... args) const
|
||||
{
|
||||
return (flags & or_all(args...)) > 0;
|
||||
}
|
||||
|
||||
const uint32_t flags;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_SIGNAL_ENABLED_FLAGS_H
|
@@ -15,11 +15,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "gnss_sdr_filesystem.h"
|
||||
#include "nmea_printer.h"
|
||||
#include "pvt_conf.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "rtklib_solver.h"
|
||||
#include "signal_enabled_flags.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
@@ -147,7 +148,7 @@ TEST_F(NmeaPrinterTest, PrintLine)
|
||||
std::string filename("nmea_test.nmea");
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
std::shared_ptr<Rtklib_Solver> pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 1, false, false);
|
||||
std::shared_ptr<Rtklib_Solver> pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", GPS_1C, false, false);
|
||||
|
||||
boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19),
|
||||
boost::posix_time::hours(22) + boost::posix_time::minutes(54) + boost::posix_time::seconds(46));
|
||||
|
@@ -14,11 +14,12 @@
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "gnss_sdr_filesystem.h"
|
||||
#include "pvt_conf.h"
|
||||
#include "rinex_printer.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "rtklib_solver.h"
|
||||
#include "signal_enabled_flags.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -146,7 +147,8 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
{
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 4, false, false);
|
||||
const auto signal_enabled_flags = GAL_1B;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
auto eph = Galileo_Ephemeris();
|
||||
eph.PRN = 1;
|
||||
pvt_solution->galileo_ephemeris_map[1] = std::move(eph);
|
||||
@@ -158,11 +160,7 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
4,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -196,11 +194,7 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
|
||||
auto rp2 = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp2->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
15,
|
||||
true);
|
||||
rp2->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, GAL_1B | GAL_E5b, true);
|
||||
obsfile = rp2->get_obsfilename();
|
||||
navfile = rp2->get_navfilename()[0];
|
||||
|
||||
@@ -234,7 +228,8 @@ TEST_F(RinexPrinterTest, GlonassObsHeader)
|
||||
{
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 28, false, false);
|
||||
const auto signal_enabled_flags = GLO_1G;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
auto eph = Glonass_Gnav_Ephemeris();
|
||||
eph.PRN = 1;
|
||||
pvt_solution->glonass_gnav_ephemeris_map[1] = std::move(eph);
|
||||
@@ -246,11 +241,7 @@ TEST_F(RinexPrinterTest, GlonassObsHeader)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>(3);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
23,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -296,7 +287,8 @@ TEST_F(RinexPrinterTest, MixedObsHeader)
|
||||
eph_gps.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 106, false, false);
|
||||
const auto signal_enabled_flags = GPS_1C | GAL_1B | GAL_E5a;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->galileo_ephemeris_map[1] = std::move(eph_gal);
|
||||
|
||||
pvt_solution->gps_ephemeris_map[1] = std::move(eph_gps);
|
||||
@@ -309,11 +301,7 @@ TEST_F(RinexPrinterTest, MixedObsHeader)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
33,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -368,7 +356,8 @@ TEST_F(RinexPrinterTest, MixedObsHeaderGpsGlo)
|
||||
eph_gps.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 26, false, false);
|
||||
const auto signal_enabled_flags = GPS_1C | GLO_1G;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->glonass_gnav_ephemeris_map[1] = std::move(eph_glo);
|
||||
|
||||
pvt_solution->gps_ephemeris_map[1] = std::move(eph_gps);
|
||||
@@ -381,11 +370,7 @@ TEST_F(RinexPrinterTest, MixedObsHeaderGpsGlo)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
26,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -437,7 +422,8 @@ TEST_F(RinexPrinterTest, GalileoObsLog)
|
||||
eph.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 4, false, false);
|
||||
const auto signal_enabled_flags = GAL_1B;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->galileo_ephemeris_map[1] = eph;
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
|
||||
@@ -474,11 +460,7 @@ TEST_F(RinexPrinterTest, GalileoObsLog)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(4, gs4));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
4,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -519,7 +501,8 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
eph.PRN = 22;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 23, false, false);
|
||||
const auto signal_enabled_flags = GLO_1G;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->glonass_gnav_ephemeris_map[1] = eph;
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
|
||||
@@ -556,11 +539,7 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(4, gs4));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
23,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -603,7 +582,8 @@ TEST_F(RinexPrinterTest, GpsObsLogDualBand)
|
||||
eph_cnav.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 7, false, false);
|
||||
const auto signal_enabled_flags = GPS_1C | GPS_2S;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->gps_ephemeris_map[1] = std::move(eph);
|
||||
pvt_solution->gps_cnav_ephemeris_map[1] = std::move(eph_cnav);
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
@@ -653,11 +633,7 @@ TEST_F(RinexPrinterTest, GpsObsLogDualBand)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(4, gs4));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
7,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -693,7 +669,8 @@ TEST_F(RinexPrinterTest, GalileoObsLogDualBand)
|
||||
{
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 14, false, false);
|
||||
const auto signal_enabled_flags = GAL_1B | GAL_E5a;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
auto eph = Galileo_Ephemeris();
|
||||
eph.PRN = 1;
|
||||
pvt_solution->galileo_ephemeris_map[1] = eph;
|
||||
@@ -745,11 +722,7 @@ TEST_F(RinexPrinterTest, GalileoObsLogDualBand)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
14,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -795,7 +768,8 @@ TEST_F(RinexPrinterTest, MixedObsLog)
|
||||
eph_gal.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 9, false, false);
|
||||
const auto signal_enabled_flags = GPS_1C | GAL_1B;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->gps_ephemeris_map[1] = std::move(eph_gps);
|
||||
pvt_solution->galileo_ephemeris_map[1] = std::move(eph_gal);
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
@@ -875,11 +849,7 @@ TEST_F(RinexPrinterTest, MixedObsLog)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
9,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -921,7 +891,8 @@ TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
|
||||
eph_glo.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 26, false, false);
|
||||
const auto signal_enabled_flags = GPS_1C | GLO_1G;
|
||||
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", signal_enabled_flags, false, false);
|
||||
pvt_solution->gps_ephemeris_map[1] = std::move(eph_gps);
|
||||
pvt_solution->glonass_gnav_ephemeris_map[1] = std::move(eph_glo);
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
@@ -999,11 +970,7 @@ TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(),
|
||||
gnss_observables_map,
|
||||
0.0,
|
||||
26,
|
||||
true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
Reference in New Issue
Block a user