mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-30 22:56:22 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into osnma
This commit is contained in:
commit
4b68641daf
@ -57,6 +57,8 @@ All notable changes to GNSS-SDR will be documented in this file.
|
|||||||
- Now the program exits properly if a SIGINT signal is received (_e.g._, the
|
- Now the program exits properly if a SIGINT signal is received (_e.g._, the
|
||||||
user pressing Ctrl+C, or another user application sending an interruption
|
user pressing Ctrl+C, or another user application sending an interruption
|
||||||
signal).
|
signal).
|
||||||
|
- The estimated CN0 value is now printed in the terminal when navigation data is
|
||||||
|
succesfully decoded.
|
||||||
|
|
||||||
## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06
|
## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdlib> // for abs
|
#include <cstdlib> // for abs
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr, make_shared
|
#include <memory> // for shared_ptr, make_shared
|
||||||
|
|
||||||
@ -239,7 +240,7 @@ void beidou_b1i_telemetry_decoder_gs::decode_word(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols, double cn0)
|
||||||
{
|
{
|
||||||
// 1. Transform from symbols to bits
|
// 1. Transform from symbols to bits
|
||||||
std::string data_bits;
|
std::string data_bits;
|
||||||
@ -296,32 +297,49 @@ void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
const std::shared_ptr<Beidou_Dnav_Ephemeris> tmp_obj = std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
|
const std::shared_ptr<Beidou_Dnav_Ephemeris> tmp_obj = std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
std::cout << "New BEIDOU B1I DNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New BEIDOU B1I DNAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << " dB-Hz" << std::endl;
|
||||||
|
std::cout << std::setprecision(default_precision); // restore defaults
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
const std::shared_ptr<Beidou_Dnav_Utc_Model> tmp_obj = std::make_shared<Beidou_Dnav_Utc_Model>(d_nav.get_utc_model());
|
const std::shared_ptr<Beidou_Dnav_Utc_Model> tmp_obj = std::make_shared<Beidou_Dnav_Utc_Model>(d_nav.get_utc_model());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "BEIDOU DNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
std::cout << "New BEIDOU B1I DNAV utc model message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New BEIDOU B1I DNAV utc model message received in channel "
|
||||||
|
<< d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_iono() == true)
|
if (d_nav.have_new_iono() == true)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
const std::shared_ptr<Beidou_Dnav_Iono> tmp_obj = std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
|
const std::shared_ptr<Beidou_Dnav_Iono> tmp_obj = std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Iono data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "BEIDOU DNAV Iono data have been received in channel" << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
std::cout << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel << ": Iono model parameters from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel
|
||||||
|
<< ": Iono model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_almanac() == true)
|
if (d_nav.have_new_almanac() == true)
|
||||||
{
|
{
|
||||||
// uint32_t slot_nbr = d_nav.i_alm_satellite_PRN;
|
// uint32_t slot_nbr = d_nav.i_alm_satellite_PRN;
|
||||||
// std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj = std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
// std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj = std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
||||||
// this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
// this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Almanac data have been received in channel" << d_channel << " from satellite " << d_satellite << '\n';
|
LOG(INFO) << "BEIDOU DNAV Almanac data have been received in channel" << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
std::cout << "New BEIDOU B1I DNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New BEIDOU B1I DNAV almanac received in channel " << d_channel
|
||||||
|
<< " from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,7 +524,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_subframe(d_subframe_symbols.data());
|
decode_subframe(d_subframe_symbols.data(), current_symbol.CN0_dB_hz);
|
||||||
|
|
||||||
if (d_nav.get_flag_CRC_test() == true)
|
if (d_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
@ -563,7 +581,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_subframe(d_subframe_symbols.data());
|
decode_subframe(d_subframe_symbols.data(), current_symbol.CN0_dB_hz);
|
||||||
|
|
||||||
if (d_nav.get_flag_CRC_test() == true)
|
if (d_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ private:
|
|||||||
|
|
||||||
beidou_b1i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
beidou_b1i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
||||||
|
|
||||||
void decode_subframe(float *symbols);
|
void decode_subframe(float *symbols, double cn0);
|
||||||
void decode_word(int32_t word_counter, const float *enc_word_symbols, int32_t *dec_word_symbols);
|
void decode_word(int32_t word_counter, const float *enc_word_symbols, int32_t *dec_word_symbols);
|
||||||
void decode_bch15_11_01(const int32_t *bits, std::array<int32_t, 15> &decbits);
|
void decode_bch15_11_01(const int32_t *bits, std::array<int32_t, 15> &decbits);
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdlib> // for abs
|
#include <cstdlib> // for abs
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr, make_shared
|
#include <memory> // for shared_ptr, make_shared
|
||||||
|
|
||||||
@ -239,7 +240,7 @@ void beidou_b3i_telemetry_decoder_gs::decode_word(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols, double cn0)
|
||||||
{
|
{
|
||||||
// 1. Transform from symbols to bits
|
// 1. Transform from symbols to bits
|
||||||
std::string data_bits;
|
std::string data_bits;
|
||||||
@ -278,12 +279,12 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
if (crc_ok)
|
if (crc_ok)
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "BeiDou DNAV CRC correct in channel " << d_channel
|
DLOG(INFO) << "BeiDou DNAV CRC correct in channel " << d_channel
|
||||||
<< " from satellite " << d_satellite;
|
<< " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "BeiDou DNAV CRC error in channel " << d_channel
|
DLOG(INFO) << "BeiDou DNAV CRC error in channel " << d_channel
|
||||||
<< " from satellite " << d_satellite;
|
<< " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
}
|
}
|
||||||
if (d_dump_crc_stats)
|
if (d_dump_crc_stats)
|
||||||
{
|
{
|
||||||
@ -298,9 +299,12 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
|
std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel"
|
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel"
|
||||||
<< d_channel << " from satellite " << d_satellite;
|
<< d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV message received in channel " << d_channel
|
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV message received in channel " << d_channel
|
||||||
<< ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
@ -310,9 +314,12 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV UTC Model data have been received in channel"
|
LOG(INFO) << "BEIDOU DNAV UTC Model data have been received in channel"
|
||||||
<< d_channel << " from satellite " << d_satellite;
|
<< d_channel << " from satellite " << d_satellite;
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV utc model message received in channel "
|
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV utc model message received in channel "
|
||||||
<< d_channel << ": UTC model parameters from satellite "
|
<< d_channel << ": UTC model parameters from satellite "
|
||||||
<< d_satellite << TEXT_RESET << '\n';
|
<< d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_iono() == true)
|
if (d_nav.have_new_iono() == true)
|
||||||
{
|
{
|
||||||
@ -321,10 +328,12 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
|
std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Iono data have been received in channel" << d_channel
|
LOG(INFO) << "BEIDOU DNAV Iono data have been received in channel" << d_channel
|
||||||
<< " from satellite " << d_satellite;
|
<< " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV Iono message received in channel "
|
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV Iono message received in channel "
|
||||||
<< d_channel << ": Iono model parameters from satellite "
|
<< d_channel << ": Iono model parameters from satellite "
|
||||||
<< d_satellite << TEXT_RESET << '\n';
|
<< d_satellite << " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_almanac() == true)
|
if (d_nav.have_new_almanac() == true)
|
||||||
{
|
{
|
||||||
@ -334,9 +343,12 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
|
|||||||
// this->message_port_pub(pmt::mp("telemetry"),
|
// this->message_port_pub(pmt::mp("telemetry"),
|
||||||
// pmt::make_any(tmp_obj));
|
// pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "BEIDOU DNAV Almanac data have been received in channel"
|
LOG(INFO) << "BEIDOU DNAV Almanac data have been received in channel"
|
||||||
<< d_channel << " from satellite " << d_satellite << '\n';
|
<< d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV almanac received in channel " << d_channel
|
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV almanac received in channel " << d_channel
|
||||||
<< " from satellite " << d_satellite << TEXT_RESET << '\n';
|
<< " from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +542,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_subframe(d_subframe_symbols.data());
|
decode_subframe(d_subframe_symbols.data(), current_symbol.CN0_dB_hz);
|
||||||
|
|
||||||
if (d_nav.get_flag_CRC_test() == true)
|
if (d_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
@ -590,7 +602,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_subframe(d_subframe_symbols.data());
|
decode_subframe(d_subframe_symbols.data(), current_symbol.CN0_dB_hz);
|
||||||
|
|
||||||
if (d_nav.get_flag_CRC_test() == true)
|
if (d_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ private:
|
|||||||
|
|
||||||
beidou_b3i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
beidou_b3i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
||||||
|
|
||||||
void decode_subframe(float *symbols);
|
void decode_subframe(float *symbols, double cn0);
|
||||||
void decode_word(int32_t word_counter, const float *enc_word_symbols,
|
void decode_word(int32_t word_counter, const float *enc_word_symbols,
|
||||||
int32_t *dec_word_symbols);
|
int32_t *dec_word_symbols);
|
||||||
void decode_bch15_11_01(const int32_t *bits, std::array<int32_t, 15> &decbits);
|
void decode_bch15_11_01(const int32_t *bits, std::array<int32_t, 15> &decbits);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <cmath> // for std::fmod, std::abs
|
#include <cmath> // for std::fmod, std::abs
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <exception> // for std::exception
|
#include <exception> // for std::exception
|
||||||
|
#include <iomanip> // for std::setprecision
|
||||||
#include <iostream> // for std::cout
|
#include <iostream> // for std::cout
|
||||||
#include <limits> // for std::numeric_limits
|
#include <limits> // for std::numeric_limits
|
||||||
#include <map> // for std::map
|
#include <map> // for std::map
|
||||||
@ -358,7 +359,7 @@ void galileo_telemetry_decoder_gs::deinterleaver(int32_t rows, int32_t cols, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, int32_t frame_length)
|
void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, int32_t frame_length, double cn0)
|
||||||
{
|
{
|
||||||
// 1. De-interleave
|
// 1. De-interleave
|
||||||
std::vector<float> page_part_symbols_soft_value(frame_length);
|
std::vector<float> page_part_symbols_soft_value(frame_length);
|
||||||
@ -439,11 +440,20 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
|
|||||||
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_inav_nav.get_ephemeris());
|
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_inav_nav.get_ephemeris());
|
||||||
if (d_band == '1')
|
if (d_band == '1')
|
||||||
{
|
{
|
||||||
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
else if (d_band == '7')
|
else if (d_band == '7')
|
||||||
{
|
{
|
||||||
std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE
|
||||||
|
<< "New Galileo E5b I/NAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
d_first_eph_sent = true; // do not send reduced CED anymore, since we have the full ephemeris set
|
d_first_eph_sent = true; // do not send reduced CED anymore, since we have the full ephemeris set
|
||||||
@ -454,8 +464,12 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
|
|||||||
if ((d_band == '1') && d_use_ced && !d_first_eph_sent && (d_inav_nav.have_new_reduced_ced() == true))
|
if ((d_band == '1') && d_use_ced && !d_first_eph_sent && (d_inav_nav.have_new_reduced_ced() == true))
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_inav_nav.get_reduced_ced());
|
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_inav_nav.get_reduced_ced());
|
||||||
std::cout << "New Galileo E1 I/NAV reduced CED message received in channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New Galileo E1 I/NAV reduced CED message received in channel "
|
||||||
|
<< d_channel << " from satellite " << d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,30 +477,48 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
|
|||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
const std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_inav_nav.get_iono());
|
const std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_inav_nav.get_iono());
|
||||||
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
if (d_band == '1')
|
if (d_band == '1')
|
||||||
{
|
{
|
||||||
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel
|
||||||
|
<< ": iono/GST model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
else if (d_band == '7')
|
else if (d_band == '7')
|
||||||
{
|
{
|
||||||
std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel "
|
||||||
|
<< d_channel << ": iono/GST model parameters from satellite "
|
||||||
|
<< d_satellite << " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_inav_nav.have_new_utc_model() == true)
|
if (d_inav_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
const std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_inav_nav.get_utc_model());
|
const std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_inav_nav.get_utc_model());
|
||||||
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
if (d_band == '1')
|
if (d_band == '1')
|
||||||
{
|
{
|
||||||
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
else if (d_band == '7')
|
else if (d_band == '7')
|
||||||
{
|
{
|
||||||
std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel "
|
||||||
|
<< d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
|
||||||
d_delta_t = tmp_obj->A_0G + tmp_obj->A_1G * (static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0 - tmp_obj->t_0G + 604800 * (std::fmod(static_cast<float>(d_inav_nav.get_Galileo_week() - tmp_obj->WN_0G), 64.0)));
|
d_delta_t = tmp_obj->A_0G + tmp_obj->A_1G * (static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0 - tmp_obj->t_0G + 604800 * (std::fmod(static_cast<float>(d_inav_nav.get_Galileo_week() - tmp_obj->WN_0G), 64.0)));
|
||||||
DLOG(INFO) << "delta_t=" << d_delta_t << "[s]";
|
DLOG(INFO) << "delta_t=" << d_delta_t << "[s]";
|
||||||
}
|
}
|
||||||
@ -498,11 +530,18 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
|
|||||||
// debug
|
// debug
|
||||||
if (d_band == '1')
|
if (d_band == '1')
|
||||||
{
|
{
|
||||||
std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel
|
||||||
|
<< " from satellite " << d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision) << " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
else if (d_band == '7')
|
else if (d_band == '7')
|
||||||
{
|
{
|
||||||
std::cout << TEXT_BLUE << "Galileo E5b I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << std::endl;
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "Galileo E5b I/NAV almanac received in channel "
|
||||||
|
<< d_channel << " from satellite " << d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
DLOG(INFO) << "Current parameters:";
|
DLOG(INFO) << "Current parameters:";
|
||||||
DLOG(INFO) << "d_TOW_at_current_symbol_ms=" << d_TOW_at_current_symbol_ms;
|
DLOG(INFO) << "d_TOW_at_current_symbol_ms=" << d_TOW_at_current_symbol_ms;
|
||||||
@ -517,7 +556,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t frame_length)
|
void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t frame_length, double cn0)
|
||||||
{
|
{
|
||||||
// 1. De-interleave
|
// 1. De-interleave
|
||||||
std::vector<float> page_symbols_soft_value(frame_length);
|
std::vector<float> page_symbols_soft_value(frame_length);
|
||||||
@ -561,38 +600,51 @@ void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t
|
|||||||
d_fnav_nav.split_page(page_String);
|
d_fnav_nav.split_page(page_String);
|
||||||
if (d_fnav_nav.get_flag_CRC_test() == true)
|
if (d_fnav_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "Galileo E5a CRC correct in channel " << d_channel << " from satellite " << d_satellite;
|
DLOG(INFO) << "Galileo E5a CRC correct in channel " << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "Galileo E5a CRC error in channel " << d_channel << " from satellite " << d_satellite;
|
DLOG(INFO) << "Galileo E5a CRC error in channel " << d_channel << " from satellite " << d_satellite << " with CN0=" << cn0 << " dB-Hz";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Push the new navigation data to the queues
|
// 4. Push the new navigation data to the queues
|
||||||
if (d_fnav_nav.have_new_ephemeris() == true)
|
if (d_fnav_nav.have_new_ephemeris() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_fnav_nav.get_ephemeris());
|
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_fnav_nav.get_ephemeris());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel "
|
||||||
|
<< d_channel << ": ephemeris from satellite " << d_satellite << " with CN0=" << std::setprecision(2) << cn0
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
|
std::cout << std::setprecision(default_precision); // restore defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_fnav_nav.have_new_iono_and_GST() == true)
|
if (d_fnav_nav.have_new_iono_and_GST() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_fnav_nav.get_iono());
|
const std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_fnav_nav.get_iono());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel "
|
||||||
|
<< d_channel << ": iono/GST model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
|
std::cout << std::setprecision(default_precision); // restore defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_fnav_nav.have_new_utc_model() == true)
|
if (d_fnav_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_fnav_nav.get_utc_model());
|
const std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_fnav_nav.get_utc_model());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel "
|
||||||
|
<< d_channel << ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
|
std::cout << std::setprecision(default_precision); // restore defaults
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void galileo_telemetry_decoder_gs::decode_CNAV_word(uint64_t time_stamp, float *page_symbols, int32_t page_length)
|
void galileo_telemetry_decoder_gs::decode_CNAV_word(uint64_t time_stamp, float *page_symbols, int32_t page_length, double cn0)
|
||||||
{
|
{
|
||||||
// 1. De-interleave
|
// 1. De-interleave
|
||||||
std::vector<float> page_symbols_soft_value(page_length);
|
std::vector<float> page_symbols_soft_value(page_length);
|
||||||
@ -644,8 +696,10 @@ void galileo_telemetry_decoder_gs::decode_CNAV_word(uint64_t time_stamp, float *
|
|||||||
if (is_page_dummy != d_cnav_dummy_page)
|
if (is_page_dummy != d_cnav_dummy_page)
|
||||||
{
|
{
|
||||||
d_cnav_dummy_page = is_page_dummy;
|
d_cnav_dummy_page = is_page_dummy;
|
||||||
std::cout << TEXT_MAGENTA << "Receiving Galileo E6 CNAV dummy pages in channel "
|
const auto default_precision{std::cout.precision()};
|
||||||
<< d_channel << " from satellite " << d_satellite
|
std::cout << TEXT_MAGENTA << "Receiving Galileo E6 CNAV dummy pages in channel " << d_channel << " from satellite "
|
||||||
|
<< d_satellite << " with CN0="
|
||||||
|
<< std::setprecision(2) << cn0 << std::setprecision(default_precision) << " dB-Hz"
|
||||||
<< TEXT_RESET << std::endl;
|
<< TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -660,9 +714,11 @@ void galileo_telemetry_decoder_gs::decode_CNAV_word(uint64_t time_stamp, float *
|
|||||||
if (d_print_cnav_page == true)
|
if (d_print_cnav_page == true)
|
||||||
{
|
{
|
||||||
d_print_cnav_page = false; // only print the first page
|
d_print_cnav_page = false; // only print the first page
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
std::cout << TEXT_MAGENTA << "Receiving Galileo E6 HAS pages"
|
std::cout << TEXT_MAGENTA << "Receiving Galileo E6 HAS pages"
|
||||||
<< (d_cnav_nav.is_HAS_in_test_mode() == true ? " (test mode) " : " ")
|
<< (d_cnav_nav.is_HAS_in_test_mode() == true ? " (test mode) " : " ")
|
||||||
<< "in channel " << d_channel << " from satellite " << d_satellite
|
<< "in channel " << d_channel << " from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision) << " dB-Hz"
|
||||||
<< TEXT_RESET << std::endl;
|
<< TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -926,13 +982,13 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
|||||||
switch (d_frame_type)
|
switch (d_frame_type)
|
||||||
{
|
{
|
||||||
case 1: // INAV
|
case 1: // INAV
|
||||||
decode_INAV_word(d_page_part_symbols.data(), d_frame_length_symbols);
|
decode_INAV_word(d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||||
break;
|
break;
|
||||||
case 2: // FNAV
|
case 2: // FNAV
|
||||||
decode_FNAV_word(d_page_part_symbols.data(), d_frame_length_symbols);
|
decode_FNAV_word(d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||||
break;
|
break;
|
||||||
case 3: // CNAV
|
case 3: // CNAV
|
||||||
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols);
|
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -82,9 +82,9 @@ private:
|
|||||||
|
|
||||||
void msg_handler_read_galileo_tow_map(const pmt::pmt_t &msg);
|
void msg_handler_read_galileo_tow_map(const pmt::pmt_t &msg);
|
||||||
void deinterleaver(int32_t rows, int32_t cols, const float *in, float *out);
|
void deinterleaver(int32_t rows, int32_t cols, const float *in, float *out);
|
||||||
void decode_INAV_word(float *page_part_symbols, int32_t frame_length);
|
void decode_INAV_word(float *page_part_symbols, int32_t frame_length, double cn0);
|
||||||
void decode_FNAV_word(float *page_symbols, int32_t frame_length);
|
void decode_FNAV_word(float *page_symbols, int32_t frame_length, double cn0);
|
||||||
void decode_CNAV_word(uint64_t time_stamp, float *page_symbols, int32_t page_length);
|
void decode_CNAV_word(uint64_t time_stamp, float *page_symbols, int32_t page_length, double cn0);
|
||||||
|
|
||||||
std::unique_ptr<Viterbi_Decoder> d_viterbi;
|
std::unique_ptr<Viterbi_Decoder> d_viterbi;
|
||||||
std::vector<int32_t> d_preamble_samples;
|
std::vector<int32_t> d_preamble_samples;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdlib> // for abs
|
#include <cstdlib> // for abs
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for std::setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr, make_shared
|
#include <memory> // for shared_ptr, make_shared
|
||||||
|
|
||||||
@ -152,7 +153,7 @@ glonass_l1_ca_telemetry_decoder_gs::~glonass_l1_ca_telemetry_decoder_gs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length)
|
void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length, double cn0)
|
||||||
{
|
{
|
||||||
double chip_acc = 0.0;
|
double chip_acc = 0.0;
|
||||||
int32_t chip_acc_counter = 0;
|
int32_t chip_acc_counter = 0;
|
||||||
@ -238,7 +239,11 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
const std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
|
const std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
@ -246,7 +251,11 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
const std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
|
const std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "GLONASS GNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_almanac() == true)
|
if (d_nav.have_new_almanac() == true)
|
||||||
{
|
{
|
||||||
@ -255,7 +264,10 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV Almanac data have been received in channel" << d_channel << " in slot number " << slot_nbr;
|
LOG(INFO) << "GLONASS GNAV Almanac data have been received in channel" << d_channel << " in slot number " << slot_nbr;
|
||||||
std::cout << "New GLONASS L1 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New GLONASS L1 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
// 5. Update satellite information on system
|
// 5. Update satellite information on system
|
||||||
if (d_nav.get_flag_update_slot_number() == true)
|
if (d_nav.get_flag_update_slot_number() == true)
|
||||||
@ -405,7 +417,7 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_string(string_symbols.data(), string_length);
|
decode_string(string_symbols.data(), string_length, current_symbol.CN0_dB_hz);
|
||||||
bool crc_ok = d_nav.get_flag_CRC_test();
|
bool crc_ok = d_nav.get_flag_CRC_test();
|
||||||
if (crc_ok == true)
|
if (crc_ok == true)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ private:
|
|||||||
|
|
||||||
const int32_t d_symbols_per_preamble = GLONASS_GNAV_PREAMBLE_LENGTH_SYMBOLS;
|
const int32_t d_symbols_per_preamble = GLONASS_GNAV_PREAMBLE_LENGTH_SYMBOLS;
|
||||||
|
|
||||||
void decode_string(const double *symbols, int32_t frame_length);
|
void decode_string(const double *symbols, int32_t frame_length, double cn0);
|
||||||
|
|
||||||
// Help with coherent tracking
|
// Help with coherent tracking
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdlib> // for abs
|
#include <cstdlib> // for abs
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for std::setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr, make_shared
|
#include <memory> // for shared_ptr, make_shared
|
||||||
|
|
||||||
@ -152,7 +153,7 @@ glonass_l2_ca_telemetry_decoder_gs::~glonass_l2_ca_telemetry_decoder_gs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length)
|
void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length, double cn0)
|
||||||
{
|
{
|
||||||
double chip_acc = 0.0;
|
double chip_acc = 0.0;
|
||||||
int32_t chip_acc_counter = 0;
|
int32_t chip_acc_counter = 0;
|
||||||
@ -238,7 +239,11 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
const std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
|
const std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
@ -246,7 +251,11 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
const std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
|
const std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "GLONASS GNAV UTC Model data have been received in channel" << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_almanac() == true)
|
if (d_nav.have_new_almanac() == true)
|
||||||
{
|
{
|
||||||
@ -254,7 +263,11 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
|
|||||||
const std::shared_ptr<Glonass_Gnav_Almanac> tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
const std::shared_ptr<Glonass_Gnav_Almanac> tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
LOG(INFO) << "GLONASS GNAV Almanac data have been received in channel" << d_channel << " in slot number " << slot_nbr;
|
LOG(INFO) << "GLONASS GNAV Almanac data have been received in channel" << d_channel << " in slot number " << slot_nbr;
|
||||||
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << '\n';
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV almanac received in channel " << d_channel
|
||||||
|
<< " from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
// 5. Update satellite information on system
|
// 5. Update satellite information on system
|
||||||
if (d_nav.get_flag_update_slot_number() == true)
|
if (d_nav.get_flag_update_slot_number() == true)
|
||||||
@ -404,7 +417,7 @@ int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the decoder
|
// call the decoder
|
||||||
decode_string(string_symbols.data(), string_length);
|
decode_string(string_symbols.data(), string_length, current_symbol.CN0_dB_hz);
|
||||||
if (d_nav.get_flag_CRC_test() == true)
|
if (d_nav.get_flag_CRC_test() == true)
|
||||||
{
|
{
|
||||||
d_CRC_error_counter = 0;
|
d_CRC_error_counter = 0;
|
||||||
|
@ -79,7 +79,7 @@ private:
|
|||||||
|
|
||||||
const int32_t d_symbols_per_preamble = GLONASS_GNAV_PREAMBLE_LENGTH_SYMBOLS;
|
const int32_t d_symbols_per_preamble = GLONASS_GNAV_PREAMBLE_LENGTH_SYMBOLS;
|
||||||
|
|
||||||
void decode_string(const double *symbols, int32_t frame_length);
|
void decode_string(const double *symbols, int32_t frame_length, double cn0);
|
||||||
|
|
||||||
// Storage for incoming data
|
// Storage for incoming data
|
||||||
boost::circular_buffer<Gnss_Synchro> d_symbol_history;
|
boost::circular_buffer<Gnss_Synchro> d_symbol_history;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstring> // for memcpy
|
#include <cstring> // for memcpy
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -254,7 +255,7 @@ void gps_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool gps_l1_ca_telemetry_decoder_gs::decode_subframe(bool flag_invert)
|
bool gps_l1_ca_telemetry_decoder_gs::decode_subframe(double cn0, bool flag_invert)
|
||||||
{
|
{
|
||||||
std::array<char, GPS_SUBFRAME_LENGTH> subframe{};
|
std::array<char, GPS_SUBFRAME_LENGTH> subframe{};
|
||||||
int32_t frame_bit_index = 0;
|
int32_t frame_bit_index = 0;
|
||||||
@ -350,11 +351,6 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe(bool flag_invert)
|
|||||||
const int32_t subframe_ID = d_nav.subframe_decoder(subframe.data()); // decode the subframe
|
const int32_t subframe_ID = d_nav.subframe_decoder(subframe.data()); // decode the subframe
|
||||||
if (subframe_ID > 0 && subframe_ID < 6)
|
if (subframe_ID > 0 && subframe_ID < 6)
|
||||||
{
|
{
|
||||||
std::cout << "New GPS NAV message received in channel " << this->d_channel << ": "
|
|
||||||
<< "subframe "
|
|
||||||
<< subframe_ID << " from satellite "
|
|
||||||
<< Gnss_Satellite(std::string("GPS"), d_nav.get_satellite_PRN()) << '\n';
|
|
||||||
|
|
||||||
switch (subframe_ID)
|
switch (subframe_ID)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@ -401,6 +397,13 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe(bool flag_invert)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << "New GPS NAV message received in channel " << this->d_channel << ": "
|
||||||
|
<< "subframe "
|
||||||
|
<< subframe_ID << " from satellite "
|
||||||
|
<< Gnss_Satellite(std::string("GPS"), d_nav.get_satellite_PRN())
|
||||||
|
<< " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,7 +502,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
}
|
}
|
||||||
DLOG(INFO) << "Preamble detection for GPS L1 satellite " << this->d_satellite;
|
DLOG(INFO) << "Preamble detection for GPS L1 satellite " << this->d_satellite;
|
||||||
d_prev_GPS_frame_4bytes = 0;
|
d_prev_GPS_frame_4bytes = 0;
|
||||||
if (decode_subframe(d_flag_PLL_180_deg_phase_locked))
|
if (decode_subframe(current_symbol.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
|
||||||
{
|
{
|
||||||
d_CRC_error_counter = 0;
|
d_CRC_error_counter = 0;
|
||||||
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
|
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
|
||||||
@ -525,7 +528,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
// 0. fetch the symbols into an array
|
// 0. fetch the symbols into an array
|
||||||
d_preamble_index = d_sample_counter; // record the preamble sample stamp (t_P)
|
d_preamble_index = d_sample_counter; // record the preamble sample stamp (t_P)
|
||||||
|
|
||||||
if (decode_subframe(d_flag_PLL_180_deg_phase_locked))
|
if (decode_subframe(current_symbol.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
|
||||||
{
|
{
|
||||||
d_CRC_error_counter = 0;
|
d_CRC_error_counter = 0;
|
||||||
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
|
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
|
||||||
|
@ -74,7 +74,7 @@ private:
|
|||||||
gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
|
||||||
|
|
||||||
bool gps_word_parityCheck(uint32_t gpsword);
|
bool gps_word_parityCheck(uint32_t gpsword);
|
||||||
bool decode_subframe(bool flag_invert);
|
bool decode_subframe(double cn0, bool flag_invert);
|
||||||
|
|
||||||
Gps_Navigation_Message d_nav;
|
Gps_Navigation_Message d_nav;
|
||||||
Gnss_Satellite d_satellite;
|
Gnss_Satellite d_satellite;
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <cmath> // for round
|
#include <cmath> // for round
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for setprecision
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include <memory> // for shared_ptr, make_shared
|
#include <memory> // for shared_ptr, make_shared
|
||||||
|
|
||||||
@ -257,21 +258,33 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
|||||||
{
|
{
|
||||||
// get ephemeris object for this SV
|
// get ephemeris object for this SV
|
||||||
const std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
const std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
||||||
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
if (d_CNAV_Message.have_new_iono() == true)
|
if (d_CNAV_Message.have_new_iono() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
const std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
||||||
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel
|
||||||
|
<< ": iono model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_CNAV_Message.have_new_utc_model() == true)
|
if (d_CNAV_Message.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
const std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
||||||
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update TOW at the preamble instant
|
// update TOW at the preamble instant
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdlib> // for std::llabs
|
#include <cstdlib> // for std::llabs
|
||||||
#include <exception> // for std::exception
|
#include <exception> // for std::exception
|
||||||
|
#include <iomanip> // for std::setprecision
|
||||||
#include <iostream> // for std::cout
|
#include <iostream> // for std::cout
|
||||||
|
|
||||||
gps_l5_telemetry_decoder_gs_sptr
|
gps_l5_telemetry_decoder_gs_sptr
|
||||||
@ -254,21 +255,33 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u
|
|||||||
{
|
{
|
||||||
// get ephemeris object for this SV
|
// get ephemeris object for this SV
|
||||||
const std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
const std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
||||||
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel
|
||||||
|
<< ": ephemeris from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz
|
||||||
|
<< std::setprecision(default_precision) << " dB-Hz" << std::endl;
|
||||||
}
|
}
|
||||||
if (d_CNAV_Message.have_new_iono() == true)
|
if (d_CNAV_Message.have_new_iono() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
const std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
||||||
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel
|
||||||
|
<< ": iono model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz << std::setprecision(default_precision)
|
||||||
|
<< " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_CNAV_Message.have_new_utc_model() == true)
|
if (d_CNAV_Message.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
const std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
||||||
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
const auto default_precision{std::cout.precision()};
|
||||||
|
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel
|
||||||
|
<< ": UTC model parameters from satellite " << d_satellite
|
||||||
|
<< " with CN0=" << std::setprecision(2) << current_synchro_data.CN0_dB_hz
|
||||||
|
<< std::setprecision(default_precision) << " dB-Hz" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update TOW at the preamble instant
|
// update TOW at the preamble instant
|
||||||
|
Loading…
Reference in New Issue
Block a user