From 7ec78710b46dfc5051f72b2095381693f82a6ab0 Mon Sep 17 00:00:00 2001 From: Mathieu Favreau Date: Thu, 8 May 2025 13:07:46 +0000 Subject: [PATCH 1/3] Cleanup receiver type --- src/algorithms/PVT/adapters/CMakeLists.txt | 6 +- src/algorithms/PVT/adapters/receiver_type.cc | 274 +++++++++++++++ src/algorithms/PVT/adapters/receiver_type.h | 134 +++++++ src/algorithms/PVT/adapters/rtklib_pvt.cc | 351 ++----------------- 4 files changed, 435 insertions(+), 330 deletions(-) create mode 100644 src/algorithms/PVT/adapters/receiver_type.cc create mode 100644 src/algorithms/PVT/adapters/receiver_type.h diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index 415fb13d4..673b09055 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -10,12 +10,14 @@ if(USE_CMAKE_TARGET_SOURCES) target_sources(pvt_adapters PRIVATE rtklib_pvt.cc + receiver_type.cc PUBLIC rtklib_pvt.h + receiver_type.h ) else() - source_group(Headers FILES rtklib_pvt.h) - add_library(pvt_adapters rtklib_pvt.cc rtklib_pvt.h) + source_group(Headers FILES rtklib_pvt.h receiver_type.h) + add_library(pvt_adapters rtklib_pvt.cc rtklib_pvt.h receiver_type.h receiver_type.cc) endif() target_link_libraries(pvt_adapters diff --git a/src/algorithms/PVT/adapters/receiver_type.cc b/src/algorithms/PVT/adapters/receiver_type.cc new file mode 100644 index 000000000..829b5188b --- /dev/null +++ b/src/algorithms/PVT/adapters/receiver_type.cc @@ -0,0 +1,274 @@ +/*! + * \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 // for vector + +Signal_Enabled_Flags::Signal_Enabled_Flags(const ConfigurationInterface* configuration) : flags_(0) +{ + const std::vector> 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& [flag, prop] : signal_flag_to_prop) + { + 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; +} \ No newline at end of file diff --git a/src/algorithms/PVT/adapters/receiver_type.h b/src/algorithms/PVT/adapters/receiver_type.h new file mode 100644 index 000000000..3f4edd53a --- /dev/null +++ b/src/algorithms/PVT/adapters/receiver_type.h @@ -0,0 +1,134 @@ +/*! + * \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 + +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); + + template + bool check_only_enabled(const Args&... args) const + { + return (flags_ ^ (args | ...)) == 0; + } + + template + bool check_any_enabled(const Args&... args) const + { + return (flags_ & (args | ...)) > 0; + } + +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 + * 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 + * 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 + */ + +uint32_t get_type_of_receiver(const Signal_Enabled_Flags& signal_enabled_flags); + +#endif // GNSS_SDR_RECEIVER_TYPE_H diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 51b3977a1..734e2c5f1 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -16,18 +16,17 @@ #include "rtklib_pvt.h" -#include "MATH_CONSTANTS.h" // for D2R -#include "configuration_interface.h" // for ConfigurationInterface -#include "galileo_almanac.h" // for Galileo_Almanac -#include "galileo_ephemeris.h" // for Galileo_Ephemeris -#include "gnss_sdr_flags.h" // for FLAGS_RINEX_version -#include "gnss_sdr_string_literals.h" // for std::string_literals -#include "gps_almanac.h" // for Gps_Almanac -#include "gps_ephemeris.h" // for Gps_Ephemeris -#include "pvt_conf.h" // for Pvt_Conf -#include "rtklib_rtkpos.h" // for rtkfree, rtkinit -#include // for std::cout -#include // for std::move +#include "MATH_CONSTANTS.h" // for D2R +#include "configuration_interface.h" // for ConfigurationInterface +#include "galileo_almanac.h" // for Galileo_Almanac +#include "galileo_ephemeris.h" // for Galileo_Ephemeris +#include "gnss_sdr_flags.h" // for FLAGS_RINEX_version +#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 // for std::cout #if USE_GLOG_AND_GFLAGS #include #else @@ -186,312 +185,8 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, pvt_output_parameters.nmea_rate_ms = bc::lcm(configuration->property(role + ".nmea_rate_ms", pvt_output_parameters.nmea_rate_ms), pvt_output_parameters.output_rate_ms); pvt_output_parameters.an_rate_ms = configuration->property(role + ".an_rate_ms", pvt_output_parameters.an_rate_ms); - // 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 - * 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 - * 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 - */ - const int gps_1C_count = configuration->property("Channels_1C.count", 0); - const int gps_2S_count = configuration->property("Channels_2S.count", 0); - const int gps_L5_count = configuration->property("Channels_L5.count", 0); - const int gal_1B_count = configuration->property("Channels_1B.count", 0); - const int gal_E5a_count = configuration->property("Channels_5X.count", 0); - const int gal_E5b_count = configuration->property("Channels_7X.count", 0); - const int gal_E6_count = configuration->property("Channels_E6.count", 0); - const int glo_1G_count = configuration->property("Channels_1G.count", 0); - const int glo_2G_count = configuration->property("Channels_2G.count", 0); - const int bds_B1_count = configuration->property("Channels_B1.count", 0); - const int bds_B3_count = configuration->property("Channels_B3.count", 0); - - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 1; // L1 - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 2; // GPS L2C - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 3; // L5 - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 4; // E1 - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 5; // E5a - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 6; - } - if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 7; // GPS L1 C/A + GPS L2C - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 8; // L1+L5 - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 9; // L1+E1 - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 10; // GPS L1 C/A + Galileo E5a - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 11; - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 12; // Galileo E1B + GPS L2C - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 13; // L5+E5a - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 14; // Galileo E1B + Galileo E5a - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 15; - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 16; // GPS L2C + GPS L5 - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 17; // GPS L2C + Galileo E5a - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 18; // GPS L2C + Galileo E5b - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 19; // Galileo E5a + Galileo E5b - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 20; // GPS L5 + Galileo E5b - } - if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 21; // GPS L1 C/A + Galileo E1B + GPS L2C - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 22; // GPS L1 C/A + Galileo E1B + GPS L5 - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 23; // GLONASS L1 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 24; // GLONASS L2 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 25; // GLONASS L1 C/A + GLONASS L2 C/A - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 26; // GPS L1 C/A + GLONASS L1 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 27; // Galileo E1B + GLONASS L1 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 28; // GPS L2C + GLONASS L1 C/A - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 29; // GPS L1 C/A + GLONASS L2 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 30; // Galileo E1B + GLONASS L2 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 31; // GPS L2C + GLONASS L2 C/A - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 33; // L1+E1+E5a - } - // Galileo E6 - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 100; // Galileo E6B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 101; // Galileo E1B + Galileo E6B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 102; // Galileo E5a + Galileo E6B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 103; // Galileo E5b + Galileo E6B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 104; // Galileo E1B + Galileo E5a + Galileo E6B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 105; // Galileo E1B + Galileo E5b + Galileo E6B - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 106; // GPS L1 C/A + Galileo E1B + Galileo E6B - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 107; // GPS L1 C/A + Galileo E6B - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 108; // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B - } - // BeiDou B1I Receiver - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 500; // Beidou B1I - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 501; // Beidou B1I + GPS L1 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 502; // Beidou B1I + Galileo E1B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 503; // Beidou B1I + GLONASS L1 C/A - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 504; // Beidou B1I + GPS L1 C/A + Galileo E1B - } - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 505; // Beidou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count != 0)) - { - pvt_output_parameters.type_of_receiver = 506; // Beidou B1I + Beidou B3I - } - // BeiDou B3I Receiver - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) - { - pvt_output_parameters.type_of_receiver = 600; // Beidou B3I - } - if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) - { - pvt_output_parameters.type_of_receiver = 601; // Beidou B3I + GPS L2C - } - if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) - { - pvt_output_parameters.type_of_receiver = 602; // Beidou B3I + GLONASS L2 C/A - } - if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) - { - pvt_output_parameters.type_of_receiver = 603; // Beidou B3I + GPS L2C + GLONASS L2 C/A - } - if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 1000; // GPS L1 + GPS L2C + GPS L5 - } - if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) - { - pvt_output_parameters.type_of_receiver = 1001; // GPS L1 + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a - } + const Signal_Enabled_Flags signal_enabled_flags(configuration); + pvt_output_parameters.type_of_receiver = get_type_of_receiver(signal_enabled_flags); // RTKLIB PVT solver options // Settings 1 @@ -532,23 +227,23 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, int num_bands = 0; - if ((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) + if (signal_enabled_flags.check_any_enabled(GPS_1C, GAL_1B, GLO_1G, BDS_B1)) { num_bands += 1; } - if ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)) + if (signal_enabled_flags.check_any_enabled(GPS_2S, GLO_2G, BDS_B3)) { num_bands += 1; } - if (gal_E6_count > 0) + if (signal_enabled_flags.check_any_enabled(GAL_E6)) { num_bands += 1; } - if ((gal_E5a_count > 0) || (gps_L5_count > 0)) + if (signal_enabled_flags.check_any_enabled(GAL_E5a, GPS_L5)) { num_bands += 1; } - if (gal_E5b_count > 0) + if (signal_enabled_flags.check_any_enabled(GAL_E5b)) { num_bands += 1; } @@ -672,19 +367,19 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, const int earth_tide = configuration->property(role + ".earth_tide", 0); int nsys = 0; - if ((gps_1C_count > 0) || (gps_2S_count > 0) || (gps_L5_count > 0)) + if (signal_enabled_flags.check_any_enabled(GPS_1C, GPS_2S, GPS_L5)) { nsys += SYS_GPS; } - if ((gal_1B_count > 0) || (gal_E5a_count > 0) || (gal_E5b_count > 0) || (gal_E6_count > 0)) + if (signal_enabled_flags.check_any_enabled(GAL_1B, GAL_E5a, GAL_E5b, GAL_E6)) { nsys += SYS_GAL; } - if ((glo_1G_count > 0) || (glo_2G_count > 0)) + if (signal_enabled_flags.check_any_enabled(GLO_1G, GLO_2G)) { nsys += SYS_GLO; } - if ((bds_B1_count > 0) || (bds_B3_count > 0)) + if (signal_enabled_flags.check_any_enabled(BDS_B1, BDS_B3)) { nsys += SYS_BDS; } @@ -921,7 +616,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, pvt_output_parameters.use_unhealthy_sats = configuration->property(role + ".use_unhealthy_sats", pvt_output_parameters.use_unhealthy_sats); // OSNMA - if (gal_1B_count > 0) + if (signal_enabled_flags.check_any_enabled(GAL_1B) > 0) { std::string osnma_mode = configuration->property("GNSS-SDR.osnma_mode", std::string("")); bool enable_osnma = configuration->property("GNSS-SDR.osnma_enable", true); From 00ee67a854bf11187233f9b9009cdfc87aa35d8a Mon Sep 17 00:00:00 2001 From: Mathieu Favreau Date: Thu, 8 May 2025 13:09:43 +0000 Subject: [PATCH 2/3] New line --- src/algorithms/PVT/adapters/receiver_type.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/PVT/adapters/receiver_type.cc b/src/algorithms/PVT/adapters/receiver_type.cc index 829b5188b..1e056d117 100644 --- a/src/algorithms/PVT/adapters/receiver_type.cc +++ b/src/algorithms/PVT/adapters/receiver_type.cc @@ -271,4 +271,4 @@ uint32_t get_type_of_receiver(const Signal_Enabled_Flags& signal_enabled_flags) } return 0; -} \ No newline at end of file +} From 718efb6a66991837d9b0ea9f5a3cfbaf27ff3b92 Mon Sep 17 00:00:00 2001 From: Mathieu Favreau Date: Thu, 8 May 2025 13:59:38 +0000 Subject: [PATCH 3/3] Update definition --- src/algorithms/PVT/adapters/receiver_type.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/algorithms/PVT/adapters/receiver_type.h b/src/algorithms/PVT/adapters/receiver_type.h index 3f4edd53a..b6862614c 100644 --- a/src/algorithms/PVT/adapters/receiver_type.h +++ b/src/algorithms/PVT/adapters/receiver_type.h @@ -104,6 +104,7 @@ private: * 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 @@ -117,13 +118,6 @@ private: * 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