1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 11:40:33 +00:00

Merge branch 'osnma-cesare' of https://github.com/cesaaargm/osnma into osnma-cesare

This commit is contained in:
Carles Fernandez 2024-08-15 14:41:21 +02:00
commit 6267172ab6
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 13 additions and 7 deletions

View File

@ -1658,13 +1658,10 @@ void rtklib_pvt_gs::msg_handler_osnma(const pmt::pmt_t& msg)
// so with ADKD0 and ADKD12 validated), their corresponding TOW at the beginning
// of the authenticated subframe, and maybe the COP.
const size_t msg_type_hash_code = pmt::any_ref(msg).type().hash_code();
if (msg_type_hash_code == typeid(std::shared_ptr<OSNMA_data>).hash_code())
if (msg_type_hash_code == typeid(std::shared_ptr<OSNMA_NavData>).hash_code())
{
// Act according to NMA data
if (d_osnma_strict)
{
// TODO
}
const auto osnma_data = wht::any_cast<std::shared_ptr<OSNMA_NavData>>(pmt::any_ref(msg));
d_auth_nav_data_map[osnma_data->get_prn_d()].insert(osnma_data->get_IOD_nav());
}
}
catch (const wht::bad_any_cast& e)
@ -2051,7 +2048,14 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if (d_osnma_strict && ((std::string(in[i][epoch].Signal, 2) == std::string("1B")) || ((std::string(in[i][epoch].Signal, 2) == std::string("7X")))))
{
// Pick up only authenticated satellites
// TODO
auto IOD_nav_list = d_auth_nav_data_map.find(tmp_eph_iter_gal->second.PRN);
if (IOD_nav_list != d_auth_nav_data_map.cend())
{
if (IOD_nav_list->second.find(tmp_eph_iter_gal->second.IOD_nav) != IOD_nav_list->second.cend())
{
store_valid_observable = true;
}
}
}
else
{

View File

@ -20,6 +20,7 @@
#include "gnss_block_interface.h"
#include "gnss_synchro.h"
#include "gnss_time.h"
#include "osnma_data.h"
#include "rtklib.h"
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
@ -203,6 +204,7 @@ private:
std::map<int, Gnss_Synchro> d_gnss_observables_map;
std::map<int, Gnss_Synchro> d_gnss_observables_map_t0;
std::map<int, Gnss_Synchro> d_gnss_observables_map_t1;
std::map<uint32_t, std::set<uint32_t>> d_auth_nav_data_map;
std::queue<GnssTime> d_TimeChannelTagTimestamps;