mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-05 08:04:09 +00:00
Deleting unnecessary contructors when posting messages
and some code formatting
This commit is contained in:
parent
b56183f93b
commit
4a1812197b
@ -40,10 +40,13 @@
|
|||||||
|
|
||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
galileo_e1_pvt_cc_sptr
|
galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename,
|
||||||
galileo_e1_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
|
int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename,
|
||||||
|
std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
|
||||||
{
|
{
|
||||||
return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, queue, dump, dump_filename, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
|
return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, queue, dump, dump_filename, averaging_depth,
|
||||||
|
flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname,
|
||||||
|
flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,34 +57,37 @@ void galileo_e1_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
{
|
{
|
||||||
// ### Galileo EPHEMERIS ###
|
// ### Galileo EPHEMERIS ###
|
||||||
std::shared_ptr<Galileo_Ephemeris> galileo_eph;
|
std::shared_ptr<Galileo_Ephemeris> galileo_eph;
|
||||||
galileo_eph= boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
|
galileo_eph = boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
|
||||||
// insert new ephemeris record
|
// insert new ephemeris record
|
||||||
DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5
|
DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5
|
||||||
<< ", GALILEO Week Number =" << galileo_eph->WN_5
|
<< ", GALILEO Week Number =" << galileo_eph->WN_5
|
||||||
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
|
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN]=*galileo_eph;
|
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph;
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
|
||||||
{
|
{
|
||||||
// ### Galileo IONO ###
|
// ### Galileo IONO ###
|
||||||
std::shared_ptr<Galileo_Iono> galileo_iono;
|
std::shared_ptr<Galileo_Iono> galileo_iono;
|
||||||
galileo_iono= boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
|
galileo_iono = boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->galileo_iono=*galileo_iono;
|
d_ls_pvt->galileo_iono = *galileo_iono;
|
||||||
DLOG(INFO) << "New IONO record has arrived ";
|
DLOG(INFO) << "New IONO record has arrived ";
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Utc_Model>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Utc_Model>) )
|
||||||
{
|
{
|
||||||
// ### Galileo UTC MODEL ###
|
// ### Galileo UTC MODEL ###
|
||||||
std::shared_ptr<Galileo_Utc_Model> galileo_utc_model;
|
std::shared_ptr<Galileo_Utc_Model> galileo_utc_model;
|
||||||
galileo_utc_model= boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
|
galileo_utc_model = boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->galileo_utc_model=*galileo_utc_model;
|
d_ls_pvt->galileo_utc_model = *galileo_utc_model;
|
||||||
DLOG(INFO) << "New UTC record has arrived ";
|
DLOG(INFO) << "New UTC record has arrived ";
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>) )
|
||||||
{
|
{
|
||||||
// ### Galileo Almanac ###
|
// ### Galileo Almanac ###
|
||||||
std::shared_ptr<Galileo_Almanac> galileo_almanac;
|
std::shared_ptr<Galileo_Almanac> galileo_almanac;
|
||||||
galileo_almanac= boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
|
galileo_almanac = boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->galileo_almanac=*galileo_almanac;
|
d_ls_pvt->galileo_almanac = *galileo_almanac;
|
||||||
DLOG(INFO) << "New Galileo Almanac has arrived ";
|
DLOG(INFO) << "New Galileo Almanac has arrived ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,9 +97,12 @@ void galileo_e1_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
DLOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
|
DLOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
|
|
||||||
gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
|
||||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth,
|
||||||
|
bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname,
|
||||||
|
bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
|
||||||
|
gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||||
{
|
{
|
||||||
|
|
||||||
d_output_rate_ms = output_rate_ms;
|
d_output_rate_ms = output_rate_ms;
|
||||||
@ -146,7 +155,7 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<g
|
|||||||
b_rtcm_writing_started = false;
|
b_rtcm_writing_started = false;
|
||||||
rp = std::make_shared<Rinex_Printer>();
|
rp = std::make_shared<Rinex_Printer>();
|
||||||
|
|
||||||
d_last_status_print_seg=0;
|
d_last_status_print_seg = 0;
|
||||||
|
|
||||||
// ############# ENABLE DATA FILE LOG #################
|
// ############# ENABLE DATA FILE LOG #################
|
||||||
if (d_dump == true)
|
if (d_dump == true)
|
||||||
|
@ -56,34 +56,37 @@ void gps_l1_ca_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
{
|
{
|
||||||
// ### GPS EPHEMERIS ###
|
// ### GPS EPHEMERIS ###
|
||||||
std::shared_ptr<Gps_Ephemeris> gps_eph;
|
std::shared_ptr<Gps_Ephemeris> gps_eph;
|
||||||
gps_eph= boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
|
gps_eph = boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
|
||||||
DLOG(INFO) << "Ephemeris record has arrived from SAT ID "
|
DLOG(INFO) << "Ephemeris record has arrived from SAT ID "
|
||||||
<< gps_eph->i_satellite_PRN << " (Block "
|
<< gps_eph->i_satellite_PRN << " (Block "
|
||||||
<< gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")"
|
<< gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")"
|
||||||
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
|
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
|
||||||
<< gps_eph->i_GPS_week;
|
<< gps_eph->i_GPS_week;
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN]=*gps_eph;
|
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph;
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
|
||||||
{
|
{
|
||||||
// ### GPS IONO ###
|
// ### GPS IONO ###
|
||||||
std::shared_ptr<Gps_Iono> gps_iono;
|
std::shared_ptr<Gps_Iono> gps_iono;
|
||||||
gps_iono= boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
|
gps_iono = boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->gps_iono=*gps_iono;
|
d_ls_pvt->gps_iono = *gps_iono;
|
||||||
DLOG(INFO) << "New IONO record has arrived ";
|
DLOG(INFO) << "New IONO record has arrived ";
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Utc_Model>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Utc_Model>) )
|
||||||
{
|
{
|
||||||
// ### GPS UTC MODEL ###
|
// ### GPS UTC MODEL ###
|
||||||
std::shared_ptr<Gps_Utc_Model> gps_utc_model;
|
std::shared_ptr<Gps_Utc_Model> gps_utc_model;
|
||||||
gps_utc_model= boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
|
gps_utc_model = boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->gps_utc_model=*gps_utc_model;
|
d_ls_pvt->gps_utc_model = *gps_utc_model;
|
||||||
DLOG(INFO) << "New UTC record has arrived ";
|
DLOG(INFO) << "New UTC record has arrived ";
|
||||||
}else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Sbas_Ionosphere_Correction>) )
|
}
|
||||||
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Sbas_Ionosphere_Correction>) )
|
||||||
{
|
{
|
||||||
// ### SBAS IONO ###
|
// ### SBAS IONO ###
|
||||||
std::shared_ptr<Sbas_Ionosphere_Correction> sbas_iono;
|
std::shared_ptr<Sbas_Ionosphere_Correction> sbas_iono;
|
||||||
sbas_iono= boost::any_cast<std::shared_ptr<Sbas_Ionosphere_Correction>>(pmt::any_ref(msg));
|
sbas_iono = boost::any_cast<std::shared_ptr<Sbas_Ionosphere_Correction>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->sbas_iono=*sbas_iono;
|
d_ls_pvt->sbas_iono = *sbas_iono;
|
||||||
DLOG(INFO) << "New SBAS IONO record has arrived ";
|
DLOG(INFO) << "New SBAS IONO record has arrived ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,8 +97,8 @@ void gps_l1_ca_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Sbas_Raw_Msg>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Sbas_Raw_Msg>) )
|
||||||
{
|
{
|
||||||
std::shared_ptr<Sbas_Raw_Msg> sbas_raw_msg_ptr;
|
std::shared_ptr<Sbas_Raw_Msg> sbas_raw_msg_ptr;
|
||||||
sbas_raw_msg_ptr= boost::any_cast<std::shared_ptr<Sbas_Raw_Msg>>(pmt::any_ref(msg));
|
sbas_raw_msg_ptr = boost::any_cast<std::shared_ptr<Sbas_Raw_Msg>>(pmt::any_ref(msg));
|
||||||
Sbas_Raw_Msg sbas_raw_msg=*sbas_raw_msg_ptr;
|
Sbas_Raw_Msg sbas_raw_msg = *sbas_raw_msg_ptr;
|
||||||
// read SBAS raw messages directly from queue and write them into rinex file
|
// read SBAS raw messages directly from queue and write them into rinex file
|
||||||
// create the header of not yet done
|
// create the header of not yet done
|
||||||
if(!b_rinex_sbs_header_writen)
|
if(!b_rinex_sbs_header_writen)
|
||||||
@ -137,6 +140,7 @@ void gps_l1_ca_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
|
gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
|
||||||
boost::shared_ptr<gr::msg_queue> queue,
|
boost::shared_ptr<gr::msg_queue> queue,
|
||||||
bool dump, std::string dump_filename,
|
bool dump, std::string dump_filename,
|
||||||
@ -237,7 +241,7 @@ bool pseudoranges_pairCompare_min(const std::pair<int,Gnss_Synchro>& a, const st
|
|||||||
void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
|
void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
|
||||||
{
|
{
|
||||||
// Print the current receiver status using std::cout every second
|
// Print the current receiver status using std::cout every second
|
||||||
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
|
int current_rx_seg = floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
|
||||||
if ( current_rx_seg!= d_last_status_print_seg)
|
if ( current_rx_seg!= d_last_status_print_seg)
|
||||||
{
|
{
|
||||||
d_last_status_print_seg = current_rx_seg;
|
d_last_status_print_seg = current_rx_seg;
|
||||||
|
@ -55,66 +55,66 @@ void hybrid_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
{
|
{
|
||||||
// ### GPS EPHEMERIS ###
|
// ### GPS EPHEMERIS ###
|
||||||
std::shared_ptr<Gps_Ephemeris> gps_eph;
|
std::shared_ptr<Gps_Ephemeris> gps_eph;
|
||||||
gps_eph= boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
|
gps_eph = boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
|
||||||
DLOG(INFO) << "Ephemeris record has arrived from SAT ID "
|
DLOG(INFO) << "Ephemeris record has arrived from SAT ID "
|
||||||
<< gps_eph->i_satellite_PRN << " (Block "
|
<< gps_eph->i_satellite_PRN << " (Block "
|
||||||
<< gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")"
|
<< gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")"
|
||||||
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
|
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
|
||||||
<< gps_eph->i_GPS_week;
|
<< gps_eph->i_GPS_week;
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN]=*gps_eph;
|
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph;
|
||||||
}
|
}
|
||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
|
||||||
{
|
{
|
||||||
// ### GPS IONO ###
|
// ### GPS IONO ###
|
||||||
std::shared_ptr<Gps_Iono> gps_iono;
|
std::shared_ptr<Gps_Iono> gps_iono;
|
||||||
gps_iono= boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
|
gps_iono = boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->gps_iono=*gps_iono;
|
d_ls_pvt->gps_iono = *gps_iono;
|
||||||
DLOG(INFO) << "New IONO record has arrived ";
|
DLOG(INFO) << "New IONO record has arrived ";
|
||||||
}
|
}
|
||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Utc_Model>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Utc_Model>) )
|
||||||
{
|
{
|
||||||
// ### GPS UTC MODEL ###
|
// ### GPS UTC MODEL ###
|
||||||
std::shared_ptr<Gps_Utc_Model> gps_utc_model;
|
std::shared_ptr<Gps_Utc_Model> gps_utc_model;
|
||||||
gps_utc_model= boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
|
gps_utc_model = boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->gps_utc_model=*gps_utc_model;
|
d_ls_pvt->gps_utc_model = *gps_utc_model;
|
||||||
DLOG(INFO) << "New UTC record has arrived ";
|
DLOG(INFO) << "New UTC record has arrived ";
|
||||||
}
|
}
|
||||||
if( pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Ephemeris>) )
|
if( pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Ephemeris>) )
|
||||||
{
|
{
|
||||||
// ### Galileo EPHEMERIS ###
|
// ### Galileo EPHEMERIS ###
|
||||||
std::shared_ptr<Galileo_Ephemeris> galileo_eph;
|
std::shared_ptr<Galileo_Ephemeris> galileo_eph;
|
||||||
galileo_eph= boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
|
galileo_eph = boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
|
||||||
// insert new ephemeris record
|
// insert new ephemeris record
|
||||||
DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5
|
DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5
|
||||||
<< ", GALILEO Week Number =" << galileo_eph->WN_5
|
<< ", GALILEO Week Number =" << galileo_eph->WN_5
|
||||||
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
|
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN]=*galileo_eph;
|
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph;
|
||||||
}
|
}
|
||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
|
||||||
{
|
{
|
||||||
// ### Galileo IONO ###
|
// ### Galileo IONO ###
|
||||||
std::shared_ptr<Galileo_Iono> galileo_iono;
|
std::shared_ptr<Galileo_Iono> galileo_iono;
|
||||||
galileo_iono= boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
|
galileo_iono = boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->galileo_iono=*galileo_iono;
|
d_ls_pvt->galileo_iono = *galileo_iono;
|
||||||
DLOG(INFO) << "New IONO record has arrived ";
|
DLOG(INFO) << "New IONO record has arrived ";
|
||||||
}
|
}
|
||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Utc_Model>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Utc_Model>) )
|
||||||
{
|
{
|
||||||
// ### Galileo UTC MODEL ###
|
// ### Galileo UTC MODEL ###
|
||||||
std::shared_ptr<Galileo_Utc_Model> galileo_utc_model;
|
std::shared_ptr<Galileo_Utc_Model> galileo_utc_model;
|
||||||
galileo_utc_model= boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
|
galileo_utc_model = boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
|
||||||
d_ls_pvt->galileo_utc_model=*galileo_utc_model;
|
d_ls_pvt->galileo_utc_model = *galileo_utc_model;
|
||||||
DLOG(INFO) << "New UTC record has arrived ";
|
DLOG(INFO) << "New UTC record has arrived ";
|
||||||
}
|
}
|
||||||
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>) )
|
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>) )
|
||||||
{
|
{
|
||||||
// ### Galileo Almanac ###
|
// ### Galileo Almanac ###
|
||||||
std::shared_ptr<Galileo_Almanac> galileo_almanac;
|
std::shared_ptr<Galileo_Almanac> galileo_almanac;
|
||||||
galileo_almanac= boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
|
galileo_almanac = boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
|
||||||
// update/insert new ephemeris record to the global ephemeris map
|
// update/insert new ephemeris record to the global ephemeris map
|
||||||
d_ls_pvt->galileo_almanac=*galileo_almanac;
|
d_ls_pvt->galileo_almanac = *galileo_almanac;
|
||||||
DLOG(INFO) << "New Galileo Almanac has arrived ";
|
DLOG(INFO) << "New Galileo Almanac has arrived ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,10 @@ void hybrid_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
|
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename,
|
||||||
|
int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port,
|
||||||
|
std::string nmea_dump_filename, std::string nmea_dump_devname,
|
||||||
|
bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
|
||||||
gr::block("hybrid_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
gr::block("hybrid_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||||
{
|
{
|
||||||
|
@ -250,28 +250,28 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
|||||||
if (d_nav.have_new_ephemeris() == true)
|
if (d_nav.have_new_ephemeris() == true)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
std::shared_ptr<Galileo_Ephemeris> tmp_obj= std::make_shared<Galileo_Ephemeris>();
|
std::shared_ptr<Galileo_Ephemeris> tmp_obj= std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
|
||||||
*tmp_obj = d_nav.get_ephemeris();//notice that the read operation will clear the valid flag
|
//*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));
|
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)
|
||||||
{
|
{
|
||||||
// get object for this SV (mandatory)
|
// get object for this SV (mandatory)
|
||||||
std::shared_ptr<Galileo_Iono> tmp_obj= std::make_shared<Galileo_Iono>();
|
std::shared_ptr<Galileo_Iono> tmp_obj= std::make_shared<Galileo_Iono>(d_nav.get_iono());
|
||||||
*tmp_obj = d_nav.get_iono(); //notice that the read operation will clear the valid flag
|
//*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));
|
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>();
|
std::shared_ptr<Galileo_Utc_Model> tmp_obj= std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
|
||||||
*tmp_obj = d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
|
//*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));
|
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)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>();
|
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>(d_nav.get_almanac());
|
||||||
*tmp_obj = d_nav.get_almanac();
|
//*tmp_obj = 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 almanac received!" << std::endl;
|
||||||
|
@ -216,7 +216,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (preamble_diff_ms > GPS_SUBFRAME_MS+1)
|
if (preamble_diff_ms > GPS_SUBFRAME_MS + 1)
|
||||||
{
|
{
|
||||||
DLOG(INFO) << "Lost of frame sync SAT " << this->d_satellite << " preamble_diff_ms= " << preamble_diff_ms;
|
DLOG(INFO) << "Lost of frame sync SAT " << this->d_satellite << " preamble_diff_ms= " << preamble_diff_ms;
|
||||||
d_stat = 0; // lost of frame sync
|
d_stat = 0; // lost of frame sync
|
||||||
@ -273,7 +273,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
|
|||||||
d_GPS_FSM.d_preamble_time_ms = d_preamble_time_seconds * 1000.0;
|
d_GPS_FSM.d_preamble_time_ms = d_preamble_time_seconds * 1000.0;
|
||||||
d_GPS_FSM.Event_gps_word_valid();
|
d_GPS_FSM.Event_gps_word_valid();
|
||||||
// send TLM data to PVT using asynchronous message queues
|
// send TLM data to PVT using asynchronous message queues
|
||||||
if (d_GPS_FSM.d_flag_new_subframe==true)
|
if (d_GPS_FSM.d_flag_new_subframe == true)
|
||||||
{
|
{
|
||||||
switch (d_GPS_FSM.d_subframe_ID)
|
switch (d_GPS_FSM.d_subframe_ID)
|
||||||
{
|
{
|
||||||
@ -281,22 +281,22 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
|
|||||||
if (d_GPS_FSM.d_nav.satellite_validation() == true)
|
if (d_GPS_FSM.d_nav.satellite_validation() == true)
|
||||||
{
|
{
|
||||||
// get ephemeris object for this SV (mandatory)
|
// get ephemeris object for this SV (mandatory)
|
||||||
std::shared_ptr<Gps_Ephemeris> tmp_obj= std::make_shared<Gps_Ephemeris>();
|
std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(d_GPS_FSM.d_nav.get_ephemeris());
|
||||||
*tmp_obj = d_GPS_FSM.d_nav.get_ephemeris();
|
// *tmp_obj = d_GPS_FSM.d_nav.get_ephemeris();
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // Possible IONOSPHERE and UTC model update (page 18)
|
case 4: // Possible IONOSPHERE and UTC model update (page 18)
|
||||||
if (d_GPS_FSM.d_nav.flag_iono_valid == true)
|
if (d_GPS_FSM.d_nav.flag_iono_valid == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Gps_Iono> tmp_obj= std::make_shared<Gps_Iono>();
|
std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>( d_GPS_FSM.d_nav.get_iono());
|
||||||
*tmp_obj = d_GPS_FSM.d_nav.get_iono(); //notice that the read operation will clear the valid flag
|
// *tmp_obj = d_GPS_FSM.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));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_GPS_FSM.d_nav.flag_utc_model_valid == true)
|
if (d_GPS_FSM.d_nav.flag_utc_model_valid == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Gps_Utc_Model> tmp_obj= std::make_shared<Gps_Utc_Model>();
|
std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(d_GPS_FSM.d_nav.get_utc_model());
|
||||||
*tmp_obj = d_GPS_FSM.d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
|
//*tmp_obj = d_GPS_FSM.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));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user