/*! * \file rtcm_printer.h * \brief Interface of a RTCM 3.2 printer for GNSS-SDR * This class provides a implementation of a subset of the RTCM Standard 10403.2 * for Differential GNSS Services * * \author Carles Fernandez-Prades, 2014. cfernandez(at)cttc.es * * ------------------------------------------------------------------------- * * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver * * This file is part of GNSS-SDR. * * GNSS-SDR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GNSS-SDR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNSS-SDR. If not, see . * * ------------------------------------------------------------------------- */ #ifndef GNSS_SDR_RTCM_PRINTER_H_ #define GNSS_SDR_RTCM_PRINTER_H_ #include "rtcm.h" #include // std::ofstream #include // std::shared_ptr /*! * \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages */ class Rtcm_Printer { public: /*! * \brief Default constructor. */ 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. */ ~Rtcm_Printer(); bool Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map& observables); bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map& observables); bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map& observables); bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map& observables); /*! * \brief Prints L1-Only GLONASS RTK Observables * \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred. * \note Code added as part of GSoC 2017 program * \param glonass_gnav_eph GLONASS GNAV Broadcast Ephemeris * \param obs_time Time of observation at the moment of printing * \param observables Set of observables as defined by the platform * \return true or false upon operation success */ bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables); /*! * \brief Prints Extended L1-Only GLONASS RTK Observables * \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases. * \note Code added as part of GSoC 2017 program * \param glonass_gnav_eph GLONASS GNAV Broadcast Ephemeris * \param obs_time Time of observation at the moment of printing * \param observables Set of observables as defined by the platform * \return true or false upon operation success */ bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables); /*! * \brief Prints L1&L2 GLONASS RTK Observables * \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred * \note Code added as part of GSoC 2017 program * \param glonass_gnav_ephL1 GLONASS L1 GNAV Broadcast Ephemeris for satellite * \param glonass_gnav_ephL2 GLONASS L2 GNAV Broadcast Ephemeris for satellite * \param obs_time Time of observation at the moment of printing * \param observables Set of observables as defined by the platform * \return true or false upon operation success */ bool Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map& observables); /*! * \brief Prints Extended L1&L2 GLONASS RTK Observables * \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found. * \note Code added as part of GSoC 2017 program * \param glonass_gnav_ephL1 GLONASS L1 GNAV Broadcast Ephemeris for satellite * \param glonass_gnav_ephL2 GLONASS L2 GNAV Broadcast Ephemeris for satellite * \param obs_time Time of observation at the moment of printing * \param observables Set of observables as defined by the platform * \return true or false upon operation success */ bool Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map& observables); bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); //& observables, unsigned int clock_steering_indicator, unsigned int external_clock_indicator, int smooth_int, bool divergence_free, bool more_messages); std::string print_MT1005_test(); // rtcm; bool Print_Message(const std::string& message); }; #endif