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
37 changed files with 320 additions and 239 deletions
+5 -3
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);
+9 -20
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;
+6 -7
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: