mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-04 18:48:17 +00:00
Revert "[TAS-111] time synch check"
This reverts commit ba2e392a5d58a08b3b123baf6e1c836de49141a4.
This commit is contained in:
parent
dafa7403dc
commit
a32bdae396
@ -23,7 +23,6 @@
|
|||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "osnma_dsm_reader.h" // for OSNMA_DSM_Reader
|
#include "osnma_dsm_reader.h" // for OSNMA_DSM_Reader
|
||||||
#include "pvt_interface.h"
|
#include "pvt_interface.h"
|
||||||
#include "galileo_utc_model.h" // for Galileo_Utc_Model
|
|
||||||
#include <glog/logging.h> // for DLOG
|
#include <glog/logging.h> // for DLOG
|
||||||
#include <gnuradio/io_signature.h> // for gr::io_signature::make
|
#include <gnuradio/io_signature.h> // for gr::io_signature::make
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -55,11 +54,9 @@ osnma_msg_receiver_sptr osnma_msg_receiver_make(const std::string& pemFilePath,
|
|||||||
|
|
||||||
osnma_msg_receiver::osnma_msg_receiver(
|
osnma_msg_receiver::osnma_msg_receiver(
|
||||||
const std::string& pemFilePath,
|
const std::string& pemFilePath,
|
||||||
const std::string& merkleFilePath,
|
const std::string& merkleFilePath) : gr::block("osnma_msg_receiver",
|
||||||
const Galileo_Utc_Model &utc_model) : gr::block("osnma_msg_receiver",
|
|
||||||
gr::io_signature::make(0, 0, 0),
|
gr::io_signature::make(0, 0, 0),
|
||||||
gr::io_signature::make(0, 0, 0)),
|
gr::io_signature::make(0, 0, 0))
|
||||||
galileo_utc_model(utc_model)
|
|
||||||
{
|
{
|
||||||
d_dsm_reader = std::make_unique<OSNMA_DSM_Reader>();
|
d_dsm_reader = std::make_unique<OSNMA_DSM_Reader>();
|
||||||
d_crypto = std::make_unique<Gnss_Crypto>(pemFilePath, merkleFilePath);
|
d_crypto = std::make_unique<Gnss_Crypto>(pemFilePath, merkleFilePath);
|
||||||
@ -96,9 +93,7 @@ void osnma_msg_receiver::msg_handler_pvt_to_osnma(const pmt::pmt_t& msg)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// receive the UTC time
|
d_receiver_time = wht::any_cast<std::time_t>(pmt::any_ref(msg)); // C: TODO - check if this is the correct way to get the time from the PVT block
|
||||||
auto utc_time_from_pvt = wht::any_cast<std::time_t>(pmt::any_ref(msg)); // C: TODO - check if this is the correct way to get the time from the PVT block
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const pmt::exception& e)
|
catch (const pmt::exception& e)
|
||||||
{
|
{
|
||||||
@ -127,7 +122,6 @@ void osnma_msg_receiver::msg_handler_osnma(const pmt::pmt_t& msg)
|
|||||||
|
|
||||||
// compare local time with OSNMA subframe time
|
// 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,...
|
d_GST_SIS = nma_msg->TOW_sf0 + nma_msg->WN_sf0 * 604800; // TODO - unsure about this operation and of the -24 seconds,...
|
||||||
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
|
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)
|
if(abs(d_GST_SIS - d_receiver_time) <= T_L)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend osnma_msg_receiver_sptr osnma_msg_receiver_make(const std::string& pemFilePath, const std::string& merkleFilePath);
|
friend osnma_msg_receiver_sptr osnma_msg_receiver_make(const std::string& pemFilePath, const std::string& merkleFilePath);
|
||||||
osnma_msg_receiver(const std::string& pemFilePath, const std::string& merkleFilePath, const Galileo_Utc_Model &galileo_utc_model);
|
osnma_msg_receiver(const std::string& pemFilePath, const std::string& merkleFilePath);
|
||||||
|
|
||||||
void msg_handler_osnma(const pmt::pmt_t& msg);
|
void msg_handler_osnma(const pmt::pmt_t& msg);
|
||||||
void msg_handler_pvt_to_osnma(const pmt::pmt_t& msg);
|
void msg_handler_pvt_to_osnma(const pmt::pmt_t& msg);
|
||||||
@ -83,7 +83,6 @@ private:
|
|||||||
std::array<uint8_t, 60> d_mack_message{}; // C: 480 b
|
std::array<uint8_t, 60> d_mack_message{}; // C: 480 b
|
||||||
|
|
||||||
OSNMA_data d_osnma_data{};
|
OSNMA_data d_osnma_data{};
|
||||||
Galileo_Utc_Model galileo_utc_model;
|
|
||||||
bool d_new_data{false};
|
bool d_new_data{false};
|
||||||
bool d_public_key_verified{false};
|
bool d_public_key_verified{false};
|
||||||
bool d_kroot_verified{false};
|
bool d_kroot_verified{false};
|
||||||
|
@ -72,8 +72,3 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN) const
|
|||||||
t_Utc = secondsOfWeekBeforeToday + t_Utc_daytime;
|
t_Utc = secondsOfWeekBeforeToday + t_Utc_daytime;
|
||||||
return t_Utc;
|
return t_Utc;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Galileo_Utc_Model::UTC_time_to_GST(double t_Utc, int32_t WN) const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
@ -43,7 +43,6 @@ public:
|
|||||||
|
|
||||||
// double TOW;
|
// double TOW;
|
||||||
double GST_to_UTC_time(double t_e, int32_t WN) const; //!< 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;
|
|
||||||
|
|
||||||
// Word type 6: GST-UTC conversion parameters
|
// Word type 6: GST-UTC conversion parameters
|
||||||
double A0{};
|
double A0{};
|
||||||
|
@ -102,7 +102,7 @@ void NavData::generate_eph_iono_vector2()
|
|||||||
for (auto& var : variables)
|
for (auto& var : variables)
|
||||||
{
|
{
|
||||||
// extract the bits from the variable
|
// extract the bits from the variable
|
||||||
uint64_t binary_representation; // FIXME types have more bits than the specification size, e.g. 32 bits vs 10 bits
|
uint64_t binary_representation;
|
||||||
memcpy(&binary_representation, var.first, var.second / 8);
|
memcpy(&binary_representation, var.first, var.second / 8);
|
||||||
|
|
||||||
// Append the bits to the buffer and update the bit count
|
// Append the bits to the buffer and update the bit count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user