mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-09-13 08:16:03 +00:00
Add more consistancy in Telemetry messages
This commit is contained in:
@@ -208,13 +208,13 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
|||||||
d_nav.split_page(page_String, flag_even_word_arrived);
|
d_nav.split_page(page_String, flag_even_word_arrived);
|
||||||
if(d_nav.flag_CRC_test == true)
|
if(d_nav.flag_CRC_test == true)
|
||||||
{
|
{
|
||||||
LOG(INFO) << "Galileo CRC correct on channel " << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "Galileo E1 CRC correct on channel " << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << "Galileo CRC correct on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
//std::cout << "Galileo E1 CRC correct on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Galileo CRC error on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
std::cout << "Galileo E1 CRC error on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
||||||
LOG(INFO) << "Galileo CRC error on channel " << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "Galileo E1 CRC error on channel " << d_channel << " from satellite " << d_satellite;
|
||||||
}
|
}
|
||||||
flag_even_word_arrived = 0;
|
flag_even_word_arrived = 0;
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
|||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
|
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received: ephemeris from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -238,12 +238,14 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
|||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_nav.get_iono());
|
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_nav.get_iono());
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received: iono/GST model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
|
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
|
||||||
|
std::cout << "New Galileo E1 I/NAV message received: UTC model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_almanac() == true)
|
if (d_nav.have_new_almanac() == true)
|
||||||
@@ -251,7 +253,7 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
|||||||
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>(d_nav.get_almanac());
|
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>(d_nav.get_almanac());
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
//debug
|
//debug
|
||||||
std::cout << "Galileo almanac received!" << std::endl;
|
std::cout << "Galileo E1 I/NAV almanac received!" << std::endl;
|
||||||
DLOG(INFO) << "GPS_to_Galileo time conversion:";
|
DLOG(INFO) << "GPS_to_Galileo time conversion:";
|
||||||
DLOG(INFO) << "A0G=" << tmp_obj->A_0G_10;
|
DLOG(INFO) << "A0G=" << tmp_obj->A_0G_10;
|
||||||
DLOG(INFO) << "A1G=" << tmp_obj->A_1G_10;
|
DLOG(INFO) << "A1G=" << tmp_obj->A_1G_10;
|
||||||
@@ -310,7 +312,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribut
|
|||||||
if (abs(corr_value) >= d_symbols_per_preamble)
|
if (abs(corr_value) >= d_symbols_per_preamble)
|
||||||
{
|
{
|
||||||
d_preamble_index = d_sample_counter;//record the preamble sample stamp
|
d_preamble_index = d_sample_counter;//record the preamble sample stamp
|
||||||
LOG(INFO) << "Preamble detection for Galileo SAT " << this->d_satellite;
|
LOG(INFO) << "Preamble detection for Galileo satellite " << this->d_satellite;
|
||||||
d_stat = 1; // enter into frame pre-detection status
|
d_stat = 1; // enter into frame pre-detection status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -323,7 +325,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribut
|
|||||||
if (abs(preamble_diff - GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS) == 0)
|
if (abs(preamble_diff - GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS) == 0)
|
||||||
{
|
{
|
||||||
//try to decode frame
|
//try to decode frame
|
||||||
LOG(INFO) << "Starting page decoder for Galileo SAT " << this->d_satellite;
|
LOG(INFO) << "Starting page decoder for Galileo satellite " << this->d_satellite;
|
||||||
d_preamble_index = d_sample_counter; //record the preamble sample stamp
|
d_preamble_index = d_sample_counter; //record the preamble sample stamp
|
||||||
d_stat = 2;
|
d_stat = 2;
|
||||||
}
|
}
|
||||||
|
@@ -149,34 +149,38 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int fram
|
|||||||
d_nav.split_page(page_String);
|
d_nav.split_page(page_String);
|
||||||
if(d_nav.flag_CRC_test == true)
|
if(d_nav.flag_CRC_test == true)
|
||||||
{
|
{
|
||||||
LOG(INFO) << "Galileo CRC correct on channel " << d_channel << " from satellite " << d_satellite;
|
LOG(INFO) << "Galileo E5a CRC correct on channel " << d_channel << " from satellite " << d_satellite;
|
||||||
std::cout << "Galileo CRC correct on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
//std::cout << "Galileo E5a CRC correct on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Galileo CRC error on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
std::cout << "Galileo E5a CRC error on channel " << d_channel << " from satellite " << d_satellite << std::endl;
|
||||||
LOG(INFO)<< "Galileo CRC error on channel " << d_channel << " from satellite " << d_satellite;
|
LOG(INFO)<< "Galileo E5a CRC error on channel " << d_channel << " from satellite " << d_satellite;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Push the new navigation data to the queues
|
// 4. Push the new navigation data to the queues
|
||||||
if (d_nav.have_new_ephemeris() == true)
|
if (d_nav.have_new_ephemeris() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
|
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
|
||||||
|
std::cout << "New Galileo E5a F/NAV message received: ephemeris from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_iono_and_GST() == true)
|
if (d_nav.have_new_iono_and_GST() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_nav.get_iono());
|
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_nav.get_iono());
|
||||||
|
std::cout << "New Galileo E5a F/NAV message received: iono/GST model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_nav.have_new_utc_model() == true)
|
if (d_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
|
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
|
||||||
|
std::cout << "New Galileo E5a F/NAV message received: UTC model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
|
galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
|
||||||
Gnss_Satellite satellite, bool dump) : gr::block("galileo_e5a_telemetry_decoder_cc",
|
Gnss_Satellite satellite, bool dump) : gr::block("galileo_e5a_telemetry_decoder_cc",
|
||||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||||
@@ -324,7 +328,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut
|
|||||||
if (corr_flag == true) // preamble fully correlates
|
if (corr_flag == true) // preamble fully correlates
|
||||||
{
|
{
|
||||||
d_preamble_index = d_sample_counter - GALILEO_FNAV_CODES_PER_PREAMBLE;//record the preamble sample stamp. Remember correlation appears at the end of the preamble in this design
|
d_preamble_index = d_sample_counter - GALILEO_FNAV_CODES_PER_PREAMBLE;//record the preamble sample stamp. Remember correlation appears at the end of the preamble in this design
|
||||||
LOG(INFO) << "Preamble detection for Galileo SAT " << this->d_satellite << std::endl;
|
LOG(INFO) << "Preamble detection in E5a for Galileo satellite " << this->d_satellite << std::endl;
|
||||||
d_symbol_counter = 0; // d_page_symbols start right after preamble and finish at the end of next preamble.
|
d_symbol_counter = 0; // d_page_symbols start right after preamble and finish at the end of next preamble.
|
||||||
d_state = 2; // preamble lock
|
d_state = 2; // preamble lock
|
||||||
}
|
}
|
||||||
@@ -402,7 +406,8 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut
|
|||||||
{
|
{
|
||||||
d_flag_frame_sync = true;
|
d_flag_frame_sync = true;
|
||||||
DLOG(INFO) << " Frame sync SAT " << this->d_satellite << " with preamble start at "
|
DLOG(INFO) << " Frame sync SAT " << this->d_satellite << " with preamble start at "
|
||||||
<< in[0].Tracking_sample_counter << " [samples]"; }
|
<< in[0].Tracking_sample_counter << " [samples]";
|
||||||
|
}
|
||||||
d_symbol_counter = 0; // d_page_symbols start right after preamble and finish at the end of next preamble.
|
d_symbol_counter = 0; // d_page_symbols start right after preamble and finish at the end of next preamble.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -108,7 +108,8 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
|
|||||||
{
|
{
|
||||||
std::bitset<GPS_L2_CNAV_DATA_PAGE_BITS> raw_bits;
|
std::bitset<GPS_L2_CNAV_DATA_PAGE_BITS> raw_bits;
|
||||||
//Expand packet bits to bitsets. Notice the reverse order of the bits sequence, required by the CNAV message decoder
|
//Expand packet bits to bitsets. Notice the reverse order of the bits sequence, required by the CNAV message decoder
|
||||||
for (u32 i = 0; i < GPS_L2_CNAV_DATA_PAGE_BITS ; i++) {
|
for (u32 i = 0; i < GPS_L2_CNAV_DATA_PAGE_BITS ; i++)
|
||||||
|
{
|
||||||
raw_bits[GPS_L2_CNAV_DATA_PAGE_BITS - 1 - i] = ((msg.raw_msg[i/8] >> (7 - i%8)) & 1u);
|
raw_bits[GPS_L2_CNAV_DATA_PAGE_BITS - 1 - i] = ((msg.raw_msg[i/8] >> (7 - i%8)) & 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,21 +120,21 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
|
|||||||
{
|
{
|
||||||
// get ephemeris object for this SV
|
// get ephemeris object for this SV
|
||||||
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
|
||||||
std::cout << "New GPS CNAV Ephemeris received for SV " << tmp_obj->i_satellite_PRN << std::endl;
|
std::cout << "New GPS CNAV message received: ephemeris from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
|
|
||||||
}
|
}
|
||||||
if (d_CNAV_Message.have_new_iono() == true)
|
if (d_CNAV_Message.have_new_iono() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
|
||||||
std::cout << "New GPS CNAV IONO model received for SV " << d_satellite.get_PRN() << std::endl;
|
std::cout << "New GPS CNAV message received: iono model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_CNAV_Message.have_new_utc_model() == true)
|
if (d_CNAV_Message.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
|
||||||
std::cout << "New GPS CNAV UTC model received for SV " << d_satellite.get_PRN() << std::endl;
|
std::cout << "New GPS CNAV message received: UTC model parameters from satellite " << d_satellite << std::endl;
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,14 +186,12 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||||
out[0] = current_synchro_data;
|
out[0] = current_synchro_data;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l2c_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
void gps_l2c_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
||||||
{
|
{
|
||||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
@@ -200,7 +199,6 @@ void gps_l2c_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l2c_telemetry_decoder_cc::set_channel(int channel)
|
void gps_l2c_telemetry_decoder_cc::set_channel(int channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
|
@@ -260,7 +260,7 @@ void GpsL1CaSubframeFsm::gps_subframe_to_nav_msg()
|
|||||||
//int subframe_ID;
|
//int subframe_ID;
|
||||||
// NEW GPS SUBFRAME HAS ARRIVED!
|
// NEW GPS SUBFRAME HAS ARRIVED!
|
||||||
d_subframe_ID = d_nav.subframe_decoder(this->d_subframe); //decode the subframe
|
d_subframe_ID = d_nav.subframe_decoder(this->d_subframe); //decode the subframe
|
||||||
std::cout << "NAV Message: received subframe "
|
std::cout << "New GPS NAV message received: subframe "
|
||||||
<< d_subframe_ID << " from satellite "
|
<< d_subframe_ID << " from satellite "
|
||||||
<< Gnss_Satellite(std::string("GPS"), i_satellite_PRN) << std::endl;
|
<< Gnss_Satellite(std::string("GPS"), i_satellite_PRN) << std::endl;
|
||||||
d_nav.i_satellite_PRN = i_satellite_PRN;
|
d_nav.i_satellite_PRN = i_satellite_PRN;
|
||||||
|
Reference in New Issue
Block a user