mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Establish data path from Tlm to PVT for HAS data
This commit is contained in:
parent
bad7c7a529
commit
deb49eeba3
@ -187,19 +187,18 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Galileo E6 HAS messages
|
// Galileo E6 HAS messages port in
|
||||||
this->message_port_register_in(pmt::mp("E6_HAS_to_PVT"));
|
this->message_port_register_in(pmt::mp("E6_HAS_to_PVT"));
|
||||||
//TODO: bind the Galileo E6 HAS message input with the desired function
|
this->set_msg_handler(pmt::mp("E6_HAS_to_PVT"),
|
||||||
// this->set_msg_handler(pmt::mp("E6_HAS_to_PVT"),
|
#if HAS_GENERIC_LAMBDA
|
||||||
//#if HAS_GENERIC_LAMBDA
|
[this](auto&& PH1) { msg_handler_has_data(PH1); });
|
||||||
// [this](auto&& PH1) { msg_handler_telemetry(PH1); });
|
#else
|
||||||
//#else
|
#if USE_BOOST_BIND_PLACEHOLDERS
|
||||||
//#if USE_BOOST_BIND_PLACEHOLDERS
|
boost::bind(&rtklib_pvt_gs::msg_handler_has_data, this, boost::placeholders::_1));
|
||||||
// boost::bind(&rtklib_pvt_gs::msg_handler_telemetry, this, boost::placeholders::_1));
|
#else
|
||||||
//#else
|
boost::bind(&rtklib_pvt_gs::msg_handler_has_data, this, _1));
|
||||||
// boost::bind(&rtklib_pvt_gs::msg_handler_telemetry, this, _1));
|
#endif
|
||||||
//#endif
|
#endif
|
||||||
//#endif
|
|
||||||
|
|
||||||
// initialize kml_printer
|
// initialize kml_printer
|
||||||
const std::string kml_dump_filename = d_dump_filename;
|
const std::string kml_dump_filename = d_dump_filename;
|
||||||
@ -524,6 +523,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
d_beidou_dnav_iono_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Iono>).hash_code();
|
d_beidou_dnav_iono_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Iono>).hash_code();
|
||||||
d_beidou_dnav_utc_model_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Utc_Model>).hash_code();
|
d_beidou_dnav_utc_model_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Utc_Model>).hash_code();
|
||||||
d_beidou_dnav_almanac_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Almanac>).hash_code();
|
d_beidou_dnav_almanac_sptr_type_hash_code = typeid(std::shared_ptr<Beidou_Dnav_Almanac>).hash_code();
|
||||||
|
d_galileo_has_data_sptr_type_hash_code = typeid(std::shared_ptr<Galileo_HAS_data>).hash_code();
|
||||||
|
|
||||||
d_start = std::chrono::system_clock::now();
|
d_start = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
@ -1485,6 +1485,25 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void rtklib_pvt_gs::msg_handler_has_data(const pmt::pmt_t& msg)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
const size_t msg_type_hash_code = pmt::any_ref(msg).type().hash_code();
|
||||||
|
if (msg_type_hash_code == d_galileo_has_data_sptr_type_hash_code)
|
||||||
|
{
|
||||||
|
const auto has_data = boost::any_cast<std::shared_ptr<Galileo_HAS_data>>(pmt::any_ref(msg));
|
||||||
|
// TODO: Store HAS message
|
||||||
|
// std::cout << "HAS data received at PVT block.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (const boost::bad_any_cast& e)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "msg_handler_telemetry Bad any_cast: " << e.what();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Gps_Ephemeris> rtklib_pvt_gs::get_gps_ephemeris_map() const
|
std::map<int, Gps_Ephemeris> rtklib_pvt_gs::get_gps_ephemeris_map() const
|
||||||
{
|
{
|
||||||
return d_internal_pvt_solver->gps_ephemeris_map;
|
return d_internal_pvt_solver->gps_ephemeris_map;
|
||||||
|
@ -133,6 +133,8 @@ private:
|
|||||||
|
|
||||||
void msg_handler_telemetry(const pmt::pmt_t& msg);
|
void msg_handler_telemetry(const pmt::pmt_t& msg);
|
||||||
|
|
||||||
|
void msg_handler_has_data(const pmt::pmt_t& msg);
|
||||||
|
|
||||||
void initialize_and_apply_carrier_phase_offset();
|
void initialize_and_apply_carrier_phase_offset();
|
||||||
|
|
||||||
void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,
|
void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,
|
||||||
@ -224,6 +226,7 @@ private:
|
|||||||
size_t d_beidou_dnav_iono_sptr_type_hash_code;
|
size_t d_beidou_dnav_iono_sptr_type_hash_code;
|
||||||
size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
|
size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
|
||||||
size_t d_beidou_dnav_almanac_sptr_type_hash_code;
|
size_t d_beidou_dnav_almanac_sptr_type_hash_code;
|
||||||
|
size_t d_galileo_has_data_sptr_type_hash_code;
|
||||||
|
|
||||||
double d_rinex_version;
|
double d_rinex_version;
|
||||||
double d_rx_time;
|
double d_rx_time;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file galileo_e6_has_msg_receiver.cc
|
* \file galileo_e6_has_msg_receiver.cc
|
||||||
* \brief GNU Radio block that receives asynchronous Galileo E6 HAS message sections from Galileo E6 telemetry blocks
|
* \brief GNU Radio block that receives asynchronous Galileo E6 HAS message
|
||||||
|
* sections from Galileo E6 telemetry blocks
|
||||||
* \author Javier Arribas, 2021. jarribas(at)cttc.es
|
* \author Javier Arribas, 2021. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
@ -16,7 +17,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "galileo_e6_has_msg_receiver.h"
|
#include "galileo_e6_has_msg_receiver.h"
|
||||||
#include "galileo_has_data.h" // For Galileo HAS messages
|
#include "galileo_has_data.h" // for Galileo_HAS_data
|
||||||
|
#include "galileo_has_page.h" // for Galileo_HAS_page
|
||||||
#include <boost/any.hpp>
|
#include <boost/any.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
@ -66,12 +68,10 @@ void galileo_e6_has_msg_receiver::msg_handler_galileo_e6_has(const pmt::pmt_t& m
|
|||||||
{
|
{
|
||||||
const size_t msg_type_hash_code = pmt::any_ref(msg).type().hash_code();
|
const size_t msg_type_hash_code = pmt::any_ref(msg).type().hash_code();
|
||||||
|
|
||||||
//TODO: change example
|
if (msg_type_hash_code == typeid(std::shared_ptr<Galileo_HAS_page>).hash_code())
|
||||||
// ****************** Gnss_Synchro received ************************
|
|
||||||
if (msg_type_hash_code == typeid(std::shared_ptr<Galileo_HAS_data>).hash_code())
|
|
||||||
{
|
{
|
||||||
const auto HAS_data_obj_obj = boost::any_cast<std::shared_ptr<Galileo_HAS_data>>(pmt::any_ref(msg));
|
const auto HAS_data_obj_obj = boost::any_cast<std::shared_ptr<Galileo_HAS_page>>(pmt::any_ref(msg));
|
||||||
|
// std::cout << HAS_data_obj_obj->has_message_string << '\n';
|
||||||
// store / do things with the data
|
// store / do things with the data
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -89,8 +89,7 @@ void galileo_e6_has_msg_receiver::msg_handler_galileo_e6_has(const pmt::pmt_t& m
|
|||||||
|
|
||||||
// 3. Send the resulting decoded HAS data (if available) to PVT
|
// 3. Send the resulting decoded HAS data (if available) to PVT
|
||||||
|
|
||||||
//TODO: change example
|
// TODO: fill message object and send to PVT when ready
|
||||||
Gnss_Synchro dummy;
|
std::shared_ptr<Galileo_HAS_data> dummy{};
|
||||||
this->message_port_pub(pmt::mp("E6_HAS_to_PVT"), pmt::make_any(dummy));
|
this->message_port_pub(pmt::mp("E6_HAS_to_PVT"), pmt::make_any(dummy));
|
||||||
//TODO
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file GALILEO_E6_HAS_msg_receiver.h
|
* \file galileo_e6_has_msg_receiver.h
|
||||||
* \brief GNU Radio block that receives asynchronous Galileo E6 HAS message sections from Galileo E6 telemetry blocks
|
* \brief GNU Radio block that receives asynchronous Galileo E6 HAS message
|
||||||
|
* sections from Galileo E6 telemetry blocks
|
||||||
* \author Javier Arribas, 2021. jarribas(at)cttc.es
|
* \author Javier Arribas, 2021. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
@ -14,12 +15,11 @@
|
|||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_CC_H
|
#ifndef GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_H
|
||||||
#define GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_CC_H
|
#define GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_H
|
||||||
|
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_synchro.h"
|
#include "reed_solomon.h"
|
||||||
#include "monitor_pvt.h"
|
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <pmt/pmt.h>
|
#include <pmt/pmt.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -49,9 +49,10 @@ private:
|
|||||||
friend galileo_e6_has_msg_receiver_sptr galileo_e6_has_msg_receiver_make();
|
friend galileo_e6_has_msg_receiver_sptr galileo_e6_has_msg_receiver_make();
|
||||||
galileo_e6_has_msg_receiver();
|
galileo_e6_has_msg_receiver();
|
||||||
void msg_handler_galileo_e6_has(const pmt::pmt_t& msg);
|
void msg_handler_galileo_e6_has(const pmt::pmt_t& msg);
|
||||||
|
ReedSolomon rs = ReedSolomon();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
/** \} */
|
/** \} */
|
||||||
#endif // GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_CC_H
|
#endif // GNSS_SDR_GALILEO_E6_HAS_MSG_RECEIVER_H
|
||||||
|
Loading…
Reference in New Issue
Block a user