mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 11:19:18 +00:00
Revert "[TAS-111] Refactor Galileo_Utc_Model and time synchronization in osnma_msg_receiver"
This reverts commit 51b4209535
.
This commit is contained in:
parent
51b4209535
commit
dafa7403dc
@ -127,11 +127,9 @@ void osnma_msg_receiver::msg_handler_osnma(const pmt::pmt_t& msg)
|
||||
|
||||
// compare local time with OSNMA subframe time
|
||||
d_GST_SIS = nma_msg->TOW_sf0 + nma_msg->WN_sf0 * 604800; // TODO - unsure about this operation and of the -24 seconds,...
|
||||
// instantiate galileo_utc_model and call init function, then call GST_to_UTC_time
|
||||
Galileo_Utc_Model::init(nma_msg->utc_data);
|
||||
double_t utc = Galileo_Utc_Model::GST_to_UTC_time(static_cast<double>(d_GST_SIS), static_cast<int>(nma_msg->WN_sf0));
|
||||
double_t T_L = 15.0; // TODO - to define the maximum allowed time difference between local time and OSNMA subframe time
|
||||
if(abs(utc - d_receiver_time) <= T_L)
|
||||
auto utc = galileo_utc_model.GST_to_UTC_time(d_GST_SIS, static_cast<int>(nma_msg->WN_sf0));
|
||||
double_t T_L = 15; // TODO - to define the maximum allowed time difference between local time and OSNMA subframe time
|
||||
if(abs(d_GST_SIS - d_receiver_time) <= T_L)
|
||||
{
|
||||
process_osnma_message(nma_msg);
|
||||
}
|
||||
|
@ -72,7 +72,6 @@ private:
|
||||
void read_mack_body();
|
||||
void process_mack_message(const std::shared_ptr<OSNMA_msg>& osnma_msg);
|
||||
|
||||
// Galileo_Utc_Model galileo_utc_model;
|
||||
boost::circular_buffer<MACK_message> d_old_mack_message;
|
||||
boost::circular_buffer<NavData> d_old_navdata_buffer; // buffer that holds last 10 received navdata messages
|
||||
std::unique_ptr<OSNMA_DSM_Reader> d_dsm_reader;
|
||||
@ -92,7 +91,7 @@ private:
|
||||
uint8_t d_Lt_min {}; // minimum equivalent tag length
|
||||
uint32_t d_GST_0 {};
|
||||
uint32_t d_GST_SIS {};
|
||||
std::time_t d_receiver_time {}; // PVT time computed by the local receiver
|
||||
std::time_t d_receiver_time {};
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,19 +17,8 @@
|
||||
#include "galileo_utc_model.h"
|
||||
#include <cmath>
|
||||
|
||||
void Galileo_Utc_Model::init(const Galileo_Utc_Model& data)
|
||||
{
|
||||
A0 = data.A0;
|
||||
A1 = data.A1;
|
||||
Delta_tLS = data.Delta_tLS;
|
||||
Delta_tLSF = data.Delta_tLSF;
|
||||
DN = data.DN;
|
||||
tot = data.tot;
|
||||
WNot = data.WNot;
|
||||
WN_LSF = data.WN_LSF;
|
||||
|
||||
}
|
||||
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN)
|
||||
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN) const
|
||||
{
|
||||
double t_Utc;
|
||||
double t_Utc_daytime;
|
||||
@ -87,5 +76,4 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN)
|
||||
double Galileo_Utc_Model::UTC_time_to_GST(double t_Utc, int32_t WN) const
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
@ -41,29 +41,19 @@ public:
|
||||
*/
|
||||
Galileo_Utc_Model() = default;
|
||||
|
||||
/**
|
||||
* @brief Initialize the Galileo_UTC_Model with the provided data.
|
||||
*
|
||||
* This function initializes the Galileo_UTC_Model object with the given data.
|
||||
*
|
||||
* @param data The Galileo_UTC_Model object containing the data.
|
||||
*/
|
||||
static void init(const Galileo_Utc_Model& data);
|
||||
|
||||
// double TOW;
|
||||
static double GST_to_UTC_time(double t_e, int32_t WN); //!< GST-UTC Conversion Algorithm and Parameters
|
||||
double GST_to_UTC_time(double t_e, int32_t WN) const; //!< GST-UTC Conversion Algorithm and Parameters
|
||||
double UTC_time_to_GST(double t_Utc, int32_t WN) const;
|
||||
|
||||
// TODO - make them private?
|
||||
// Word type 6: GST-UTC conversion parameters
|
||||
static double A0;
|
||||
static double A1;
|
||||
static int32_t Delta_tLS;
|
||||
static int32_t tot; //!< UTC data reference Time of Week [s]
|
||||
static int32_t WNot; //!< UTC data reference Week number [week]
|
||||
static int32_t WN_LSF;
|
||||
static int32_t DN;
|
||||
static int32_t Delta_tLSF;
|
||||
double A0{};
|
||||
double A1{};
|
||||
int32_t Delta_tLS{};
|
||||
int32_t tot{}; //!< UTC data reference Time of Week [s]
|
||||
int32_t WNot{}; //!< UTC data reference Week number [week]
|
||||
int32_t WN_LSF{};
|
||||
int32_t DN{};
|
||||
int32_t Delta_tLSF{};
|
||||
|
||||
// GPS to Galileo GST conversion parameters
|
||||
double A_0G{};
|
||||
|
Loading…
Reference in New Issue
Block a user