1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-05-31 17:52:12 +00:00

Add QZSS in flowgraph, satellite classes. Add empty telemetry decoder adapters

This commit is contained in:
Carles Fernandez
2026-02-24 12:58:51 +01:00
parent f15f431fd3
commit feaf7efffb
9 changed files with 263 additions and 12 deletions
@@ -19,6 +19,8 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES
glonass_l2_ca_telemetry_decoder.cc
beidou_b1i_telemetry_decoder.cc
beidou_b3i_telemetry_decoder.cc
qzss_l1_telemetry_decoder.cc
qzss_l5_telemetry_decoder.cc
)
set(TELEMETRY_DECODER_ADAPTER_HEADERS
@@ -35,6 +37,8 @@ set(TELEMETRY_DECODER_ADAPTER_HEADERS
glonass_l2_ca_telemetry_decoder.h
beidou_b1i_telemetry_decoder.h
beidou_b3i_telemetry_decoder.h
qzss_l1_telemetry_decoder.h
qzss_l5_telemetry_decoder.h
)
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)
@@ -0,0 +1,34 @@
/*!
* \file qzss_l1_telemetry_decoder.cc
* \brief Interface of an adapter of a QZSS L1 NAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2026. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "qzss_l1_telemetry_decoder.h"
//#include "qzss_l1_telemetry_decoder_gs.h"
QzssL1TelemetryDecoder::QzssL1TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams)
: TelemetryDecoderAdapterBase(configuration,
role,
in_streams,
out_streams)
{
// TODO: InitializeDecoder(qzss_l1_make_telemetry_decoder_gs(satellite(), tlm_parameters_));
}
@@ -0,0 +1,56 @@
/*!
* \file qzss_l1_telemetry_decoder.h
* \brief Interface of an adapter of a QZSS L1 NAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2026. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_QZSS_L1_TELEMETRY_DECODER_H
#define GNSS_SDR_QZSS_L1_TELEMETRY_DECODER_H
#include "telemetry_decoder_adapter_base.h"
#include <string>
/** \addtogroup Telemetry_Decoder Telemetry Decoder
* Classes for the decoding of GNSS Navigation messages.
* \{ */
/** \addtogroup Telemetry_Decoder_adapters telemetry_decoder_adapters
* Wrap GNU Radio blocks for the decoding of GNSS Navigation messages with a
* TelemetryDecoderInterface
* \{ */
/*!
* \brief This class implements a NAV data decoder for QZSS L1
*/
class QzssL1TelemetryDecoder : public TelemetryDecoderAdapterBase
{
public:
QzssL1TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
//! Returns "QZSS_L1_Telemetry_Decoder"
inline std::string implementation() override
{
return "QZSS_L1_Telemetry_Decoder";
}
};
/** \} */
/** \} */
#endif // GNSS_SDR_QZSS_L1_TELEMETRY_DECODER_H
@@ -0,0 +1,34 @@
/*!
* \file qzss_l5_telemetry_decoder.cc
* \brief Interface of an adapter of a QZSS L5 NAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2026. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "qzss_l5_telemetry_decoder.h"
//#include "qzss_l5_telemetry_decoder_gs.h"
QzssL5TelemetryDecoder::QzssL5TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams)
: TelemetryDecoderAdapterBase(configuration,
role,
in_streams,
out_streams)
{
// TODO: InitializeDecoder(qzss_l5_make_telemetry_decoder_gs(satellite(), tlm_parameters_));
}
@@ -0,0 +1,56 @@
/*!
* \file qzss_l5_telemetry_decoder.h
* \brief Interface of an adapter of a QZSS L5 NAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2026. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_QZSS_L5_TELEMETRY_DECODER_H
#define GNSS_SDR_QZSS_L5_TELEMETRY_DECODER_H
#include "telemetry_decoder_adapter_base.h"
#include <string>
/** \addtogroup Telemetry_Decoder Telemetry Decoder
* Classes for the decoding of GNSS Navigation messages.
* \{ */
/** \addtogroup Telemetry_Decoder_adapters telemetry_decoder_adapters
* Wrap GNU Radio blocks for the decoding of GNSS Navigation messages with a
* TelemetryDecoderInterface
* \{ */
/*!
* \brief This class implements a NAV data decoder for QZSS L5
*/
class QzssL5TelemetryDecoder : public TelemetryDecoderAdapterBase
{
public:
QzssL5TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
//! Returns "QZSS_L5_Telemetry_Decoder"
inline std::string implementation() override
{
return "QZSS_L5_Telemetry_Decoder";
}
};
/** \} */
/** \} */
#endif // GNSS_SDR_QZSS_L5_TELEMETRY_DECODER_H
+32 -1
View File
@@ -38,6 +38,7 @@
#include "gnss_sdr_make_unique.h"
#include "gnss_synchro_monitor.h"
#include "nav_message_monitor.h"
#include "qzss.h"
#include "signal_source_interface.h"
#include <boost/lexical_cast.hpp> // for boost::lexical_cast
#include <boost/tokenizer.hpp> // for boost::tokenizer
@@ -90,6 +91,8 @@ const auto signal_mapping = std::unordered_map<std::string, std::pair<std::strin
{"B3", {"Beidou", "B3"}},
{"1G", {"Glonass", "L1"}},
{"2G", {"Glonass", "L2"}},
{"J1", {"QZSS", "L1"}},
{"J5", {"QZSS", "L5"}},
};
} // namespace
@@ -232,6 +235,8 @@ void GNSSFlowgraph::init()
mapStringValues_["2G"] = evGLO_2G;
mapStringValues_["B1"] = evBDS_B1;
mapStringValues_["B3"] = evBDS_B3;
mapStringValues_["J1"] = evQZSS_J1;
mapStringValues_["J5"] = evQZSS_J5;
// fill the signals queue with the satellites ID's to be searched by the acquisition
set_signals_list();
@@ -1147,6 +1152,12 @@ int GNSSFlowgraph::connect_signal_conditioners_to_channels()
case evBDS_B3:
acq_fs = fs;
break;
case evQZSS_J1:
acq_fs = QZSS_L1_OPT_ACQ_FS_SPS;
break;
case evQZSS_J5:
acq_fs = QZSS_L5_OPT_ACQ_FS_SPS;
break;
default:
break;
}
@@ -1675,6 +1686,9 @@ double GNSSFlowgraph::project_doppler(const std::string& searched_signal, double
case evGAL_E6:
return (primary_freq_doppler_hz / FREQ1) * FREQ6;
break;
case evQZSS_J5:
return (primary_freq_doppler_hz / FREQ1) * FREQ5;
break;
default:
return primary_freq_doppler_hz;
}
@@ -1912,7 +1926,10 @@ void GNSSFlowgraph::priorize_satellites(const std::vector<std::pair<int, Gnss_Sa
{
signal_str_vector = {"1B", "5X", "7X", "E6"};
}
else if (visible_satellite.second.get_system() == "QZSS")
{
signal_str_vector = {"J1", "J5"};
}
for (const auto& signal_str : signal_str_vector)
{
auto& available_signals = available_signals_map_.at(signal_str);
@@ -2017,6 +2034,7 @@ void GNSSFlowgraph::set_signals_list()
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63}},
{"QZSS", {193, 194, 195, 196, 197, 199, 200, 201}},
};
#if CXX_LESS_THAN_17
for (auto& entry : available_prn_map)
@@ -2175,6 +2193,14 @@ bool GNSSFlowgraph::is_multiband() const
multiband = true;
}
}
if (configuration_->property("Channels_J1.count", 0) > 0)
{
if (configuration_->property("Channels_J5.count", 0) > 0)
{
multiband = true;
}
}
return multiband;
}
@@ -2217,9 +2243,14 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
case evGAL_1B:
case evGLO_1G:
case evBDS_B1:
case evQZSS_J1:
is_primary_frequency = true;
break;
case evQZSS_J5:
assist_signal = "J1";
break;
default:
break;
}
+3 -1
View File
@@ -261,7 +261,9 @@ private:
evGLO_1G,
evGLO_2G,
evBDS_B1,
evBDS_B3
evBDS_B3,
evQZSS_J1,
evQZSS_J5
};
std::map<std::string, StringValue> mapStringValues_;
+39 -5
View File
@@ -158,7 +158,7 @@ Gnss_Satellite& Gnss_Satellite::operator=(Gnss_Satellite&& other) noexcept
void Gnss_Satellite::set_system(const std::string& system_)
{
// Set the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Compass"}
// Set the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou", "QZSS"}
auto it = system_set.find(system_);
if (it != system_set.cend())
@@ -167,7 +167,7 @@ void Gnss_Satellite::set_system(const std::string& system_)
}
else
{
DLOG(INFO) << "System " << system_ << " is not defined {GPS, Glonass, SBAS, Galileo, Beidou}. Initialization?";
DLOG(INFO) << "System " << system_ << " is not defined {GPS, Glonass, SBAS, Galileo, Beidou, QZSS}. Initialization?";
system = std::string("");
}
}
@@ -269,7 +269,18 @@ void Gnss_Satellite::set_PRN(uint32_t PRN_)
PRN = PRN_;
}
}
else if (system == "QZSS")
{
if (PRN_ < 193 or PRN_ > 201)
{
DLOG(INFO) << "This PRN is not defined";
PRN = 0;
}
else
{
PRN = PRN_;
}
}
else
{
DLOG(INFO) << "System " << system << " is not defined";
@@ -303,7 +314,7 @@ uint32_t Gnss_Satellite::get_PRN() const
std::string Gnss_Satellite::get_system() const
{
// Get the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}
// Get the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou", "QZSS"}
std::string system_ = system;
return system_;
}
@@ -311,7 +322,7 @@ std::string Gnss_Satellite::get_system() const
std::string Gnss_Satellite::get_system_short() const
{
// Get the satellite system {"G", "R", "S", "E", "C"}
// Get the satellite system {"G", "R", "S", "E", "C", "Q"}
return satelliteSystem.at(system);
}
@@ -817,6 +828,29 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
block_ = std::string("Unknown");
}
}
if (system_ == "QZSS")
{
switch (PRN_)
{
case 193:
block_ = std::string("QZSS Block I"); // QZSS-1 (Michibiki-1), launched on September 11, 2010.
break;
case 194:
block_ = std::string("QZSS Block II"); // QZSS-2 (Michibiki-2)
break;
case 195:
block_ = std::string("QZSS Block II"); // QZSS-3 (Michibiki-3)
break;
case 196:
block_ = std::string("QZSS Block II"); // QZSS-4 (Michibiki-4)
break;
case 197:
block_ = std::string("QZSS Block III"); // QZSS-1R (Michibiki-1R)
break;
default:
block_ = std::string("Unknown");
}
}
return block_;
}
+5 -5
View File
@@ -54,15 +54,15 @@ public:
void update_PRN(uint32_t PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
uint32_t get_PRN() const; //!< Gets satellite's PRN
int32_t get_rf_link() const; //!< Gets the satellite's rf link
std::string get_system() const; //!< Gets the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_system() const; //!< Gets the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou", "QZSS"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C", "Q"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}
std::string what_block(const std::string& system_, uint32_t PRN_); //!< Gets the block of a given satellite
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"}.
const std::set<std::string> system_set = {"GPS", "Glonass", "SBAS", "Galileo", "Beidou", "QZSS"};
const std::map<std::string, std::string> satelliteSystem = {{"GPS", "G"}, {"Glonass", "R"}, {"SBAS", "S"}, {"Galileo", "E"}, {"Beidou", "C"}, {"QZSS", "Q"}};
void set_system(const std::string& system); // Sets the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou", "QZSS"}.
void set_PRN(uint32_t PRN); // Sets satellite's PRN
void set_block(const std::string& system_, uint32_t PRN_);
void reset();