mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-09-25 18:31:51 +00:00
Merge branch 'next' of github.com:gnss-sdr/gnss-sdr into bit-synch
This commit is contained in:
+1
-1
@@ -364,7 +364,7 @@ set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.15")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.17.0")
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "origin/master")
|
||||
set(GNSSSDR_GNSSTK_LOCAL_VERSION "15.0.0")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.9.4")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.9.5")
|
||||
set(GNSSSDR_MATHJAX_EXTERNAL_VERSION "2.7.7")
|
||||
set(GNSSSDR_ABSL_LOCAL_VERSION "origin/master") # live at head (see https://abseil.io/about/releases)
|
||||
|
||||
|
||||
+7
-1
@@ -4,7 +4,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
)
|
||||
|
||||
[comment]: # (
|
||||
SPDX-FileCopyrightText: 2011-2025 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
SPDX-FileCopyrightText: 2011-2026 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
)
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@@ -44,6 +44,12 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||
- Refactored the internal handling of multi-signal configurations in the PVT
|
||||
block for improved maintainability and extensibility. Another excellent
|
||||
contribution by @MathieuFavreau.
|
||||
- Major refactoring of the RINEX printer, significantly improving
|
||||
maintainability and correcting several bugs. The printer now consistently
|
||||
populates all observable fields when multiple signals exist for the same
|
||||
constellation, writing zeros for missing observables as needed to strictly
|
||||
match the observables header format. Another excellent contribution by
|
||||
@MathieuFavreau.
|
||||
- Integration of Glonass L1/l2 C/A signal tracking into the main tracking
|
||||
engine. Removed `GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking` and
|
||||
`GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking` Tracking block implementations,
|
||||
|
||||
@@ -412,7 +412,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
// initialize RINEX printer
|
||||
if (d_rinex_output_enabled)
|
||||
{
|
||||
d_rp = std::make_unique<Rinex_Printer>(d_rinex_version, conf_.rinex_output_path, conf_.rinex_name, conf_.pre_2009_file);
|
||||
d_rp = std::make_unique<Rinex_Printer>(d_signal_enabled_flags, d_rinex_version, conf_.rinex_output_path, conf_.rinex_name, conf_.pre_2009_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1217,24 +1217,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// update/insert new ephemeris record to the global ephemeris map
|
||||
if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data
|
||||
{
|
||||
bool new_annotation = false;
|
||||
if (d_internal_pvt_solver->gps_ephemeris_map.find(gps_eph->PRN) == d_internal_pvt_solver->gps_ephemeris_map.cend())
|
||||
const auto eph_it = d_internal_pvt_solver->gps_ephemeris_map.find(gps_eph->PRN);
|
||||
|
||||
if (eph_it == d_internal_pvt_solver->gps_ephemeris_map.cend() || eph_it->second.toe != gps_eph->toe)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_internal_pvt_solver->gps_ephemeris_map[gps_eph->PRN].toe != gps_eph->toe)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
}
|
||||
if (new_annotation == true)
|
||||
{
|
||||
// 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_signal_enabled_flags, new_eph);
|
||||
d_rp->log_rinex_nav_gps_nav({{gps_eph->PRN, *gps_eph}}); // New record!
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->gps_ephemeris_map[gps_eph->PRN] = *gps_eph;
|
||||
@@ -1285,24 +1272,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// update/insert new ephemeris record to the global ephemeris map
|
||||
if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data
|
||||
{
|
||||
bool new_annotation = false;
|
||||
if (d_internal_pvt_solver->gps_cnav_ephemeris_map.find(gps_cnav_ephemeris->PRN) == d_internal_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||
const auto eph_it = d_internal_pvt_solver->gps_cnav_ephemeris_map.find(gps_cnav_ephemeris->PRN);
|
||||
|
||||
if (eph_it == d_internal_pvt_solver->gps_cnav_ephemeris_map.cend() || eph_it->second.toe1 != gps_cnav_ephemeris->toe1)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN].toe1 != gps_cnav_ephemeris->toe1)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
}
|
||||
if (new_annotation == true)
|
||||
{
|
||||
// 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_signal_enabled_flags, new_cnav_eph);
|
||||
d_rp->log_rinex_nav_gps_cnav({{gps_cnav_ephemeris->PRN, *gps_cnav_ephemeris}}); // New record!
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris;
|
||||
@@ -1377,28 +1351,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// update/insert new ephemeris record to the global ephemeris map
|
||||
if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data
|
||||
{
|
||||
bool new_annotation = false;
|
||||
if (d_internal_pvt_solver->galileo_ephemeris_map.find(galileo_eph->PRN) == d_internal_pvt_solver->galileo_ephemeris_map.cend())
|
||||
const auto eph_it = d_internal_pvt_solver->galileo_ephemeris_map.find(galileo_eph->PRN);
|
||||
|
||||
if ((eph_it == d_internal_pvt_solver->galileo_ephemeris_map.cend() || eph_it->second.toe != galileo_eph->toe) && galileo_eph->WN != 0 && galileo_eph->PRN <= 36)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN].toe != galileo_eph->toe)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
}
|
||||
if (galileo_eph->WN == 0 || galileo_eph->PRN > 36)
|
||||
{
|
||||
new_annotation = false;
|
||||
}
|
||||
if (new_annotation == true)
|
||||
{
|
||||
// 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_signal_enabled_flags, new_gal_eph);
|
||||
d_rp->log_rinex_nav_gal_nav({{galileo_eph->PRN, *galileo_eph}}); // New record!
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN] = *galileo_eph;
|
||||
@@ -1504,24 +1461,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// update/insert new ephemeris record to the global ephemeris map
|
||||
if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data
|
||||
{
|
||||
bool new_annotation = false;
|
||||
if (d_internal_pvt_solver->glonass_gnav_ephemeris_map.find(glonass_gnav_eph->PRN) == d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend())
|
||||
const auto eph_it = d_internal_pvt_solver->glonass_gnav_ephemeris_map.find(glonass_gnav_eph->PRN);
|
||||
|
||||
if (eph_it == d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend() || eph_it->second.d_t_b != glonass_gnav_eph->d_t_b)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN].d_t_b != glonass_gnav_eph->d_t_b)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
}
|
||||
if (new_annotation == true)
|
||||
{
|
||||
// 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_signal_enabled_flags, new_glo_eph);
|
||||
d_rp->log_rinex_nav_glo_gnav({{glonass_gnav_eph->PRN, *glonass_gnav_eph}}); // New record!
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN] = *glonass_gnav_eph;
|
||||
@@ -1567,24 +1511,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
// update/insert new ephemeris record to the global ephemeris map
|
||||
if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data
|
||||
{
|
||||
bool new_annotation = false;
|
||||
if (d_internal_pvt_solver->beidou_dnav_ephemeris_map.find(bds_dnav_eph->PRN) == d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
const auto eph_it = d_internal_pvt_solver->beidou_dnav_ephemeris_map.find(bds_dnav_eph->PRN);
|
||||
|
||||
if (eph_it == d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend() || eph_it->second.toc != bds_dnav_eph->toc)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN].toc != bds_dnav_eph->toc)
|
||||
{
|
||||
new_annotation = true;
|
||||
}
|
||||
}
|
||||
if (new_annotation == true)
|
||||
{
|
||||
// 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_signal_enabled_flags, new_bds_eph);
|
||||
d_rp->log_rinex_nav_bds_dnav({{bds_dnav_eph->PRN, *bds_dnav_eph}}); // New record!
|
||||
}
|
||||
}
|
||||
d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN] = *bds_dnav_eph;
|
||||
@@ -2493,7 +2424,7 @@ 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_signal_enabled_flags, flag_write_RINEX_obs_output);
|
||||
d_rp->print_rinex_annotation(d_user_pvt_solver.get(), d_gnss_observables_map, d_rx_time, flag_write_RINEX_obs_output);
|
||||
}
|
||||
if (d_rtcm_enabled)
|
||||
{
|
||||
|
||||
@@ -199,7 +199,7 @@ private:
|
||||
std::chrono::time_point<std::chrono::system_clock> d_start;
|
||||
std::chrono::time_point<std::chrono::system_clock> d_end;
|
||||
|
||||
std::string d_queue_name;
|
||||
const std::string d_queue_name;
|
||||
std::string d_dump_filename;
|
||||
std::string d_xml_base_path;
|
||||
std::string d_local_time_str;
|
||||
@@ -215,35 +215,35 @@ private:
|
||||
std::queue<GnssTime> d_TimeChannelTagTimestamps;
|
||||
|
||||
boost::posix_time::time_duration d_utc_diff_time;
|
||||
std::unique_ptr<Geohash> d_geohash;
|
||||
const std::unique_ptr<Geohash> d_geohash;
|
||||
|
||||
size_t d_gps_ephemeris_sptr_type_hash_code;
|
||||
size_t d_gps_iono_sptr_type_hash_code;
|
||||
size_t d_gps_utc_model_sptr_type_hash_code;
|
||||
size_t d_gps_cnav_ephemeris_sptr_type_hash_code;
|
||||
size_t d_gps_cnav_iono_sptr_type_hash_code;
|
||||
size_t d_gps_cnav_utc_model_sptr_type_hash_code;
|
||||
size_t d_gps_almanac_sptr_type_hash_code;
|
||||
size_t d_galileo_ephemeris_sptr_type_hash_code;
|
||||
size_t d_galileo_iono_sptr_type_hash_code;
|
||||
size_t d_galileo_utc_model_sptr_type_hash_code;
|
||||
size_t d_galileo_almanac_helper_sptr_type_hash_code;
|
||||
size_t d_galileo_almanac_sptr_type_hash_code;
|
||||
size_t d_glonass_gnav_ephemeris_sptr_type_hash_code;
|
||||
size_t d_glonass_gnav_utc_model_sptr_type_hash_code;
|
||||
size_t d_glonass_gnav_almanac_sptr_type_hash_code;
|
||||
size_t d_beidou_dnav_ephemeris_sptr_type_hash_code;
|
||||
size_t d_beidou_dnav_iono_sptr_type_hash_code;
|
||||
size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
|
||||
size_t d_beidou_dnav_almanac_sptr_type_hash_code;
|
||||
size_t d_galileo_has_data_sptr_type_hash_code;
|
||||
const size_t d_gps_ephemeris_sptr_type_hash_code;
|
||||
const size_t d_gps_iono_sptr_type_hash_code;
|
||||
const size_t d_gps_utc_model_sptr_type_hash_code;
|
||||
const size_t d_gps_cnav_ephemeris_sptr_type_hash_code;
|
||||
const size_t d_gps_cnav_iono_sptr_type_hash_code;
|
||||
const size_t d_gps_cnav_utc_model_sptr_type_hash_code;
|
||||
const size_t d_gps_almanac_sptr_type_hash_code;
|
||||
const size_t d_galileo_ephemeris_sptr_type_hash_code;
|
||||
const size_t d_galileo_iono_sptr_type_hash_code;
|
||||
const size_t d_galileo_utc_model_sptr_type_hash_code;
|
||||
const size_t d_galileo_almanac_helper_sptr_type_hash_code;
|
||||
const size_t d_galileo_almanac_sptr_type_hash_code;
|
||||
const size_t d_glonass_gnav_ephemeris_sptr_type_hash_code;
|
||||
const size_t d_glonass_gnav_utc_model_sptr_type_hash_code;
|
||||
const size_t d_glonass_gnav_almanac_sptr_type_hash_code;
|
||||
const size_t d_beidou_dnav_ephemeris_sptr_type_hash_code;
|
||||
const size_t d_beidou_dnav_iono_sptr_type_hash_code;
|
||||
const size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
|
||||
const size_t d_beidou_dnav_almanac_sptr_type_hash_code;
|
||||
const size_t d_galileo_has_data_sptr_type_hash_code;
|
||||
|
||||
double d_rinex_version;
|
||||
const double d_rinex_version;
|
||||
double d_rx_time;
|
||||
uint64_t d_local_counter_ms;
|
||||
uint64_t d_timestamp_rx_clock_offset_correction_msg_ms;
|
||||
|
||||
int32_t d_rinexobs_rate_ms;
|
||||
const int32_t d_rinexobs_rate_ms;
|
||||
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_MT1020_rate_ms; // GLONASS Broadcast Ephemeris (orbits)
|
||||
@@ -251,24 +251,24 @@ private:
|
||||
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_MSM_rate_ms;
|
||||
int32_t d_kml_rate_ms;
|
||||
int32_t d_gpx_rate_ms;
|
||||
int32_t d_geojson_rate_ms;
|
||||
int32_t d_nmea_rate_ms;
|
||||
int32_t d_an_rate_ms;
|
||||
int32_t d_output_rate_ms;
|
||||
int32_t d_display_rate_ms;
|
||||
int32_t d_report_rate_ms;
|
||||
int32_t d_max_obs_block_rx_clock_offset_ms;
|
||||
const int32_t d_kml_rate_ms;
|
||||
const int32_t d_gpx_rate_ms;
|
||||
const int32_t d_geojson_rate_ms;
|
||||
const int32_t d_nmea_rate_ms;
|
||||
const int32_t d_an_rate_ms;
|
||||
const int32_t d_output_rate_ms;
|
||||
const int32_t d_display_rate_ms;
|
||||
const int32_t d_report_rate_ms;
|
||||
const int32_t d_max_obs_block_rx_clock_offset_ms;
|
||||
|
||||
uint32_t d_nchannels;
|
||||
uint32_t d_signal_enabled_flags;
|
||||
uint32_t d_observable_interval_ms;
|
||||
const uint32_t d_nchannels;
|
||||
const uint32_t d_signal_enabled_flags;
|
||||
const uint32_t d_observable_interval_ms;
|
||||
uint32_t d_pvt_errors_counter;
|
||||
|
||||
bool d_dump;
|
||||
bool d_dump_mat;
|
||||
bool d_rinex_output_enabled;
|
||||
const bool d_dump_mat;
|
||||
const bool d_rinex_output_enabled;
|
||||
bool d_geojson_output_enabled;
|
||||
bool d_gpx_output_enabled;
|
||||
bool d_kml_output_enabled;
|
||||
@@ -276,16 +276,16 @@ private:
|
||||
bool d_rtcm_enabled;
|
||||
bool d_first_fix;
|
||||
bool d_xml_storage;
|
||||
bool d_flag_monitor_pvt_enabled;
|
||||
bool d_flag_monitor_ephemeris_enabled;
|
||||
bool d_show_local_time_zone;
|
||||
bool d_enable_rx_clock_correction;
|
||||
const bool d_flag_monitor_pvt_enabled;
|
||||
const bool d_flag_monitor_ephemeris_enabled;
|
||||
const bool d_show_local_time_zone;
|
||||
const bool d_enable_rx_clock_correction;
|
||||
bool d_enable_has_messages;
|
||||
bool d_an_printer_enabled;
|
||||
const bool d_an_printer_enabled;
|
||||
bool d_log_timetag;
|
||||
bool d_use_has_corrections;
|
||||
bool d_use_unhealthy_sats;
|
||||
bool d_osnma_strict;
|
||||
const bool d_use_has_corrections;
|
||||
const bool d_use_unhealthy_sats;
|
||||
const bool d_osnma_strict;
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@
|
||||
#ifndef GNSS_SDR_RINEX_PRINTER_H
|
||||
#define GNSS_SDR_RINEX_PRINTER_H
|
||||
|
||||
#include "signal_enabled_flags.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cstdint> // for int32_t
|
||||
#include <cstdlib> // for strtol, strtod
|
||||
@@ -72,6 +73,8 @@ class Gps_Navigation_Message;
|
||||
class Gps_Utc_Model;
|
||||
class Rtklib_Solver;
|
||||
|
||||
using Constellation_Observables_Map = std::map<char, std::map<uint32_t, std::map<signal_flag, Gnss_Synchro>>>;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Class that handles the generation of Receiver
|
||||
@@ -83,7 +86,8 @@ public:
|
||||
/*!
|
||||
* \brief Constructor. Creates GNSS Navigation and Observables RINEX files.
|
||||
*/
|
||||
explicit Rinex_Printer(int version = 0,
|
||||
explicit Rinex_Printer(uint32_t signal_enabled_flags,
|
||||
int version = 3,
|
||||
const std::string& base_path = ".",
|
||||
const std::string& base_name = "-",
|
||||
bool pre_2009_file = false);
|
||||
@@ -104,38 +108,32 @@ public:
|
||||
void print_rinex_annotation(const Rtklib_Solver* pvt_solver,
|
||||
const std::map<int, Gnss_Synchro>& gnss_observables_map,
|
||||
double rx_time,
|
||||
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(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Gps_Ephemeris>& new_eph);
|
||||
void log_rinex_nav_gps_nav(const std::map<int32_t, Gps_Ephemeris>& new_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for GPS CNAV message
|
||||
*/
|
||||
void log_rinex_nav_gps_cnav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Gps_CNAV_Ephemeris>& new_cnav_eph);
|
||||
void log_rinex_nav_gps_cnav(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(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Galileo_Ephemeris>& new_gal_eph);
|
||||
void log_rinex_nav_gal_nav(const std::map<int32_t, Galileo_Ephemeris>& new_gal_eph);
|
||||
|
||||
/*!
|
||||
* \brief Print RINEX annotation for Glonass GNAV message
|
||||
*/
|
||||
void log_rinex_nav_glo_gnav(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Glonass_Gnav_Ephemeris>& new_glo_eph);
|
||||
void log_rinex_nav_glo_gnav(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(uint32_t signal_enabled_flags,
|
||||
const std::map<int32_t, Beidou_Dnav_Ephemeris>& new_bds_eph);
|
||||
void log_rinex_nav_bds_dnav(const std::map<int32_t, Beidou_Dnav_Ephemeris>& new_bds_eph);
|
||||
|
||||
/*!
|
||||
* \brief Returns true is the RINEX file headers are already written
|
||||
@@ -164,7 +162,8 @@ public:
|
||||
|
||||
private:
|
||||
// Not the best, but reorder params to select the correct constructor
|
||||
explicit Rinex_Printer(const std::string& base_name,
|
||||
explicit Rinex_Printer(uint32_t signal_enabled_flags,
|
||||
const std::string& base_name,
|
||||
const std::string& base_rinex_path,
|
||||
int version,
|
||||
bool pre_2009_file);
|
||||
@@ -295,7 +294,7 @@ private:
|
||||
void log_rinex_obs(std::fstream& out,
|
||||
const Gps_Ephemeris& eph,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes GPS L2 observables into the RINEX file
|
||||
@@ -303,7 +302,7 @@ private:
|
||||
void log_rinex_obs(std::fstream& out,
|
||||
const Gps_CNAV_Ephemeris& eph,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes dual frequency GPS L1 and L2 observables into the RINEX file
|
||||
@@ -312,8 +311,7 @@ private:
|
||||
const Gps_Ephemeris& eph,
|
||||
const Gps_CNAV_Ephemeris& eph_cnav,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||
bool triple_band = false) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Galileo observables into the RINEX file.
|
||||
@@ -322,8 +320,7 @@ private:
|
||||
void log_rinex_obs(std::fstream& out,
|
||||
const Galileo_Ephemeris& eph,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||
const std::string& galileo_bands = "1B") const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed GPS / Galileo observables into the RINEX file
|
||||
@@ -332,7 +329,7 @@ private:
|
||||
const Gps_Ephemeris& gps_eph,
|
||||
const Galileo_Ephemeris& galileo_eph,
|
||||
double gps_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed GPS / Galileo observables into the RINEX file
|
||||
@@ -341,7 +338,7 @@ private:
|
||||
const Gps_CNAV_Ephemeris& eph,
|
||||
const Galileo_Ephemeris& galileo_eph,
|
||||
double gps_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed GPS / Galileo observables into the RINEX file
|
||||
@@ -351,8 +348,7 @@ private:
|
||||
const Gps_CNAV_Ephemeris& gps_cnav_eph,
|
||||
const Galileo_Ephemeris& galileo_eph,
|
||||
double gps_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||
bool triple_band = false) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes GLONASS GNAV observables into the RINEX file.
|
||||
@@ -361,7 +357,7 @@ private:
|
||||
void log_rinex_obs(std::fstream& out,
|
||||
const Glonass_Gnav_Ephemeris& eph,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file
|
||||
@@ -370,7 +366,7 @@ private:
|
||||
const Gps_Ephemeris& gps_eph,
|
||||
const Glonass_Gnav_Ephemeris& glonass_gnav_eph,
|
||||
double gps_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed GPS L2C - GLONASS observables into the RINEX file
|
||||
@@ -379,7 +375,7 @@ private:
|
||||
const Gps_CNAV_Ephemeris& gps_eph,
|
||||
const Glonass_Gnav_Ephemeris& glonass_gnav_eph,
|
||||
double gps_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes Mixed Galileo/GLONASS observables into the RINEX file
|
||||
@@ -388,7 +384,7 @@ private:
|
||||
const Galileo_Ephemeris& galileo_eph,
|
||||
const Glonass_Gnav_Ephemeris& glonass_gnav_eph,
|
||||
double galileo_obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Writes BDS B1I observables into the RINEX file
|
||||
@@ -396,8 +392,7 @@ private:
|
||||
void log_rinex_obs(std::fstream& out,
|
||||
const Beidou_Dnav_Ephemeris& eph,
|
||||
double obs_time,
|
||||
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||
const std::string& bds_bands) const;
|
||||
const Constellation_Observables_Map& constel_observables) const;
|
||||
|
||||
/*
|
||||
* Generates the GPS L1 C/A Navigation Data header
|
||||
@@ -700,30 +695,23 @@ private:
|
||||
const std::map<std::string, std::string> observationType; // PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
||||
const std::map<std::string, std::string> observationCode; // GNSS observation descriptors
|
||||
|
||||
std::fstream obsFile; // Output file stream for RINEX observation file
|
||||
std::fstream navFile; // Output file stream for RINEX navigation data file
|
||||
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 Beidou navigation data file
|
||||
std::fstream navMixFile; // Output file stream for RINEX Mixed navigation data file
|
||||
|
||||
const std::string navfilename; // Name of RINEX navigation file for GPS L1
|
||||
const std::string obsfilename; // Name of RINEX observation file
|
||||
const std::string sbsfilename; // Name of RINEX SBAS file
|
||||
const std::string navGalfilename; // Name of RINEX navigation file for Galileo
|
||||
const std::string navGlofilename; // Name of RINEX navigation file for Glonass
|
||||
const std::string navBdsfilename; // Name of RINEX navigation file for BeiDou
|
||||
const std::string navMixfilename; // Name of RINEX navigation file for fixed signals
|
||||
std::vector<std::string> output_navfilename; // Name of output RINEX navigation file(s)
|
||||
|
||||
std::string d_stringVersion; // RINEX version (2.10/2.11 or 3.01/3.02)
|
||||
const int d_version; // RINEX version (2 for 2.10/2.11 and 3 for 3.01)
|
||||
const std::string d_stringVersion; // RINEX version (2.10/2.11 or 3.01/3.02)
|
||||
|
||||
double d_fake_cnav_iode;
|
||||
int d_version; // RINEX version (2 for 2.10/2.11 and 3 for 3.01)
|
||||
bool d_rinex_header_updated;
|
||||
bool d_rinex_header_written;
|
||||
const bool d_pre_2009_file;
|
||||
const uint32_t d_signal_enabled_flags;
|
||||
|
||||
const std::string navfilename; // Name of RINEX navigation file
|
||||
const std::string obsfilename; // Name of RINEX observation file
|
||||
const std::string navGlofilename; // Name of RINEX navigation file for Glonass
|
||||
std::vector<std::string> output_navfilename; // Name of output RINEX navigation file(s)
|
||||
|
||||
std::fstream obsFile; // Output file stream for RINEX observation file
|
||||
std::fstream navFile; // Output file stream for RINEX navigation data file
|
||||
std::fstream navGloFile; // Output file stream for RINEX GLONASS navigation data file
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ SignalGenerator::SignalGenerator(const ConfigurationInterface* configuration,
|
||||
}
|
||||
}
|
||||
|
||||
else if (std::find(system.begin(), system.end(), "B") != system.end())
|
||||
else if (std::find(system.begin(), system.end(), "C") != system.end())
|
||||
{
|
||||
vector_length = static_cast<unsigned int>(round(static_cast<float>(fs_in) / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
*/
|
||||
Beidou_Dnav_Almanac()
|
||||
{
|
||||
this->System = 'B';
|
||||
this->System = 'C';
|
||||
};
|
||||
|
||||
int SV_health{}; //!< SV Health
|
||||
|
||||
@@ -26,5 +26,5 @@ Beidou_Dnav_Ephemeris::Beidou_Dnav_Ephemeris()
|
||||
{
|
||||
satelliteBlock[i] = gnss_sat.what_block(_system, i);
|
||||
}
|
||||
this->System = 'B';
|
||||
this->System = 'C';
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ double Gnss_Almanac::predicted_doppler(double rx_time_s,
|
||||
predicted_doppler = 0.0;
|
||||
}
|
||||
}
|
||||
else if (this->System == 'B') // Beidou
|
||||
else if (this->System == 'C') // Beidou
|
||||
{
|
||||
if (band == 1)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ void Gnss_Almanac::satellitePosVelComputation(double transmitTime, std::array<do
|
||||
{
|
||||
n = sqrt(GALILEO_GM / (a * a * a));
|
||||
}
|
||||
else if (this->System == 'B')
|
||||
else if (this->System == 'C')
|
||||
{
|
||||
n = sqrt(BEIDOU_GM / (a * a * a));
|
||||
}
|
||||
@@ -242,7 +242,7 @@ void Gnss_Almanac::satellitePosVelComputation(double transmitTime, std::array<do
|
||||
// Compute the angle between the ascending node and the Greenwich meridian
|
||||
double Omega;
|
||||
double Omega_dot;
|
||||
if (this->System == 'B')
|
||||
if (this->System == 'C')
|
||||
{
|
||||
Omega_dot = this->OMEGAdot * GNSS_PI - BEIDOU_OMEGA_EARTH_DOT;
|
||||
Omega = this->OMEGA_0 * GNSS_PI + Omega_dot * tk - BEIDOU_OMEGA_EARTH_DOT * static_cast<double>(this->toa);
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
double af1{}; //!< Coefficient 1 of code phase offset model [s/s]
|
||||
|
||||
protected:
|
||||
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'B': BeiDou
|
||||
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'C': BeiDou
|
||||
private:
|
||||
double check_t(double time) const;
|
||||
};
|
||||
|
||||
@@ -126,7 +126,7 @@ double Gnss_Ephemeris::predicted_doppler(double rx_time_s,
|
||||
predicted_doppler = 0.0;
|
||||
}
|
||||
}
|
||||
else if (this->System == 'B') // Beidou
|
||||
else if (this->System == 'C') // Beidou
|
||||
{
|
||||
if (band == 1)
|
||||
{
|
||||
@@ -178,7 +178,7 @@ void Gnss_Ephemeris::satellitePosVelComputation(double transmitTime, std::array<
|
||||
{
|
||||
n0 = sqrt(GALILEO_GM / (a * a * a));
|
||||
}
|
||||
else if (this->System == 'B')
|
||||
else if (this->System == 'C')
|
||||
{
|
||||
n0 = sqrt(BEIDOU_GM / (a * a * a));
|
||||
}
|
||||
@@ -252,7 +252,7 @@ void Gnss_Ephemeris::satellitePosVelComputation(double transmitTime, std::array<
|
||||
// Compute the angle between the ascending node and the Greenwich meridian
|
||||
double Omega;
|
||||
double Omega_dot;
|
||||
if (this->System == 'B')
|
||||
if (this->System == 'C')
|
||||
{
|
||||
Omega_dot = this->OMEGAdot - BEIDOU_OMEGA_EARTH_DOT;
|
||||
Omega = this->OMEGA_0 + Omega_dot * tk - BEIDOU_OMEGA_EARTH_DOT * static_cast<double>(this->toe);
|
||||
@@ -292,7 +292,7 @@ void Gnss_Ephemeris::satellitePosVelComputation(double transmitTime, std::array<
|
||||
{
|
||||
pos_vel_dtr[6] -= 2.0 * sqrt(GALILEO_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
||||
}
|
||||
else if (this->System == 'B')
|
||||
else if (this->System == 'C')
|
||||
{
|
||||
pos_vel_dtr[6] -= 2.0 * sqrt(BEIDOU_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
||||
}
|
||||
@@ -333,7 +333,7 @@ double Gnss_Ephemeris::sv_clock_relativistic_term(double transmitTime) const
|
||||
{
|
||||
n0 = sqrt(GALILEO_GM / (a * a * a));
|
||||
}
|
||||
else if (this->System == 'B')
|
||||
else if (this->System == 'C')
|
||||
{
|
||||
n0 = sqrt(BEIDOU_GM / (a * a * a));
|
||||
}
|
||||
@@ -371,7 +371,7 @@ double Gnss_Ephemeris::sv_clock_relativistic_term(double transmitTime) const
|
||||
{
|
||||
dtr_ = GALILEO_F * this->ecc * this->sqrtA * sek;
|
||||
}
|
||||
else if (this->System == 'B')
|
||||
else if (this->System == 'C')
|
||||
{
|
||||
dtr_ = BEIDOU_F * this->ecc * this->sqrtA * sek;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
double satvel_Z{}; //!< Earth-fixed velocity coordinate z of the satellite [m]
|
||||
|
||||
protected:
|
||||
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'B': BeiDou
|
||||
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'C': BeiDou
|
||||
|
||||
private:
|
||||
void satellitePosVelComputation(double transmitTime, std::array<double, 7>& pos_vel_dtr) const;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
private:
|
||||
const std::set<std::string> system_set = {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"};
|
||||
const std::map<std::string, std::string> satelliteSystem = {{"GPS", "G"}, {"Glonass", "R"}, {"SBAS", "S"}, {"Galileo", "E"}, {"Beidou", "C"}};
|
||||
void set_system(const std::string& system); // Sets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}.
|
||||
void set_system(const std::string& system); // Sets the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}.
|
||||
void set_PRN(uint32_t PRN); // Sets satellite's PRN
|
||||
void set_block(const std::string& system_, uint32_t PRN_);
|
||||
void reset();
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
/*!
|
||||
* \brief This class represents a GNSS signal.
|
||||
*
|
||||
* It contains information about the space vehicle and the specific signal.
|
||||
* Encapsulates a specific GNSS signal (e.g., GPS L1 C/A, Galileo E1B) and its
|
||||
* associated satellite.
|
||||
*/
|
||||
class Gnss_Signal
|
||||
{
|
||||
@@ -41,7 +42,17 @@ public:
|
||||
explicit Gnss_Signal(const std::string& signal_);
|
||||
Gnss_Signal(const Gnss_Satellite& satellite_, const std::string& signal_);
|
||||
~Gnss_Signal() = default;
|
||||
std::string get_signal_str() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "L5" for GPS L5, "1G" for GLONASS L1 C/A, "1B" for Galileo E1B, "5X" for Galileo E5a.
|
||||
|
||||
/*!
|
||||
* \brief Return the signal identifier string.
|
||||
*
|
||||
* - GPS: "1C" (L1 C/A), "2S" (L2C), "L5"
|
||||
* - GLONASS: "1G" (L1 C/A), "2G" (L2 C/A)
|
||||
* - Galileo: "1B" (E1B), "5X" (E5a), "7X" (E5b), "6C" (E6C)
|
||||
* - BeiDou: "B1" (B1I), "B3" (B3I)
|
||||
*/
|
||||
std::string get_signal_str() const;
|
||||
|
||||
Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
|
||||
|
||||
friend bool operator==(const Gnss_Signal& /*sig1*/, const Gnss_Signal& /*sig2*/); //!< operator== for comparison
|
||||
|
||||
@@ -143,6 +143,35 @@ void RinexPrinterTest::conf()
|
||||
}
|
||||
|
||||
|
||||
void find_obs_record_lines(const std::string& obsfile, const std::string& sat, std::string& line_epoch, std::string& line_sat)
|
||||
{
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
fstr.seekg(0);
|
||||
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find('>', 0) != std::string::npos)
|
||||
{
|
||||
line_epoch = line_str;
|
||||
}
|
||||
if (line_str.find(sat, 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_sat = line_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fstr.close();
|
||||
}
|
||||
|
||||
|
||||
TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
{
|
||||
Pvt_Conf conf;
|
||||
@@ -158,9 +187,9 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
gs.PRN = 1;
|
||||
gnss_observables_map[1] = std::move(gs);
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -192,9 +221,9 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
|
||||
fs::remove(obsfile);
|
||||
fs::remove(navfile);
|
||||
|
||||
auto rp2 = std::make_shared<Rinex_Printer>();
|
||||
auto rp2 = std::make_shared<Rinex_Printer>(GAL_1B | GAL_E5b);
|
||||
|
||||
rp2->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, GAL_1B | GAL_E5b, true);
|
||||
rp2->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
obsfile = rp2->get_obsfilename();
|
||||
navfile = rp2->get_navfilename()[0];
|
||||
|
||||
@@ -239,9 +268,9 @@ TEST_F(RinexPrinterTest, GlonassObsHeader)
|
||||
gs.PRN = 1;
|
||||
gnss_observables_map[1] = std::move(gs);
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>(3);
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -299,9 +328,9 @@ TEST_F(RinexPrinterTest, MixedObsHeader)
|
||||
gnss_observables_map[1] = gs;
|
||||
gnss_observables_map[2] = std::move(gs);
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -368,9 +397,9 @@ TEST_F(RinexPrinterTest, MixedObsHeaderGpsGlo)
|
||||
gnss_observables_map[1] = gs;
|
||||
gnss_observables_map[2] = std::move(gs);
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
@@ -415,9 +444,6 @@ TEST_F(RinexPrinterTest, MixedObsHeaderGpsGlo)
|
||||
|
||||
TEST_F(RinexPrinterTest, GalileoObsLog)
|
||||
{
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
auto eph = Galileo_Ephemeris();
|
||||
eph.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
@@ -459,34 +485,23 @@ TEST_F(RinexPrinterTest, GalileoObsLog)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(3, gs3));
|
||||
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, signal_enabled_flags, true);
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "E22", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string expected_epoch = "> 1999 08 22 00 00 00.0000000 0 4 ";
|
||||
std::string expected_sat("E22 22000000.000 7 3.724 7 1534.000 7 42.000 ");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("E22", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string expected_str("E22 22000000.000 7 3.724 7 1534.000 7 42.000 ");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(obsfile);
|
||||
fs::remove(navfile);
|
||||
}
|
||||
@@ -494,9 +509,6 @@ TEST_F(RinexPrinterTest, GalileoObsLog)
|
||||
|
||||
TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
{
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
auto eph = Glonass_Gnav_Ephemeris();
|
||||
eph.PRN = 22;
|
||||
Pvt_Conf conf;
|
||||
@@ -517,7 +529,7 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
gs3.System = *sys.c_str();
|
||||
gs4.System = *sys.c_str();
|
||||
|
||||
std::string sig = "1C";
|
||||
std::string sig = "1G";
|
||||
std::memcpy(reinterpret_cast<void*>(gs1.Signal), sig.c_str(), 3);
|
||||
std::memcpy(reinterpret_cast<void*>(gs2.Signal), sig.c_str(), 3);
|
||||
std::memcpy(reinterpret_cast<void*>(gs3.Signal), sig.c_str(), 3);
|
||||
@@ -538,34 +550,23 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(3, gs3));
|
||||
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, signal_enabled_flags, true);
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "R22", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string expected_epoch = "> 1972 12 31 00 00 00.0000000 0 4 ";
|
||||
std::string expected_sat("R22 22000000.000 7 3.724 7 1534.000 7 42.000 ");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("R22", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string expected_str("R22 22000000.000 7 3.724 7 1534.000 7 42.000 ");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(navfile);
|
||||
fs::remove(obsfile);
|
||||
}
|
||||
@@ -573,9 +574,6 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
|
||||
|
||||
TEST_F(RinexPrinterTest, GpsObsLogDualBand)
|
||||
{
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
auto eph = Gps_Ephemeris();
|
||||
auto eph_cnav = Gps_CNAV_Ephemeris();
|
||||
eph.PRN = 1;
|
||||
@@ -632,34 +630,23 @@ TEST_F(RinexPrinterTest, GpsObsLogDualBand)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(3, gs3));
|
||||
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, signal_enabled_flags, true);
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "G08", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string expected_epoch = "> 2019 04 14 00 00 00.0000000 0 3 ";
|
||||
std::string expected_sat("G08 22000002.100 6 7.226 6 321.000 6 39.000 22000000.000 7 3.724 7 1534.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("G08", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string expected_str("G08 22000002.100 6 7.226 6 321.000 6 39.000 22000000.000 7 3.724 7 1534.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(navfile);
|
||||
fs::remove(obsfile);
|
||||
}
|
||||
@@ -720,38 +707,24 @@ TEST_F(RinexPrinterTest, GalileoObsLogDualBand)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(3, gs3));
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(4, gs4));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "E08", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
std::string expected_epoch = "> 1999 08 22 00 00 00.0000000 0 2 ";
|
||||
std::string expected_sat("E08 22000002.100 6 7.226 6 321.000 6 39.000 22000000.000 7 3.724 7 1534.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("E08", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string expected_str("E08 22000002.100 6 7.226 6 321.000 6 39.000 22000000.000 7 3.724 7 1534.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(navfile);
|
||||
fs::remove(obsfile);
|
||||
}
|
||||
@@ -759,16 +732,13 @@ TEST_F(RinexPrinterTest, GalileoObsLogDualBand)
|
||||
|
||||
TEST_F(RinexPrinterTest, MixedObsLog)
|
||||
{
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
auto eph_gps = Gps_Ephemeris();
|
||||
auto eph_gal = Galileo_Ephemeris();
|
||||
eph_gps.PRN = 1;
|
||||
eph_gal.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
const auto signal_enabled_flags = GPS_1C | GAL_1B;
|
||||
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->gps_ephemeris_map[1] = std::move(eph_gps);
|
||||
pvt_solution->galileo_ephemeris_map[1] = std::move(eph_gal);
|
||||
@@ -847,34 +817,24 @@ TEST_F(RinexPrinterTest, MixedObsLog)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(7, gs7));
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(8, gs8));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "E16", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string expected_epoch = "> 2019 04 14 00 00 00.0000000 0 7 ";
|
||||
std::string expected_sat("E16 22000000.000 7 0.127 7 -20.000 7 42.000 22000000.000 6 8.292 6 1534.000 6 41.000");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("E16", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
std::string expected_str("E16 22000000.000 7 0.127 7 -20.000 7 42.000 22000000.000 6 8.292 6 1534.000 6 41.000");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(navfile);
|
||||
fs::remove(obsfile);
|
||||
}
|
||||
@@ -882,16 +842,13 @@ TEST_F(RinexPrinterTest, MixedObsLog)
|
||||
|
||||
TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
|
||||
{
|
||||
std::string line_aux;
|
||||
std::string line_str;
|
||||
bool no_more_finds = false;
|
||||
auto eph_gps = Gps_Ephemeris();
|
||||
auto eph_glo = Glonass_Gnav_Ephemeris();
|
||||
eph_gps.PRN = 1;
|
||||
eph_glo.PRN = 1;
|
||||
Pvt_Conf conf;
|
||||
conf.use_e6_for_pvt = false;
|
||||
const auto signal_enabled_flags = GPS_1C | GLO_1G;
|
||||
const auto signal_enabled_flags = GPS_1C | GLO_1G | GLO_2G;
|
||||
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);
|
||||
@@ -928,6 +885,8 @@ TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
|
||||
std::memcpy(reinterpret_cast<void*>(gs5.Signal), sig.c_str(), 3);
|
||||
std::memcpy(reinterpret_cast<void*>(gs6.Signal), sig.c_str(), 3);
|
||||
std::memcpy(reinterpret_cast<void*>(gs7.Signal), sig.c_str(), 3);
|
||||
|
||||
sig = "2G";
|
||||
std::memcpy(reinterpret_cast<void*>(gs8.Signal), sig.c_str(), 3);
|
||||
|
||||
gs1.PRN = 3;
|
||||
@@ -968,35 +927,24 @@ TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(7, gs7));
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(8, gs8));
|
||||
|
||||
auto rp = std::make_shared<Rinex_Printer>();
|
||||
auto rp = std::make_shared<Rinex_Printer>(signal_enabled_flags);
|
||||
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, signal_enabled_flags, true);
|
||||
rp->print_rinex_annotation(pvt_solution.get(), gnss_observables_map, 0.0, true);
|
||||
|
||||
std::string obsfile = rp->get_obsfilename();
|
||||
std::string navfile = rp->get_navfilename()[0];
|
||||
|
||||
rp = nullptr; // close the RINEX files so we can inspect them
|
||||
|
||||
std::fstream fstr(obsfile.c_str(), std::fstream::in);
|
||||
std::string line_epoch;
|
||||
std::string line_sat;
|
||||
find_obs_record_lines(obsfile, "R16", line_epoch, line_sat);
|
||||
|
||||
fstr.seekg(0);
|
||||
std::string expected_epoch = "> 2019 04 14 00 00 00.0000000 0 7 ";
|
||||
std::string expected_sat("R16 22000000.000 6 8.292 6 1534.000 6 41.000 22000000.000 7 0.127 7 -20.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_epoch.compare(line_epoch));
|
||||
EXPECT_EQ(0, expected_sat.compare(line_sat));
|
||||
|
||||
while (!fstr.eof())
|
||||
{
|
||||
std::getline(fstr, line_str);
|
||||
if (!no_more_finds)
|
||||
{
|
||||
if (line_str.find("R16", 0) != std::string::npos)
|
||||
{
|
||||
no_more_finds = true;
|
||||
line_aux = std::string(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string expected_str("R16 22000000.000 6 8.292 6 1534.000 6 41.000 22000000.000 7 0.127 7 -20.000 7 42.000");
|
||||
EXPECT_EQ(0, expected_str.compare(line_aux));
|
||||
fstr.close();
|
||||
fs::remove(navfile);
|
||||
fs::remove(obsfile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user