1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-13 21:57:14 +00:00

Replacing Galileo E1, SBAS, and GPS L2C telemetry shared queues and maps

with GNURadio asynchronous messages (TLM -> PVT)
This commit is contained in:
Javier Arribas
2016-04-12 17:29:16 +02:00
parent 588864e19e
commit b56183f93b
24 changed files with 239 additions and 748 deletions

View File

@@ -122,6 +122,8 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
{
// Telemetry Bit transition synchronization port out
this->message_port_register_out(pmt::mp("preamble_timestamp_s"));
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_queue = queue;
d_dump = dump;
@@ -168,10 +170,6 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
d_CRC_error_counter = 0;
flag_even_word_arrived = 0;
d_flag_preamble = false;
d_ephemeris_queue = 0;
d_utc_model_queue = 0;
d_almanac_queue = 0;
d_iono_queue = 0;
d_channel = 0;
Prn_timestamp_at_preamble_ms = 0.0;
flag_TOW_set = false;
@@ -251,38 +249,41 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
// 4. Push the new navigation data to the queues
if (d_nav.have_new_ephemeris() == true)
{
// get ephemeris object for this SV
Galileo_Ephemeris ephemeris = d_nav.get_ephemeris();//notice that the read operation will clear the valid flag
//std::cout<<"New Galileo Ephemeris received for SV "<<d_satellite.get_PRN()<<std::endl;
d_ephemeris_queue->push(ephemeris);
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Ephemeris> tmp_obj= std::make_shared<Galileo_Ephemeris>();
*tmp_obj = d_nav.get_ephemeris();//notice that the read operation will clear the valid flag
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_iono_and_GST() == true)
{
Galileo_Iono iono = d_nav.get_iono(); //notice that the read operation will clear the valid flag
//std::cout<<"New Galileo IONO model (and UTC) received for SV "<<d_satellite.get_PRN()<<std::endl;
d_iono_queue->push(iono);
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Iono> tmp_obj= std::make_shared<Galileo_Iono>();
*tmp_obj = d_nav.get_iono(); //notice that the read operation will clear the valid flag
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_utc_model() == true)
{
Galileo_Utc_Model utc_model = d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
//std::cout<<"New Galileo UTC model received for SV "<<d_satellite.get_PRN()<<std::endl;
d_utc_model_queue->push(utc_model);
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Utc_Model> tmp_obj= std::make_shared<Galileo_Utc_Model>();
*tmp_obj = d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_almanac() == true)
{
Galileo_Almanac almanac = d_nav.get_almanac();
d_almanac_queue->push(almanac);
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>();
*tmp_obj = d_nav.get_almanac();
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
//debug
std::cout << "Galileo almanac received!" << std::endl;
LOG(INFO) << "GPS_to_Galileo time conversion:";
LOG(INFO) << "A0G=" << almanac.A_0G_10;
LOG(INFO) << "A1G=" << almanac.A_1G_10;
LOG(INFO) << "T0G=" << almanac.t_0G_10;
LOG(INFO) << "WN_0G_10=" << almanac.WN_0G_10;
LOG(INFO) << "A0G=" << tmp_obj->A_0G_10;
LOG(INFO) << "A1G=" << tmp_obj->A_1G_10;
LOG(INFO) << "T0G=" << tmp_obj->t_0G_10;
LOG(INFO) << "WN_0G_10=" << tmp_obj->WN_0G_10;
LOG(INFO) << "Current parameters:";
LOG(INFO) << "d_TOW_at_current_symbol=" << d_TOW_at_current_symbol;
LOG(INFO) << "d_nav.WN_0=" << d_nav.WN_0;
delta_t = almanac.A_0G_10 + almanac.A_1G_10 * (d_TOW_at_current_symbol - almanac.t_0G_10 + 604800 * (fmod((d_nav.WN_0 - almanac.WN_0G_10), 64)));
delta_t = tmp_obj->A_0G_10 + tmp_obj->A_1G_10 * (d_TOW_at_current_symbol - tmp_obj->t_0G_10 + 604800 * (fmod((d_nav.WN_0 - tmp_obj->WN_0G_10), 64)));
LOG(INFO) << "delta_t=" << delta_t << "[s]";
}
}
@@ -551,27 +552,4 @@ void galileo_e1b_telemetry_decoder_cc::set_channel(int channel)
}
void galileo_e1b_telemetry_decoder_cc::set_ephemeris_queue(concurrent_queue<Galileo_Ephemeris> *ephemeris_queue)
{
d_ephemeris_queue = ephemeris_queue;
}
void galileo_e1b_telemetry_decoder_cc::set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue)
{
d_iono_queue = iono_queue;
}
void galileo_e1b_telemetry_decoder_cc::set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue)
{
d_almanac_queue = almanac_queue;
}
void galileo_e1b_telemetry_decoder_cc::set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue)
{
d_utc_model_queue = utc_model_queue;
}

View File

@@ -115,15 +115,6 @@ private:
// navigation message vars
Galileo_Navigation_Message d_nav;
// Galileo ephemeris queue
concurrent_queue<Galileo_Ephemeris> *d_ephemeris_queue;
// ionospheric parameters queue
concurrent_queue<Galileo_Iono> *d_iono_queue;
// UTC model parameters queue
concurrent_queue<Galileo_Utc_Model> *d_utc_model_queue;
// Almanac queue
concurrent_queue<Galileo_Almanac> *d_almanac_queue;
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
Gnss_Satellite d_satellite;

View File

@@ -199,6 +199,8 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
{
// Telemetry Bit transition synchronization port out
this->message_port_register_out(pmt::mp("preamble_timestamp_s"));
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_queue = queue;
d_dump = dump;

View File

@@ -65,6 +65,8 @@ gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc(
{
// Telemetry Bit transition synchronization port out
this->message_port_register_out(pmt::mp("preamble_timestamp_s"));
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());

View File

@@ -65,6 +65,8 @@ sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
{
// Telemetry Bit transition synchronization port out
this->message_port_register_out(pmt::mp("preamble_timestamp_s"));
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
@@ -519,26 +521,3 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_b
<< std::setfill(' ') << std::resetiosflags(std::ios::hex);
}
void sbas_l1_telemetry_decoder_cc::set_raw_msg_queue(concurrent_queue<Sbas_Raw_Msg> *raw_msg_queue)
{
sbas_telemetry_data.set_raw_msg_queue(raw_msg_queue);
}
void sbas_l1_telemetry_decoder_cc::set_iono_queue(concurrent_queue<Sbas_Ionosphere_Correction> *iono_queue)
{
sbas_telemetry_data.set_iono_queue(iono_queue);
}
void sbas_l1_telemetry_decoder_cc::set_sat_corr_queue(concurrent_queue<Sbas_Satellite_Correction> *sat_corr_queue)
{
sbas_telemetry_data.set_sat_corr_queue(sat_corr_queue);
}
void sbas_l1_telemetry_decoder_cc::set_ephemeris_queue(concurrent_queue<Sbas_Ephemeris> *ephemeris_queue)
{
sbas_telemetry_data.set_ephemeris_queue(ephemeris_queue);
}

View File

@@ -62,12 +62,6 @@ public:
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
// queues to communicate broadcasted SBAS data to other blocks of GNSS-SDR
void set_raw_msg_queue(concurrent_queue<Sbas_Raw_Msg> *raw_msg_queue); //!< Set raw msg queue
void set_iono_queue(concurrent_queue<Sbas_Ionosphere_Correction> *iono_queue); //!< Set iono queue
void set_sat_corr_queue(concurrent_queue<Sbas_Satellite_Correction> *sat_corr_queue); //!< Set sat correction queue
void set_ephemeris_queue(concurrent_queue<Sbas_Ephemeris> *ephemeris_queue); //!< Set SBAS ephemeis queue
/*!
* \brief This is where all signal processing takes place
*/