mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Add more extensive use of cstdint typenames
This commit is contained in:
parent
d41ed73a00
commit
201c5ccd79
@ -36,6 +36,7 @@
|
|||||||
#include "nmea_printer.h"
|
#include "nmea_printer.h"
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <cstdint>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
@ -86,11 +87,11 @@ int Nmea_Printer::init_serial(std::string serial_device)
|
|||||||
*/
|
*/
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
struct termios options;
|
struct termios options;
|
||||||
long BAUD;
|
int64_t BAUD;
|
||||||
long DATABITS;
|
int64_t DATABITS;
|
||||||
long STOPBITS;
|
int64_t STOPBITS;
|
||||||
long PARITYON;
|
int64_t PARITYON;
|
||||||
long PARITY;
|
int64_t PARITY;
|
||||||
|
|
||||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
||||||
if (fd == -1) return fd; //failed to open TTY port
|
if (fd == -1) return fd; //failed to open TTY port
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -60,6 +60,7 @@
|
|||||||
#include "GLONASS_L1_L2_CA.h"
|
#include "GLONASS_L1_L2_CA.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream> // for stringstream
|
#include <sstream> // for stringstream
|
||||||
@ -221,87 +222,87 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the GPS L1 C/A navigation message into the RINEX file
|
* \brief Writes data from the GPS L1 C/A navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the GPS L2 navigation message into the RINEX file
|
* \brief Writes data from the GPS L2 navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_CNAV_Ephemeris>& eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_CNAV_Ephemeris>& eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the Galileo navigation message into the RINEX file
|
* \brief Writes data from the Galileo navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Galileo_Ephemeris>& eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Galileo_Ephemeris>& eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file
|
* \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Galileo_Ephemeris>& galileo_eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Galileo_Ephemeris>& galileo_eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the GLONASS GNAV navigation message into the RINEX file
|
* \brief Writes data from the GLONASS GNAV navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Glonass_Gnav_Ephemeris>& eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Glonass_Gnav_Ephemeris>& eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_CNAV_Ephemeris>& gps_cnav_eph_map, const std::map<int, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_CNAV_Ephemeris>& gps_cnav_eph_map, const std::map<int32_t, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes data from the Mixed (Galileo/ GLONASS GNAV) navigation message into the RINEX file
|
* \brief Writes data from the Mixed (Galileo/ GLONASS GNAV) navigation message into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_nav(std::fstream& out, const std::map<int, Galileo_Ephemeris>& galileo_eph_map, const std::map<int, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Galileo_Ephemeris>& galileo_eph_map, const std::map<int32_t, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes GPS L1 observables into the RINEX file
|
* \brief Writes GPS L1 observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes GPS L2 observables into the RINEX file
|
* \brief Writes GPS L2 observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes dual frequency GPS L1 and L2 observables into the RINEX file
|
* \brief Writes dual frequency GPS L1 and L2 observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes Galileo observables into the RINEX file. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
* \brief Writes Galileo observables into the RINEX file. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& observables, const std::string galileo_bands = "1B");
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string galileo_bands = "1B");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
|
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
* \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& observables, const std::string glonass_bands = "1C");
|
void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string glonass_bands = "1C");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file
|
* \brief Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes Mixed GPS L2C - GLONASS observables into the RINEX file
|
* \brief Writes Mixed GPS L2C - GLONASS observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Writes Mixed Galileo/GLONASS observables into the RINEX file
|
* \brief Writes Mixed Galileo/GLONASS observables into the RINEX file
|
||||||
*/
|
*/
|
||||||
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& observables);
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Represents GPS time in the date time format. Leap years are considered, but leap seconds are not.
|
* \brief Represents GPS time in the date time format. Leap years are considered, but leap seconds are not.
|
||||||
@ -523,9 +524,9 @@ private:
|
|||||||
/*
|
/*
|
||||||
* Convert a string to an integer.
|
* Convert a string to an integer.
|
||||||
* @param s string containing a number.
|
* @param s string containing a number.
|
||||||
* @return long integer representation of string.
|
* @return int64_t integer representation of string.
|
||||||
*/
|
*/
|
||||||
inline long asInt(const std::string& s)
|
inline int64_t asInt(const std::string& s)
|
||||||
{
|
{
|
||||||
return strtol(s.c_str(), 0, 10);
|
return strtol(s.c_str(), 0, 10);
|
||||||
}
|
}
|
||||||
@ -658,7 +659,7 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
|||||||
std::string::size_type idx = aStr.find('.', startPos);
|
std::string::size_type idx = aStr.find('.', startPos);
|
||||||
int expAdd = 0;
|
int expAdd = 0;
|
||||||
std::string exp;
|
std::string exp;
|
||||||
long iexp;
|
int64_t iexp;
|
||||||
//If checkSwitch is false, always redo the exponential. Otherwise,
|
//If checkSwitch is false, always redo the exponential. Otherwise,
|
||||||
//set it to false.
|
//set it to false.
|
||||||
bool redoexp = !checkSwitch;
|
bool redoexp = !checkSwitch;
|
||||||
@ -761,7 +762,7 @@ inline std::string Rinex_Printer::asFixWidthString(const int x, const int width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline long asInt(const std::string& s)
|
inline int64_t asInt(const std::string& s)
|
||||||
{
|
{
|
||||||
return strtol(s.c_str(), 0, 10);
|
return strtol(s.c_str(), 0, 10);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
using google::LogMessage;
|
using google::LogMessage;
|
||||||
|
|
||||||
|
|
||||||
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)
|
Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name)
|
||||||
{
|
{
|
||||||
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
|
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
|
||||||
tm timeinfo = boost::posix_time::to_tm(pt);
|
tm timeinfo = boost::posix_time::to_tm(pt);
|
||||||
@ -50,33 +50,33 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool fla
|
|||||||
if (time_tag_name)
|
if (time_tag_name)
|
||||||
{
|
{
|
||||||
std::stringstream strm0;
|
std::stringstream strm0;
|
||||||
const int year = timeinfo.tm_year - 100;
|
const int32_t year = timeinfo.tm_year - 100;
|
||||||
strm0 << year;
|
strm0 << year;
|
||||||
const int month = timeinfo.tm_mon + 1;
|
const int32_t month = timeinfo.tm_mon + 1;
|
||||||
if (month < 10)
|
if (month < 10)
|
||||||
{
|
{
|
||||||
strm0 << "0";
|
strm0 << "0";
|
||||||
}
|
}
|
||||||
strm0 << month;
|
strm0 << month;
|
||||||
const int day = timeinfo.tm_mday;
|
const int32_t day = timeinfo.tm_mday;
|
||||||
if (day < 10)
|
if (day < 10)
|
||||||
{
|
{
|
||||||
strm0 << "0";
|
strm0 << "0";
|
||||||
}
|
}
|
||||||
strm0 << day << "_";
|
strm0 << day << "_";
|
||||||
const int hour = timeinfo.tm_hour;
|
const int32_t hour = timeinfo.tm_hour;
|
||||||
if (hour < 10)
|
if (hour < 10)
|
||||||
{
|
{
|
||||||
strm0 << "0";
|
strm0 << "0";
|
||||||
}
|
}
|
||||||
strm0 << hour;
|
strm0 << hour;
|
||||||
const int min = timeinfo.tm_min;
|
const int32_t min = timeinfo.tm_min;
|
||||||
if (min < 10)
|
if (min < 10)
|
||||||
{
|
{
|
||||||
strm0 << "0";
|
strm0 << "0";
|
||||||
}
|
}
|
||||||
strm0 << min;
|
strm0 << min;
|
||||||
const int sec = timeinfo.tm_sec;
|
const int32_t sec = timeinfo.tm_sec;
|
||||||
if (sec < 10)
|
if (sec < 10)
|
||||||
{
|
{
|
||||||
strm0 << "0";
|
strm0 << "0";
|
||||||
@ -153,7 +153,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>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, observables, station_id);
|
std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1001);
|
Rtcm_Printer::Print_Message(m1001);
|
||||||
@ -161,7 +161,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>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1002 = rtcm->print_MT1002(gps_eph, obs_time, observables, station_id);
|
std::string m1002 = rtcm->print_MT1002(gps_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1002);
|
Rtcm_Printer::Print_Message(m1002);
|
||||||
@ -169,7 +169,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_ti
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1003 = rtcm->print_MT1003(gps_eph, cnav_eph, obs_time, observables, station_id);
|
std::string m1003 = rtcm->print_MT1003(gps_eph, cnav_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1003);
|
Rtcm_Printer::Print_Message(m1003);
|
||||||
@ -177,7 +177,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNA
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1003 = rtcm->print_MT1004(gps_eph, cnav_eph, obs_time, observables, station_id);
|
std::string m1003 = rtcm->print_MT1004(gps_eph, cnav_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1003);
|
Rtcm_Printer::Print_Message(m1003);
|
||||||
@ -185,7 +185,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNA
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1009 = rtcm->print_MT1009(glonass_gnav_eph, obs_time, observables, station_id);
|
std::string m1009 = rtcm->print_MT1009(glonass_gnav_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1009);
|
Rtcm_Printer::Print_Message(m1009);
|
||||||
@ -193,7 +193,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1010 = rtcm->print_MT1010(glonass_gnav_eph, obs_time, observables, station_id);
|
std::string m1010 = rtcm->print_MT1010(glonass_gnav_eph, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1010);
|
Rtcm_Printer::Print_Message(m1010);
|
||||||
@ -201,7 +201,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1011 = rtcm->print_MT1011(glonass_gnav_ephL1, glonass_gnav_ephL2, obs_time, observables, station_id);
|
std::string m1011 = rtcm->print_MT1011(glonass_gnav_ephL1, glonass_gnav_ephL2, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1011);
|
Rtcm_Printer::Print_Message(m1011);
|
||||||
@ -209,7 +209,7 @@ bool Rtcm_Printer::Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int, Gnss_Synchro>& observables)
|
bool Rtcm_Printer::Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
std::string m1012 = rtcm->print_MT1012(glonass_gnav_ephL1, glonass_gnav_ephL2, obs_time, observables, station_id);
|
std::string m1012 = rtcm->print_MT1012(glonass_gnav_ephL1, glonass_gnav_ephL2, obs_time, observables, station_id);
|
||||||
Rtcm_Printer::Print_Message(m1012);
|
Rtcm_Printer::Print_Message(m1012);
|
||||||
@ -241,15 +241,15 @@ bool Rtcm_Printer::Print_Rtcm_MT1045(const Galileo_Ephemeris& gal_eph)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MSM(unsigned int msm_number, const Gps_Ephemeris& gps_eph,
|
bool Rtcm_Printer::Print_Rtcm_MSM(uint32_t msm_number, const Gps_Ephemeris& gps_eph,
|
||||||
const Gps_CNAV_Ephemeris& gps_cnav_eph,
|
const Gps_CNAV_Ephemeris& gps_cnav_eph,
|
||||||
const Galileo_Ephemeris& gal_eph,
|
const Galileo_Ephemeris& gal_eph,
|
||||||
const Glonass_Gnav_Ephemeris& glo_gnav_eph,
|
const Glonass_Gnav_Ephemeris& glo_gnav_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro>& observables,
|
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||||
unsigned int clock_steering_indicator,
|
uint32_t clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
uint32_t external_clock_indicator,
|
||||||
int smooth_int,
|
int32_t smooth_int,
|
||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages)
|
bool more_messages)
|
||||||
{
|
{
|
||||||
@ -297,7 +297,7 @@ int Rtcm_Printer::init_serial(std::string serial_device)
|
|||||||
/*
|
/*
|
||||||
* Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1)
|
* Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1)
|
||||||
*/
|
*/
|
||||||
int fd = 0;
|
int32_t fd = 0;
|
||||||
struct termios options;
|
struct termios options;
|
||||||
long BAUD;
|
long BAUD;
|
||||||
long DATABITS;
|
long DATABITS;
|
||||||
@ -372,25 +372,25 @@ std::string Rtcm_Printer::print_MT1005_test()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int Rtcm_Printer::lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
uint32_t Rtcm_Printer::lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
||||||
{
|
{
|
||||||
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int Rtcm_Printer::lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
uint32_t Rtcm_Printer::lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
||||||
{
|
{
|
||||||
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int Rtcm_Printer::lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
uint32_t Rtcm_Printer::lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
||||||
{
|
{
|
||||||
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int Rtcm_Printer::lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
uint32_t Rtcm_Printer::lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro)
|
||||||
{
|
{
|
||||||
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
return rtcm->lock_time(eph, obs_time, gnss_synchro);
|
||||||
}
|
}
|
||||||
|
@ -48,17 +48,17 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Default constructor.
|
* \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);
|
Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Default destructor.
|
* \brief Default destructor.
|
||||||
*/
|
*/
|
||||||
~Rtcm_Printer();
|
~Rtcm_Printer();
|
||||||
|
|
||||||
bool Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints L1-Only GLONASS RTK 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.
|
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred.
|
||||||
@ -68,7 +68,7 @@ public:
|
|||||||
* \param observables Set of observables as defined by the platform
|
* \param observables Set of observables as defined by the platform
|
||||||
* \return true or false upon operation success
|
* \return true or false upon operation success
|
||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1-Only GLONASS RTK 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.
|
* \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.
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
* \param observables Set of observables as defined by the platform
|
* \param observables Set of observables as defined by the platform
|
||||||
* \return true or false upon operation success
|
* \return true or false upon operation success
|
||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints L1&L2 GLONASS RTK 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
|
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred
|
||||||
@ -89,7 +89,7 @@ public:
|
|||||||
* \param observables Set of observables as defined by the platform
|
* \param observables Set of observables as defined by the platform
|
||||||
* \return true or false upon operation success
|
* \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<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1&L2 GLONASS RTK 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.
|
* \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.
|
||||||
@ -100,7 +100,7 @@ public:
|
|||||||
* \param observables Set of observables as defined by the platform
|
* \param observables Set of observables as defined by the platform
|
||||||
* \return true or false upon operation success
|
* \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<int, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); //<! GPS Ephemeris, should be broadcast in the event that the IODC does not match the IODE, and every 2 minutes.
|
bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); //<! GPS Ephemeris, should be broadcast in the event that the IODC does not match the IODE, and every 2 minutes.
|
||||||
bool Print_Rtcm_MT1045(const Galileo_Ephemeris& gal_eph); //<! Galileo Ephemeris, should be broadcast every 2 minutes
|
bool Print_Rtcm_MT1045(const Galileo_Ephemeris& gal_eph); //<! Galileo Ephemeris, should be broadcast every 2 minutes
|
||||||
@ -114,23 +114,23 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1020(const Glonass_Gnav_Ephemeris& glo_gnav_eph, const Glonass_Gnav_Utc_Model& utc_model);
|
bool Print_Rtcm_MT1020(const Glonass_Gnav_Ephemeris& glo_gnav_eph, const Glonass_Gnav_Utc_Model& utc_model);
|
||||||
|
|
||||||
bool Print_Rtcm_MSM(unsigned int msm_number,
|
bool Print_Rtcm_MSM(uint32_t msm_number,
|
||||||
const Gps_Ephemeris& gps_eph,
|
const Gps_Ephemeris& gps_eph,
|
||||||
const Gps_CNAV_Ephemeris& gps_cnav_eph,
|
const Gps_CNAV_Ephemeris& gps_cnav_eph,
|
||||||
const Galileo_Ephemeris& gal_eph,
|
const Galileo_Ephemeris& gal_eph,
|
||||||
const Glonass_Gnav_Ephemeris& glo_gnav_eph,
|
const Glonass_Gnav_Ephemeris& glo_gnav_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro>& observables,
|
const std::map<int32_t, Gnss_Synchro>& observables,
|
||||||
unsigned int clock_steering_indicator,
|
uint32_t clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
uint32_t external_clock_indicator,
|
||||||
int smooth_int,
|
int32_t smooth_int,
|
||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages);
|
bool more_messages);
|
||||||
|
|
||||||
std::string print_MT1005_test(); //<! For testing purposes
|
std::string print_MT1005_test(); //<! For testing purposes
|
||||||
unsigned int lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
unsigned int lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
unsigned int lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
/*!
|
/*!
|
||||||
* \brief Locks time for logging given GLONASS GNAV Broadcast Ephemeris
|
* \brief Locks time for logging given GLONASS GNAV Broadcast Ephemeris
|
||||||
* \note Code added as part of GSoC 2017 program
|
* \note Code added as part of GSoC 2017 program
|
||||||
@ -139,16 +139,16 @@ public:
|
|||||||
* \params observables Set of observables as defined by the platform
|
* \params observables Set of observables as defined by the platform
|
||||||
* \return locked time during logging process
|
* \return locked time during logging process
|
||||||
*/
|
*/
|
||||||
unsigned int lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string rtcm_filename; // String with the RTCM log filename
|
std::string rtcm_filename; // String with the RTCM log filename
|
||||||
std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file
|
std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file
|
||||||
std::string rtcm_devname;
|
std::string rtcm_devname;
|
||||||
unsigned short port;
|
uint16_t port;
|
||||||
unsigned short station_id;
|
uint16_t station_id;
|
||||||
int rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
|
int32_t rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
|
||||||
int init_serial(std::string serial_device); //serial port control
|
int32_t init_serial(std::string serial_device); //serial port control
|
||||||
void close_serial();
|
void close_serial();
|
||||||
std::shared_ptr<Rtcm> rtcm;
|
std::shared_ptr<Rtcm> rtcm;
|
||||||
bool Print_Message(const std::string& message);
|
bool Print_Message(const std::string& message);
|
||||||
|
Loading…
Reference in New Issue
Block a user