1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Configure RINEX version via configuration

This supersedes the value passed by the --RINEX_version flag. Useful for system testing
This commit is contained in:
Carles Fernandez 2016-12-21 15:43:00 +01:00
parent 211b7b34c0
commit 2744a26344
6 changed files with 32 additions and 16 deletions

View File

@ -103,6 +103,10 @@ GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
//std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename); //std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename);
//std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename); //std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
// RINEX version
int conf_rinex_version;
conf_rinex_version = configuration->property(role + ".rinex_version", 0);
// make PVT object // make PVT object
pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, pvt_ = gps_l1_ca_make_pvt_cc(in_streams_,
dump_, dump_,
@ -119,7 +123,8 @@ GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
rtcm_tcp_port, rtcm_tcp_port,
rtcm_station_id, rtcm_station_id,
rtcm_msg_rate_ms, rtcm_msg_rate_ms,
rtcm_dump_devname ); rtcm_dump_devname,
conf_rinex_version );
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
} }
@ -129,7 +134,7 @@ bool GpsL1CaPvt::save_assistance_to_XML()
{ {
// return variable (true == succeeded) // return variable (true == succeeded)
bool ret = false; bool ret = false;
LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename_; 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();
@ -243,4 +248,3 @@ gr::basic_block_sptr GpsL1CaPvt::get_right_block()
{ {
return pvt_; return pvt_;
} }

View File

@ -58,7 +58,8 @@ gps_l1_ca_make_pvt_cc(unsigned int nchannels,
unsigned short rtcm_tcp_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, unsigned short rtcm_station_id,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname) std::string rtcm_dump_devname,
int rinex_version)
{ {
return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels, return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels,
dump, dump,
@ -75,7 +76,8 @@ gps_l1_ca_make_pvt_cc(unsigned int nchannels,
rtcm_tcp_port, rtcm_tcp_port,
rtcm_station_id, rtcm_station_id,
rtcm_msg_rate_ms, rtcm_msg_rate_ms,
rtcm_dump_devname)); rtcm_dump_devname,
rinex_version));
} }
@ -208,7 +210,8 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
unsigned short rtcm_tcp_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, unsigned short rtcm_station_id,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname) : std::string rtcm_dump_devname,
int rinex_version) :
gr::block("gps_l1_ca_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), 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)) ) gr::io_signature::make(0, 0, sizeof(gr_complex)) )
{ {
@ -280,7 +283,7 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
b_rinex_header_written = false; b_rinex_header_written = false;
b_rinex_header_updated = false; b_rinex_header_updated = false;
b_rinex_sbs_header_written = false; b_rinex_sbs_header_written = false;
rp = std::make_shared<Rinex_Printer>(); rp = std::make_shared<Rinex_Printer>(rinex_version);
// ############# ENABLE DATA FILE LOG ################# // ############# ENABLE DATA FILE LOG #################
if (d_dump == true) if (d_dump == true)
@ -496,5 +499,3 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), g
consume_each(1); //one by one consume_each(1); //one by one
return 1; return 1;
} }

View File

@ -63,7 +63,8 @@ gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int n_channels,
unsigned short rtcm_tcp_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, unsigned short rtcm_station_id,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname std::string rtcm_dump_devname,
int rinex_version
); );
/*! /*!
@ -87,7 +88,8 @@ private:
unsigned short rtcm_tcp_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, unsigned short rtcm_station_id,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname); std::string rtcm_dump_devname,
int rinex_version);
gps_l1_ca_pvt_cc(unsigned int nchannels, gps_l1_ca_pvt_cc(unsigned int nchannels,
bool dump, bool dump,
std::string dump_filename, std::string dump_filename,
@ -103,7 +105,8 @@ private:
unsigned short rtcm_tcp_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, unsigned short rtcm_station_id,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname); std::string rtcm_dump_devname,
int rinex_version);
void msg_handler_telemetry(pmt::pmt_t msg); void msg_handler_telemetry(pmt::pmt_t msg);
@ -157,7 +160,7 @@ public:
* It is used to save the assistance data at the receiver shutdown * It is used to save the assistance data at the receiver shutdown
*/ */
std::map<int,Gps_Ephemeris> get_GPS_L1_ephemeris_map(); std::map<int,Gps_Ephemeris> get_GPS_L1_ephemeris_map();
~gps_l1_ca_pvt_cc (); //!< Default destructor ~gps_l1_ca_pvt_cc (); //!< Default destructor
int general_work (int noutput_items, gr_vector_int &ninput_items, int general_work (int noutput_items, gr_vector_int &ninput_items,

View File

@ -51,7 +51,7 @@ using google::LogMessage;
DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)");
Rinex_Printer::Rinex_Printer() Rinex_Printer::Rinex_Printer(int conf_version)
{ {
navfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_GPS_NAV"); navfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_GPS_NAV");
obsfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_OBS"); obsfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_OBS");
@ -179,6 +179,13 @@ Rinex_Printer::Rinex_Printer()
stringVersion = "3.02"; stringVersion = "3.02";
} }
if(conf_version != 0)
{
if(conf_version == 2)
version = 2;
stringVersion = "2.11";
}
numberTypesObservations = 4; // Number of available types of observable in the system numberTypesObservations = 4; // Number of available types of observable in the system
} }

View File

@ -78,7 +78,7 @@ public:
/*! /*!
* \brief Default constructor. Creates GPS Navigation and Observables RINEX files and their headers * \brief Default constructor. Creates GPS Navigation and Observables RINEX files and their headers
*/ */
Rinex_Printer(); Rinex_Printer(int version = 0);
/*! /*!
* \brief Default destructor. Closes GPS Navigation and Observables RINEX files * \brief Default destructor. Closes GPS Navigation and Observables RINEX files

View File

@ -116,7 +116,7 @@ int Trk_System_Test::configure_receiver()
const float early_late_space_chips = 0.5; const float early_late_space_chips = 0.5;
const int display_rate_ms = 500; const int display_rate_ms = 500;
const int output_rate_ms = 100; const int output_rate_ms = 1000;
const int averaging_depth = 10; const int averaging_depth = 10;
bool false_bool = false; bool false_bool = false;
@ -225,6 +225,7 @@ int Trk_System_Test::configure_receiver()
config->set_property("PVT.flag_rtcm_tty_port", "false"); config->set_property("PVT.flag_rtcm_tty_port", "false");
config->set_property("PVT.rtcm_dump_devname", "/dev/pts/1"); config->set_property("PVT.rtcm_dump_devname", "/dev/pts/1");
config->set_property("PVT.dump", "false"); config->set_property("PVT.dump", "false");
config->set_property("PVT.rinex_version", std::to_string(2));
return 0; return 0;
} }