TCP port and RTCM station ID are now configured by the printer

Merge branch 'next' of git+ssh://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
Carles Fernandez 2016-05-06 21:00:08 +02:00
commit 9cbb88bc9f
37 changed files with 320 additions and 239 deletions

View File

@ -313,3 +313,8 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
;######### OUTPUT_FILTER CONFIG ############
;# Receiver output filter: Leave this block disabled in this version
OutputFilter.implementation=Null_Sink_Output_Filter
OutputFilter.filename=data/gnss-sdr.dat
OutputFilter.item_type=gr_complex

View File

@ -82,3 +82,6 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
;######### OUTPUT_FILTER CONFIG ############
OutputFilter.implementation=Null_Sink_Output_Filter
OutputFilter.item_type=gr_complex

View File

@ -203,7 +203,7 @@ Acquisition_1B.cboc=false
;######### TRACKING GLOBAL CONFIG ############
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_PLL_C_Aid_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
Tracking_1B.item_type=gr_complex
@ -223,6 +223,9 @@ Tracking_1B.pll_bw_hz=15.0;
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
Tracking_1B.dll_bw_hz=2.0;
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
Tracking_1B.fll_bw_hz=10.0;
;#order: PLL/DLL loop filter order [2] or [3]
Tracking_1B.order=3;
@ -290,3 +293,4 @@ PVT.flag_rtcm_tty_port=false;
;#rtcm_dump_devname: serial device descriptor for RTCM logging
PVT.rtcm_dump_devname=/dev/pts/1

View File

@ -79,8 +79,10 @@ GalileoE1Pvt::GalileoE1Pvt(ConfigurationInterface* configuration,
rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
bool flag_rtcm_server;
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
// make PVT object
pvt_ = galileo_e1_make_pvt_cc(in_streams_, 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);
pvt_ = galileo_e1_make_pvt_cc(in_streams_, 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_tcp_port, rtcm_station_id, rtcm_dump_devname);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}

View File

@ -81,14 +81,16 @@ GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
bool flag_rtcm_server;
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
// getting names from the config file, if available
// default filename for assistance data
const std::string eph_default_xml_filename = "./gps_ephemeris.xml";
const std::string utc_default_xml_filename = "./gps_utc_model.xml";
const std::string iono_default_xml_filename = "./gps_iono.xml";
const std::string ref_time_default_xml_filename = "./gps_ref_time.xml";
const std::string ref_location_default_xml_filename = "./gps_ref_location.xml";
//const std::string utc_default_xml_filename = "./gps_utc_model.xml";
//const std::string iono_default_xml_filename = "./gps_iono.xml";
//const std::string ref_time_default_xml_filename = "./gps_ref_time.xml";
//const std::string ref_location_default_xml_filename = "./gps_ref_location.xml";
eph_xml_filename_= configuration->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
//std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename);
//std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename);
@ -96,7 +98,7 @@ GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
//std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
// make PVT object
pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, 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 );
pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, 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_tcp_port, rtcm_station_id, rtcm_dump_devname );
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}
@ -104,10 +106,10 @@ bool GpsL1CaPvt::save_assistance_to_XML()
{
// return variable (true == succeeded)
bool ret = false;
LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename_;
std::map<int,Gps_Ephemeris> eph_map = pvt_->get_GPS_L1_ephemeris_map();
std::map<int,Gps_Ephemeris> eph_map=pvt_->get_GPS_L1_ephemeris_map();
if (eph_map.size() > 0)
{
try
@ -120,7 +122,7 @@ bool GpsL1CaPvt::save_assistance_to_XML()
}
catch (std::exception& e)
{
LOG(ERROR) << e.what();
LOG(WARNING) << e.what();
return false;
}
return true;
@ -131,58 +133,58 @@ bool GpsL1CaPvt::save_assistance_to_XML()
return false;
}
// Only try to save {utc, iono, ref time, ref location} if SUPL is enabled
// bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false);
// if (enable_gps_supl_assistance == true)
// {
// // try to save utc model xml file
// std::map<int, Gps_Utc_Model> utc_copy = global_gps_utc_model_map.get_map_copy();
// if (supl_client_acquisition_.save_utc_map_xml(utc_xml_filename, utc_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved UTC Model XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save utc XML file";
// //ret = false;
// }
// // try to save iono model xml file
// std::map<int, Gps_Iono> iono_copy = global_gps_iono_map.get_map_copy();
// if (supl_client_acquisition_.save_iono_map_xml(iono_xml_filename, iono_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved IONO Model XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save iono XML file";
// //ret = false;
// }
// // try to save ref time xml file
// std::map<int, Gps_Ref_Time> ref_time_copy = global_gps_ref_time_map.get_map_copy();
// if (supl_client_acquisition_.save_ref_time_map_xml(ref_time_xml_filename, ref_time_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved Ref Time XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save ref time XML file";
// //ref = false;
// }
// // try to save ref location xml file
// std::map<int, Gps_Ref_Location> ref_location_copy = global_gps_ref_location_map.get_map_copy();
// if (supl_client_acquisition_.save_ref_location_map_xml(ref_location_xml_filename, ref_location_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved Ref Location XML file";
// //ref = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save ref location XML file";
// //ret = false;
// }
// }
// bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false);
// if (enable_gps_supl_assistance == true)
// {
// // try to save utc model xml file
// std::map<int, Gps_Utc_Model> utc_copy = global_gps_utc_model_map.get_map_copy();
// if (supl_client_acquisition_.save_utc_map_xml(utc_xml_filename, utc_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved UTC Model XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save utc XML file";
// //ret = false;
// }
// // try to save iono model xml file
// std::map<int, Gps_Iono> iono_copy = global_gps_iono_map.get_map_copy();
// if (supl_client_acquisition_.save_iono_map_xml(iono_xml_filename, iono_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved IONO Model XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save iono XML file";
// //ret = false;
// }
// // try to save ref time xml file
// std::map<int, Gps_Ref_Time> ref_time_copy = global_gps_ref_time_map.get_map_copy();
// if (supl_client_acquisition_.save_ref_time_map_xml(ref_time_xml_filename, ref_time_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved Ref Time XML file";
// //ret = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save ref time XML file";
// //ref = false;
// }
// // try to save ref location xml file
// std::map<int, Gps_Ref_Location> ref_location_copy = global_gps_ref_location_map.get_map_copy();
// if (supl_client_acquisition_.save_ref_location_map_xml(ref_location_xml_filename, ref_location_copy) == true)
// {
// LOG(INFO) << "SUPL: Successfully saved Ref Location XML file";
// //ref = true;
// }
// else
// {
// LOG(INFO) << "SUPL: Error while trying to save ref location XML file";
// //ret = false;
// }
// }
return ret;
}

View File

@ -82,6 +82,8 @@ HybridPvt::HybridPvt(ConfigurationInterface* configuration,
rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
bool flag_rtcm_server;
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
// getting names from the config file, if available
// default filename for assistance data
@ -97,7 +99,7 @@ HybridPvt::HybridPvt(ConfigurationInterface* configuration,
//std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
// make PVT object
pvt_ = hybrid_make_pvt_cc(in_streams_, 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);
pvt_ = hybrid_make_pvt_cc(in_streams_, 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_tcp_port, rtcm_station_id, rtcm_dump_devname);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}

View File

@ -43,11 +43,12 @@ using google::LogMessage;
galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, 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)
std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, std::string rtcm_dump_devname)
{
return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, 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));
flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_dump_devname));
}
@ -106,7 +107,8 @@ void galileo_e1_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, 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) :
bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, 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;
@ -138,7 +140,9 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, bool dump, std::str
//initialize rtcm_printer
std::string rtcm_dump_filename;
rtcm_dump_filename = d_dump_filename;
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
unsigned short _port = rtcm_tcp_port;
unsigned short _station_id = rtcm_station_id;
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, _port, _station_id, rtcm_dump_devname);
d_dump_filename.append("_raw.dat");
dump_ls_pvt_filename.append("_ls_pvt.dat");
@ -298,7 +302,7 @@ int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)),
gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 0, 0, 0, 0, 0);
}
}
}
@ -313,7 +317,7 @@ int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)),
if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 0, 0, 0, 0, 0);
}
b_rtcm_writing_started = true;
}

View File

@ -59,6 +59,8 @@ galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int n_channels,
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
/*!
@ -79,6 +81,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
galileo_e1_pvt_cc(unsigned int nchannels,
bool dump, std::string dump_filename,
@ -91,6 +95,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
void msg_handler_telemetry(pmt::pmt_t msg);

View File

@ -43,9 +43,36 @@
using google::LogMessage;
gps_l1_ca_pvt_cc_sptr
gps_l1_ca_make_pvt_cc(unsigned int nchannels, 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)
gps_l1_ca_make_pvt_cc(unsigned int nchannels,
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,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname)
{
return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels, 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 gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels,
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_tcp_port,
rtcm_station_id,
rtcm_dump_devname));
}
@ -160,6 +187,8 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname) :
gr::block("gps_l1_ca_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, sizeof(gr_complex)) )
@ -194,7 +223,9 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
//initialize rtcm_printer
std::string rtcm_dump_filename;
rtcm_dump_filename = d_dump_filename;
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
d_rtcm_tcp_port = rtcm_tcp_port;
d_rtcm_station_id = rtcm_station_id;
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, d_rtcm_tcp_port, d_rtcm_station_id, rtcm_dump_devname);
b_rtcm_writing_started = false;
d_dump_filename.append("_raw.dat");
@ -349,7 +380,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), g
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_pseudoranges_map, 0, 0, 0, 0, 0);
}
}
}
@ -365,7 +396,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), g
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_pseudoranges_map, 0, 0, 0, 0, 0);
}
b_rtcm_writing_started = true;
}

View File

@ -57,6 +57,8 @@ gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int n_channels,
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname
);
@ -78,6 +80,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
gps_l1_ca_pvt_cc(unsigned int nchannels,
bool dump,
@ -91,6 +95,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
void msg_handler_telemetry(pmt::pmt_t msg);
@ -100,6 +106,8 @@ private:
bool b_rinex_sbs_header_writen;
bool b_rinex_header_updated;
bool b_rtcm_writing_started;
unsigned short d_rtcm_tcp_port;
unsigned short d_rtcm_station_id;
void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
int d_last_status_print_seg; //for status printer

View File

@ -41,9 +41,37 @@
using google::LogMessage;
hybrid_pvt_cc_sptr
hybrid_make_pvt_cc(unsigned int nchannels, 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_make_pvt_cc(unsigned int nchannels,
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,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname)
{
return hybrid_pvt_cc_sptr(new hybrid_pvt_cc(nchannels, 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 hybrid_pvt_cc_sptr(new hybrid_pvt_cc(nchannels,
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_tcp_port,
rtcm_station_id,
rtcm_dump_devname));
}
@ -139,7 +167,8 @@ std::map<int,Gps_Ephemeris> hybrid_pvt_cc::get_GPS_L1_ephemeris_map()
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, 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) :
bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, std::string rtcm_dump_devname) :
gr::block("hybrid_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, sizeof(gr_complex)))
@ -173,7 +202,7 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, bool dump, std::string dump
//initialize rtcm_printer
std::string rtcm_dump_filename;
rtcm_dump_filename = d_dump_filename;
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
d_rtcm_printer = std::make_shared<Rtcm_Printer>(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_dump_devname);
d_dump_filename.append("_raw.dat");
dump_ls_pvt_filename.append("_ls_pvt.dat");

View File

@ -59,6 +59,8 @@ hybrid_pvt_cc_sptr hybrid_make_pvt_cc(unsigned int n_channels,
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
/*!
@ -79,6 +81,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
hybrid_pvt_cc(unsigned int nchannels,
bool dump, std::string dump_filename,
@ -91,6 +95,8 @@ private:
std::string nmea_dump_devname,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id,
std::string rtcm_dump_devname);
void msg_handler_telemetry(pmt::pmt_t msg);

View File

@ -43,7 +43,7 @@
using google::LogMessage;
Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname, bool time_tag_name)
Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port, unsigned short rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name)
{
time_t rawtime;
struct tm * timeinfo;
@ -113,7 +113,11 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool fla
rtcm_dev_descriptor = -1;
}
rtcm = std::make_shared<Rtcm>();
port = rtcm_tcp_port;
station_id = rtcm_station_id;
rtcm = std::make_shared<Rtcm>(port);
if(flag_rtcm_server)
{
rtcm->run_server();
@ -143,7 +147,7 @@ Rtcm_Printer::~Rtcm_Printer()
bool Rtcm_Printer::Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
{
std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, pseudoranges);
std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, pseudoranges, station_id);
Rtcm_Printer::Print_Message(m1001);
return true;
}
@ -151,7 +155,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_ti
bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
{
std::string m1002 = rtcm->print_MT1002(gps_eph, obs_time, pseudoranges);
std::string m1002 = rtcm->print_MT1002(gps_eph, obs_time, pseudoranges, station_id);
Rtcm_Printer::Print_Message(m1002);
return true;
}
@ -178,7 +182,6 @@ bool Rtcm_Printer::Print_Rtcm_MSM(unsigned int msm_number, const Gps_Ephemeris &
const Galileo_Ephemeris & gal_eph,
double obs_time,
const std::map<int, Gnss_Synchro> & pseudoranges,
unsigned int ref_id,
unsigned int clock_steering_indicator,
unsigned int external_clock_indicator,
int smooth_int,
@ -188,31 +191,31 @@ bool Rtcm_Printer::Print_Rtcm_MSM(unsigned int msm_number, const Gps_Ephemeris &
std::string msm;
if(msm_number == 1)
{
msm = rtcm->print_MSM_1(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_1(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 2)
{
msm = rtcm->print_MSM_2(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_2(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 3)
{
msm = rtcm->print_MSM_3(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_3(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 4)
{
msm = rtcm->print_MSM_4(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_4(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 5)
{
msm = rtcm->print_MSM_5(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_5(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 6)
{
msm = rtcm->print_MSM_6(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_6(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else if(msm_number == 7)
{
msm = rtcm->print_MSM_7(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
msm = rtcm->print_MSM_7(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
}
else
{
@ -261,7 +264,6 @@ int Rtcm_Printer::init_serial(std::string serial_device)
}
void Rtcm_Printer::close_serial()
{
if (rtcm_dev_descriptor != -1)
@ -271,7 +273,6 @@ void Rtcm_Printer::close_serial()
}
bool Rtcm_Printer::Print_Message(const std::string & message)
{
//write to file

View File

@ -48,7 +48,7 @@ public:
/*!
* \brief Default constructor.
*/
Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_filename, bool time_tag_name = true);
Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port, unsigned short rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true);
/*!
* \brief Default destructor.
@ -65,7 +65,6 @@ public:
const Galileo_Ephemeris & gal_eph,
double obs_time,
const std::map<int, Gnss_Synchro> & pseudoranges,
unsigned int ref_id,
unsigned int clock_steering_indicator,
unsigned int external_clock_indicator,
int smooth_int,
@ -81,6 +80,8 @@ private:
std::string rtcm_filename; // String with the RTCM log filename
std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file
std::string rtcm_devname;
unsigned short port;
unsigned short station_id;
int rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
int init_serial (std::string serial_device); //serial port control
void close_serial ();

View File

@ -55,9 +55,9 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0)
@ -90,7 +90,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, samples_per_ms, code_length_,
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
queue_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector("
@ -103,11 +103,11 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -53,9 +53,9 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
item_type_ = configuration_->property(role + ".item_type", default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0)
@ -96,7 +96,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, samples_per_ms, code_length_,
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
@ -107,11 +107,11 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -54,9 +54,9 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
item_type_ = configuration_->property(role + ".item_type", default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0)
@ -90,7 +90,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, samples_per_ms, code_length_,
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
queue_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector("
@ -103,11 +103,11 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -55,9 +55,9 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8);
/*--- Find number of samples per spreading code (4 ms) -----------------*/
@ -123,7 +123,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
sampled_ms_, max_dwells_, shift_resolution_, if_, fs_in_,
sampled_ms_, max_dwells_, doppler_max_, if_, fs_in_,
samples_per_ms, code_length_, bit_transition_flag_, queue_,
dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_,
@ -138,11 +138,11 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -55,9 +55,9 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
if (sampled_ms_ % 4 != 0)
@ -91,7 +91,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
if (item_type_.compare("gr_complex") == 0)
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, shift_resolution_,
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_,
if_, fs_in_, samples_per_ms, code_length_, tong_init_val_,
tong_max_val_, queue_, dump_, dump_filename_);
@ -106,12 +106,11 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
bit_transition_flag_ = false;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -137,7 +137,6 @@ private:
std::string item_type_;
unsigned int vector_length_;
unsigned int code_length_;
bool bit_transition_flag_;
unsigned int channel_;
float threshold_;
unsigned int doppler_max_;

View File

@ -60,9 +60,9 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
item_type_ = configuration_->property(role + ".item_type", default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
CAF_window_hz_ = configuration_->property(role + ".CAF_window_hz",0);
Zero_padding = configuration_->property(role + ".Zero_padding",0);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
@ -80,8 +80,8 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
}
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
//--- Find number of samples per spreading code (1ms)-------------------------
code_length_ = round(fs_in_ / Galileo_E5a_CODE_CHIP_RATE_HZ * Galileo_E5a_CODE_LENGTH_CHIPS);
@ -101,20 +101,19 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, queue_, dump_, dump_filename_, both_signal_components, CAF_window_hz_,Zero_padding);
doppler_max_, if_, fs_in_, code_length_, code_length_, bit_transition_flag_, queue_,
dump_, dump_filename_, both_signal_components, CAF_window_hz_,Zero_padding);
}
else
{
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
bit_transition_flag_ = false;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -58,9 +58,9 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
//float pfa = configuration_->property(role + ".pfa", 0.0);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
@ -88,14 +88,14 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
{
item_size_ = sizeof(lv_16sc_t);
acquisition_sc_ = pcps_make_acquisition_sc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
}else{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
}
@ -114,9 +114,9 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();
}
channel_ = 0;
threshold_ = 0.0;
doppler_max_ = 0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -53,13 +53,14 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
item_type_ = configuration->property(role + ".item_type", default_item_type);
fs_in_ = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration->property(role + ".ifreq", 0);
if_ = configuration->property(role + ".if", 0);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
doppler_min_ = configuration->property(role + ".doppler_min", -5000);
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
max_dwells_= configuration->property(role + ".max_dwells", 1);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
//--- Find number of samples per spreading code -------------------------
vector_length_ = round(fs_in_
@ -79,6 +80,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;

View File

@ -55,7 +55,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
item_type_ = configuration->property(role + ".item_type", default_item_type);
fs_in_ = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration->property(role + ".ifreq", 0);
if_ = configuration->property(role + ".if", 0);
dump_ = configuration->property(role + ".dump", false);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
doppler_min_ = configuration->property(role + ".doppler_min", -5000);
@ -82,11 +82,11 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -55,9 +55,9 @@ GpsL1CaPcpsMultithreadAcquisition::GpsL1CaPcpsMultithreadAcquisition(
default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false);
@ -86,7 +86,7 @@ GpsL1CaPcpsMultithreadAcquisition::GpsL1CaPcpsMultithreadAcquisition(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_multithread_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, queue_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
@ -101,11 +101,11 @@ GpsL1CaPcpsMultithreadAcquisition::GpsL1CaPcpsMultithreadAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -54,9 +54,9 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false);
@ -85,7 +85,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_opencl_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, queue_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
@ -98,11 +98,11 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
item_size_ = sizeof(gr_complex);
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -55,9 +55,9 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
item_type_ = configuration_->property(role + ".item_type", default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
@ -116,7 +116,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_,
sampled_ms_, max_dwells_,shift_resolution_, if_, fs_in_,
sampled_ms_, max_dwells_,doppler_max_, if_, fs_in_,
samples_per_ms, code_length_,bit_transition_flag_, queue_,
dump_, dump_filename_);
@ -132,11 +132,10 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -54,9 +54,9 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
item_type_ = configuration_->property(role + ".item_type", default_item_type);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
tong_init_val_ = configuration->property(role + ".tong_init_val", 1);
@ -75,7 +75,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
if (item_type_.compare("gr_complex") == 0)
{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, shift_resolution_, if_, fs_in_,
acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, if_, fs_in_,
code_length_, code_length_, tong_init_val_, tong_max_val_,
queue_, dump_, dump_filename_);
@ -90,12 +90,10 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
bit_transition_flag_ = false;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -94,8 +94,7 @@ public:
*/
void set_threshold(float threshold);
/*! bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false);
/*!
* \brief Set maximum Doppler off grid search
*/
void set_doppler_max(unsigned int doppler_max);
@ -138,7 +137,6 @@ private:
std::string item_type_;
unsigned int vector_length_;
unsigned int code_length_;
bool bit_transition_flag_;
unsigned int channel_;
float threshold_;
unsigned int doppler_max_;

View File

@ -56,9 +56,9 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
//float pfa = configuration_->property(role + ".pfa", 0.0);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
if_ = configuration_->property(role + ".ifreq", 0);
if_ = configuration_->property(role + ".if", 0);
dump_ = configuration_->property(role + ".dump", false);
shift_resolution_ = configuration_->property(role + ".doppler_max", 15);
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
@ -86,7 +86,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
// {
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(1, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
@ -106,18 +106,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();
}
//}
//else
// {
// LOG(WARNING) << item_type_
// << " unknown acquisition item type";
// }
gnss_synchro_ = 0;
threshold_ = 0.0;
doppler_max_ = 5000;
doppler_step_ = 250;
channel_ = 0;
threshold_ = 0.0;
doppler_step_ = 0;
gnss_synchro_ = 0;
}

View File

@ -16,7 +16,7 @@
* <li> If the test statistics exceeds the threshold, increment the Tong counter.
* <li> Otherwise, decrement the Tong counter.
* <li> If the Tong counter is equal to a given maximum value, declare positive
* <li> acquisition. If the Tong counter is equa to zero, declare negative
* <li> acquisition. If the Tong counter is equal to zero, declare negative
* <li> acquisition. Otherwise, process the next block.
* </ol>
*

View File

@ -64,12 +64,7 @@ Channel::Channel(ConfigurationInterface *configuration, unsigned int channel,
acq_->set_gnss_synchro(&gnss_synchro_);
trk_->set_gnss_synchro(&gnss_synchro_);
// IMPORTANT: Do not change the order between set_doppler_max, set_doppler_step and set_threshold
unsigned int doppler_max = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_max", 0);
if(doppler_max == 0) doppler_max = configuration->property("Acquisition_" + implementation_+ ".doppler_max", 0);
DLOG(INFO) << "Channel "<< channel_ << " Doppler_max = " << doppler_max;
acq_->set_doppler_max(doppler_max);
// IMPORTANT: Do not change the order between set_doppler_step and set_threshold
unsigned int doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_step" ,0);
if(doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_+".doppler_step", 500);

View File

@ -255,7 +255,8 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C(
std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue)
{
//"appendix" is added to the "role" with the aim of Acquisition, Tracking and Telemetry Decoder adapters
//can find their specific configurations when they read the config
//TODO: REMOVE APPENDIX!! AND CHECK ALTERNATIVE MECHANISM TO GET PARTICULARIZED PARAMETERS
LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: "
<< acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm;
@ -497,9 +498,10 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
//**************** GPS L1 C/A CHANNELS **********************
LOG(INFO) << "Getting " << Channels_1C_count << " GPS L1 C/A channels";
acquisition_implementation = configuration->property("Acquisition_1C.implementation", default_implementation);
tracking_implementation = configuration->property("Tracking_1C.implementation", default_implementation);
telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1C.implementation", default_implementation);
acquisition_implementation = configuration->property("Acquisition_1C.implementation", default_implementation);
for (unsigned int i = 0; i < Channels_1C_count; i++)
{
@ -554,7 +556,7 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
channel_absolute_id++;
}
//**************** GALILEO E1 B (I/NAV OS) **********************
//**************** GALILEO E1 B (I/NAV OS) CHANNELS **********************
LOG(INFO) << "Getting " << Channels_1B_count << " GALILEO E1 B (I/NAV OS) channels";
tracking_implementation = configuration->property("Tracking_1B.implementation", default_implementation);

View File

@ -45,20 +45,9 @@
using google::LogMessage;
Rtcm::Rtcm()
{
// 2101 is the standard RTCM port according to the Internet Assigned Numbers Authority (IANA)
// https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
unsigned short _default_port = 2101;
unsigned short _default_station_id = 1234;
Rtcm::Rtcm(_default_port, _default_station_id);
}
Rtcm::Rtcm(unsigned short port, unsigned short station_id)
Rtcm::Rtcm(unsigned short port)
{
RTCM_port = port;
RTCM_Station_ID = station_id;
preamble = std::bitset<8>("11010011");
reserved_field = std::bitset<6>("000000");
rtcm_message_queue = std::make_shared< concurrent_queue<std::string> >();
@ -451,9 +440,9 @@ std::bitset<58> Rtcm::get_MT1001_sat_content(const Gps_Ephemeris & eph, double o
}
std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id)
{
unsigned int ref_id = static_cast<unsigned int>(RTCM_Station_ID);
unsigned int ref_id = static_cast<unsigned int>(station_id);
unsigned int smooth_int = 0;
bool sync_flag = false;
bool divergence_free = false;
@ -501,9 +490,9 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, c
//
// ********************************************************
std::string Rtcm::print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
std::string Rtcm::print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id)
{
unsigned int ref_id = static_cast<unsigned int>(RTCM_Station_ID);
unsigned int ref_id = static_cast<unsigned int>(station_id);
unsigned int smooth_int = 0;
bool sync_flag = false;
bool divergence_free = false;
@ -573,9 +562,9 @@ std::bitset<74> Rtcm::get_MT1002_sat_content(const Gps_Ephemeris & eph, double o
//
// ********************************************************
std::string Rtcm::print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
std::string Rtcm::print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id)
{
unsigned int ref_id = static_cast<unsigned int>(RTCM_Station_ID);
unsigned int ref_id = static_cast<unsigned int>(station_id);
unsigned int smooth_int = 0;
bool sync_flag = false;
bool divergence_free = false;
@ -683,9 +672,9 @@ std::bitset<101> Rtcm::get_MT1003_sat_content(const Gps_Ephemeris & ephL1, const
//
// ******************************************************************
std::string Rtcm::print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
std::string Rtcm::print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id)
{
unsigned int ref_id = static_cast<unsigned int>(RTCM_Station_ID);
unsigned int ref_id = static_cast<unsigned int>(station_id);
unsigned int smooth_int = 0;
bool sync_flag = false;
bool divergence_free = false;

View File

@ -83,29 +83,28 @@
class Rtcm
{
public:
Rtcm(); //<! Default constructor
Rtcm(unsigned short port, unsigned short station_id); //<! Constructor that sets non-default TCP port of the RTCM message server and RTCM Station ID
Rtcm(unsigned short port = 2101); //<! Default constructor that sets TCP port of the RTCM message server and RTCM Station ID. 2101 is the standard RTCM port according to the Internet Assigned Numbers Authority (IANA). See https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
~Rtcm();
/*!
* \brief Prints message type 1001 (L1-Only GPS RTK Observables)
*/
std::string print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
std::string print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id);
/*!
* \brief Prints message type 1002 (Extended L1-Only GPS RTK Observables)
*/
std::string print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
std::string print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id);
/*!
* \brief Prints message type 1003 (L1 & L2 GPS RTK Observables)
*/
std::string print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
std::string print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id);
/*!
* \brief Prints message type 1004 (Extended L1 & L2 GPS RTK Observables)
*/
std::string print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
std::string print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges, unsigned short station_id);
/*!
* \brief Prints message type 1005 (Stationary Antenna Reference Point)
@ -348,7 +347,7 @@ private:
// Classes for TCP communication
//
unsigned short RTCM_port;
unsigned short RTCM_Station_ID;
//unsigned short RTCM_Station_ID;
class Rtcm_Message
{
public:

View File

@ -194,6 +194,7 @@ TEST(Rtcm_Test, MT1001)
gnss_synchro.PRN = 2;
std::string sys = "G";
bool expected_true = true;
unsigned short station_id = 1234;
std::string sig = "1C";
gnss_synchro.System = *sys.c_str();
@ -203,7 +204,7 @@ TEST(Rtcm_Test, MT1001)
std::map<int, Gnss_Synchro> pseudoranges;
pseudoranges.insert(std::pair<int, Gnss_Synchro>(1, gnss_synchro));
std::string MT1001 = rtcm->print_MT1001(gps_eph, obs_time, pseudoranges);
std::string MT1001 = rtcm->print_MT1001(gps_eph, obs_time, pseudoranges, station_id);
EXPECT_EQ(expected_true, rtcm->check_CRC(MT1001));
}
@ -487,7 +488,7 @@ TEST(Rtcm_Test, MSM1)
pseudoranges.insert(std::pair<int, Gnss_Synchro>(3, gnss_synchro3));
pseudoranges.insert(std::pair<int, Gnss_Synchro>(4, gnss_synchro4));
unsigned int ref_id = 1234;
unsigned short ref_id = 1234;
unsigned int clock_steering_indicator = 0;
unsigned int external_clock_indicator = 0;
int smooth_int = 0;

View File

@ -43,7 +43,9 @@ TEST(Rtcm_Printer_Test, Instantiate)
bool flag_rtcm_tty_port = false;
std::string rtcm_dump_devname = "/dev/pts/4";
bool flag_rtcm_server = false;
std::unique_ptr<Rtcm_Printer> RTCM_printer(new Rtcm_Printer(filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
unsigned short rtcm_tcp_port = 2101;
unsigned short rtcm_station_id = 1234;
std::unique_ptr<Rtcm_Printer> RTCM_printer(new Rtcm_Printer(filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_dump_devname));
}
@ -69,8 +71,10 @@ TEST(Rtcm_Printer_Test, Run)
bool flag_rtcm_tty_port = false;
std::string rtcm_dump_devname = "/dev/pts/4";
bool flag_rtcm_server = false;
unsigned short rtcm_tcp_port = 2101;
unsigned short rtcm_station_id = 1234;
std::unique_ptr<Rtcm_Printer> RTCM_printer(new Rtcm_Printer(filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
std::unique_ptr<Rtcm_Printer> RTCM_printer(new Rtcm_Printer(filename, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_dump_devname));
std::string reference_msg = "D300133ED7D30202980EDEEF34B4BD62AC0941986F33360B98";