1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-30 14:46:23 +00:00

[TAS-125] NavData retrieval.

* set osnma flags to true when new data
		* send them to osnma block if filled.
This commit is contained in:
Cesare G. Martínez 2024-01-22 17:55:52 +01:00
parent 27a7274e1a
commit 08bd1992af
4 changed files with 27 additions and 10 deletions

View File

@ -465,6 +465,8 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
} }
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
d_flag_osnma_ephemeris = true;
} }
else else
{ {
@ -514,6 +516,8 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
<< d_satellite << " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision) << d_satellite << " with CN0=" << std::setprecision(2) << cn0 << std::setprecision(default_precision)
<< " dB-Hz" << TEXT_RESET << std::endl; << " dB-Hz" << TEXT_RESET << std::endl;
} }
d_flag_osnma_iono_and_time = true;
} }
if (d_inav_nav.have_new_utc_model() == true) if (d_inav_nav.have_new_utc_model() == true)
@ -549,6 +553,8 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
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]";
d_flag_osnma_utc_model = true;
} }
if (d_inav_nav.have_new_almanac() == true) if (d_inav_nav.have_new_almanac() == true)
@ -584,7 +590,9 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
DLOG(INFO) << "d_nav.WN_0=" << d_inav_nav.get_Galileo_week(); DLOG(INFO) << "d_nav.WN_0=" << d_inav_nav.get_Galileo_week();
} }
if (d_band == '1' && d_inav_nav.have_new_nma() == true) // get osnma message if the needed nav data is available
auto adkd_4_12_nav_data_available = d_flag_osnma_iono_and_time && d_flag_osnma_ephemeris;
if (d_band == '1' && d_inav_nav.have_new_nma() == true && adkd_4_12_nav_data_available == true && d_flag_osnma_utc_model == true)
{ {
const std::shared_ptr<OSNMA_msg> tmp_obj = std::make_shared<OSNMA_msg>(d_inav_nav.get_osnma_msg()); const std::shared_ptr<OSNMA_msg> tmp_obj = std::make_shared<OSNMA_msg>(d_inav_nav.get_osnma_msg());
this->message_port_pub(pmt::mp("OSNMA_from_TLM"), pmt::make_any(tmp_obj)); this->message_port_pub(pmt::mp("OSNMA_from_TLM"), pmt::make_any(tmp_obj));

View File

@ -155,6 +155,9 @@ private:
bool d_there_are_e1_channels; bool d_there_are_e1_channels;
bool d_there_are_e6_channels; bool d_there_are_e6_channels;
bool d_use_ced; bool d_use_ced;
bool d_flag_osnma_ephemeris; // flag to indicate if the ephemeris is complete for OSNMA processing
bool d_flag_osnma_utc_model; // flag to indicate if the GST conversion parameters are complete for OSNMA processing
bool d_flag_osnma_iono_and_time; // flag to indicate if the iono correction and time is complete for OSNMA processing
}; };

View File

@ -1387,15 +1387,17 @@ OSNMA_msg Galileo_Inav_Message::get_osnma_msg()
nma_position_filled = std::array<int8_t, 15>{}; nma_position_filled = std::array<int8_t, 15>{};
// Fill TOW and WN // Fill TOW and WN
nma_msg.WN_sf0 = WN_0; nma_msg.WN_sf0 = WN_0;
int32_t TOW_sf0 = TOW_5 - 24; int32_t TOW_sf0 = TOW_5 - 24; // TODO - why not TOW_0?
if (TOW_sf0 < 0) if (TOW_sf0 < 0)
{ {
TOW_sf0 += 604800; TOW_sf0 += 604800;
} }
nma_msg.TOW_sf0 = static_cast<uint32_t>(TOW_sf0); nma_msg.TOW_sf0 = static_cast<uint32_t>(TOW_sf0);
// TODO - draft for retrieving NavData for use during Tag verification. // nma_msg.TOW_sf0 = static_cast<uint32_t>(TOW_0);
nma_msg.t0e_1 = static_cast<uint32_t>(t0e_1); // get ephemeris, clock and iono correction datn and GST-UTC and GST-GPS converstion parameters (may be incomplete)
nma_msg.IOD_nav = static_cast<uint32_t>(IOD_nav_1); nma_msg.EphemerisData = get_ephemeris();
nma_msg.IonoData = get_iono();
nma_msg.UtcModelData = get_utc_model();
return nma_msg; return nma_msg;
} }

View File

@ -39,7 +39,9 @@ class ReedSolomon; // Forward declaration of the ReedSolomon class
* \{ */ * \{ */
/** \addtogroup System_Parameters /** \addtogroup System_Parameters
* \{ */ * \{ */
/*!
* \brief This class fills the OSNMA_msg structure with the data received from the telemetry blocks.
*/
class OSNMA_msg class OSNMA_msg
{ {
public: public:
@ -47,13 +49,15 @@ public:
std::array<uint32_t, 15> mack{}; std::array<uint32_t, 15> mack{};
std::array<uint8_t, 15> hkroot{}; std::array<uint8_t, 15> hkroot{};
uint32_t PRN{}; uint32_t PRN{};
uint32_t WN_sf0{}; uint32_t WN_sf0{}; // TODO - this is present in UtcModelData already
uint32_t TOW_sf0{}; uint32_t TOW_sf0{};
// TODO - NavData to be retrieved correctly
std::vector<uint8_t> EphemerisClockAndStatusData {}; std::vector<uint8_t> EphemerisClockAndStatusData {};
std::vector<uint8_t> TimingData {}; std::vector<uint8_t> TimingData {};
uint32_t t0e_1{}; Galileo_Ephemeris EphemerisData {};
uint32_t IOD_nav{}; Galileo_Iono IonoData {};
Galileo_Utc_Model UtcModelData {};
}; };
/*! /*!