mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-18 06:24:17 +00:00
Use more descriptive names for variables
This commit is contained in:
parent
1c975313b7
commit
97ffee0b0c
@ -71,18 +71,18 @@ hybrid_ls_pvt::~hybrid_ls_pvt()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, double hybrid_current_time, bool flag_averaging)
|
bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging)
|
||||||
{
|
{
|
||||||
std::map<int,Gnss_Synchro>::iterator gnss_pseudoranges_iter;
|
std::map<int,Gnss_Synchro>::iterator gnss_observables_iter;
|
||||||
std::map<int,Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
std::map<int,Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||||
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
||||||
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
|
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
|
||||||
|
|
||||||
int valid_pseudoranges = gnss_pseudoranges_map.size();
|
int valid_observables = gnss_observables_map.size();
|
||||||
|
|
||||||
arma::mat W = arma::eye(valid_pseudoranges, valid_pseudoranges); // channels weights matrix
|
arma::mat W = arma::eye(valid_observables, valid_observables); // channels weights matrix
|
||||||
arma::vec obs = arma::zeros(valid_pseudoranges); // pseudoranges observation vector
|
arma::vec obs = arma::zeros(valid_observables); // observables observation vector
|
||||||
arma::mat satpos = arma::zeros(3, valid_pseudoranges); // satellite positions matrix
|
arma::mat satpos = arma::zeros(3, valid_observables); // satellite positions matrix
|
||||||
|
|
||||||
int Galileo_week_number = 0;
|
int Galileo_week_number = 0;
|
||||||
int GPS_week = 0;
|
int GPS_week = 0;
|
||||||
@ -100,14 +100,14 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
int valid_obs = 0; //valid observations counter
|
int valid_obs = 0; //valid observations counter
|
||||||
int obs_counter = 0;
|
int obs_counter = 0;
|
||||||
|
|
||||||
for(gnss_pseudoranges_iter = gnss_pseudoranges_map.begin();
|
for(gnss_observables_iter = gnss_observables_map.begin();
|
||||||
gnss_pseudoranges_iter != gnss_pseudoranges_map.end();
|
gnss_observables_iter != gnss_observables_map.end();
|
||||||
gnss_pseudoranges_iter++)
|
gnss_observables_iter++)
|
||||||
{
|
{
|
||||||
if(gnss_pseudoranges_iter->second.System == 'E')
|
if(gnss_observables_iter->second.System == 'E')
|
||||||
{
|
{
|
||||||
// 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key
|
// 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key
|
||||||
galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_pseudoranges_iter->second.PRN);
|
galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
if (galileo_ephemeris_iter != galileo_ephemeris_map.end())
|
if (galileo_ephemeris_iter != galileo_ephemeris_map.end())
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
@ -117,7 +117,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
|
|
||||||
// COMMON RX TIME PVT ALGORITHM
|
// COMMON RX TIME PVT ALGORITHM
|
||||||
double Rx_time = hybrid_current_time;
|
double Rx_time = hybrid_current_time;
|
||||||
double Tx_time = Rx_time - gnss_pseudoranges_iter->second.Pseudorange_m / GALILEO_C_m_s;
|
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GALILEO_C_m_s;
|
||||||
|
|
||||||
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
||||||
SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
||||||
@ -130,10 +130,10 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
satpos(1,obs_counter) = galileo_ephemeris_iter->second.d_satpos_Y;
|
satpos(1,obs_counter) = galileo_ephemeris_iter->second.d_satpos_Y;
|
||||||
satpos(2,obs_counter) = galileo_ephemeris_iter->second.d_satpos_Z;
|
satpos(2,obs_counter) = galileo_ephemeris_iter->second.d_satpos_Z;
|
||||||
|
|
||||||
// 5- fill the observations vector with the corrected pseudoranges
|
// 5- fill the observations vector with the corrected observables
|
||||||
obs(obs_counter) = gnss_pseudoranges_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s;
|
obs(obs_counter) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s;
|
||||||
d_visible_satellites_IDs[valid_obs] = galileo_ephemeris_iter->second.i_satellite_PRN;
|
d_visible_satellites_IDs[valid_obs] = galileo_ephemeris_iter->second.i_satellite_PRN;
|
||||||
d_visible_satellites_CN0_dB[valid_obs] = gnss_pseudoranges_iter->second.CN0_dB_hz;
|
d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz;
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
|
|
||||||
Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST
|
Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST
|
||||||
@ -152,18 +152,18 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
// no valid pseudorange for the current SV
|
// no valid pseudorange for the current SV
|
||||||
W(obs_counter, obs_counter) = 0; // SV de-activated
|
W(obs_counter, obs_counter) = 0; // SV de-activated
|
||||||
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
||||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->second.PRN;
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(gnss_pseudoranges_iter->second.System == 'G')
|
else if(gnss_observables_iter->second.System == 'G')
|
||||||
{
|
{
|
||||||
//std::cout << "Satellite System: " << gnss_pseudoranges_iter->second.System <<std::endl;
|
//std::cout << "Satellite System: " << gnss_observables_iter->second.System <<std::endl;
|
||||||
// 1 GPS - find the ephemeris for the current GPS SV observation. The SV PRN ID is the map key
|
// 1 GPS - find the ephemeris for the current GPS SV observation. The SV PRN ID is the map key
|
||||||
std::string sig_(gnss_pseudoranges_iter->second.Signal);
|
std::string sig_(gnss_observables_iter->second.Signal);
|
||||||
if(sig_.compare("1C") == 0)
|
if(sig_.compare("1C") == 0)
|
||||||
{
|
{
|
||||||
gps_ephemeris_iter = gps_ephemeris_map.find(gnss_pseudoranges_iter->second.PRN);
|
gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
if (gps_ephemeris_iter != gps_ephemeris_map.end())
|
if (gps_ephemeris_iter != gps_ephemeris_map.end())
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
@ -174,7 +174,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
||||||
// first estimate of transmit time
|
// first estimate of transmit time
|
||||||
double Rx_time = hybrid_current_time;
|
double Rx_time = hybrid_current_time;
|
||||||
double Tx_time = Rx_time - gnss_pseudoranges_iter->second.Pseudorange_m / GPS_C_m_s;
|
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s;
|
||||||
|
|
||||||
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
||||||
SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
||||||
@ -187,10 +187,10 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
satpos(1, obs_counter) = gps_ephemeris_iter->second.d_satpos_Y;
|
satpos(1, obs_counter) = gps_ephemeris_iter->second.d_satpos_Y;
|
||||||
satpos(2, obs_counter) = gps_ephemeris_iter->second.d_satpos_Z;
|
satpos(2, obs_counter) = gps_ephemeris_iter->second.d_satpos_Z;
|
||||||
|
|
||||||
// 5- fill the observations vector with the corrected pseudoranges
|
// 5- fill the observations vector with the corrected observables
|
||||||
obs(obs_counter) = gnss_pseudoranges_iter->second.Pseudorange_m + SV_clock_bias_s * GPS_C_m_s;
|
obs(obs_counter) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GPS_C_m_s;
|
||||||
d_visible_satellites_IDs[valid_obs] = gps_ephemeris_iter->second.i_satellite_PRN;
|
d_visible_satellites_IDs[valid_obs] = gps_ephemeris_iter->second.i_satellite_PRN;
|
||||||
d_visible_satellites_CN0_dB[valid_obs] = gnss_pseudoranges_iter->second.CN0_dB_hz;
|
d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz;
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
GPS_week = gps_ephemeris_iter->second.i_GPS_week;
|
GPS_week = gps_ephemeris_iter->second.i_GPS_week;
|
||||||
|
|
||||||
@ -206,12 +206,12 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
// no valid pseudorange for the current SV
|
// no valid pseudorange for the current SV
|
||||||
W(obs_counter, obs_counter) = 0; // SV de-activated
|
W(obs_counter, obs_counter) = 0; // SV de-activated
|
||||||
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
||||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->second.PRN;
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(sig_.compare("2S") == 0)
|
if(sig_.compare("2S") == 0)
|
||||||
{
|
{
|
||||||
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_pseudoranges_iter->second.PRN);
|
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.end())
|
if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.end())
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
@ -222,7 +222,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
||||||
// first estimate of transmit time
|
// first estimate of transmit time
|
||||||
double Rx_time = hybrid_current_time;
|
double Rx_time = hybrid_current_time;
|
||||||
double Tx_time = Rx_time - gnss_pseudoranges_iter->second.Pseudorange_m / GPS_C_m_s;
|
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s;
|
||||||
|
|
||||||
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
||||||
SV_clock_bias_s = gps_cnav_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
SV_clock_bias_s = gps_cnav_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
||||||
@ -235,10 +235,10 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
satpos(1, obs_counter) = gps_cnav_ephemeris_iter->second.d_satpos_Y;
|
satpos(1, obs_counter) = gps_cnav_ephemeris_iter->second.d_satpos_Y;
|
||||||
satpos(2, obs_counter) = gps_cnav_ephemeris_iter->second.d_satpos_Z;
|
satpos(2, obs_counter) = gps_cnav_ephemeris_iter->second.d_satpos_Z;
|
||||||
|
|
||||||
// 5- fill the observations vector with the corrected pseudoranges
|
// 5- fill the observations vector with the corrected observables
|
||||||
obs(obs_counter) = gnss_pseudoranges_iter->second.Pseudorange_m + SV_clock_bias_s * GPS_C_m_s;
|
obs(obs_counter) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GPS_C_m_s;
|
||||||
d_visible_satellites_IDs[valid_obs] = gps_cnav_ephemeris_iter->second.i_satellite_PRN;
|
d_visible_satellites_IDs[valid_obs] = gps_cnav_ephemeris_iter->second.i_satellite_PRN;
|
||||||
d_visible_satellites_CN0_dB[valid_obs] = gnss_pseudoranges_iter->second.CN0_dB_hz;
|
d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz;
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week;
|
GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week;
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
|
|||||||
// no valid pseudorange for the current SV
|
// no valid pseudorange for the current SV
|
||||||
W(obs_counter, obs_counter) = 0; // SV de-activated
|
W(obs_counter, obs_counter) = 0; // SV de-activated
|
||||||
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero)
|
||||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->second.PRN;
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,6 @@
|
|||||||
#include "gps_navigation_message.h"
|
#include "gps_navigation_message.h"
|
||||||
#include "gps_cnav_navigation_message.h"
|
#include "gps_cnav_navigation_message.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
//#include "galileo_ephemeris.h"
|
|
||||||
//#include "galileo_utc_model.h"
|
|
||||||
//#include "gps_ephemeris.h"
|
|
||||||
//#include "gps_utc_model.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -56,17 +52,13 @@ public:
|
|||||||
hybrid_ls_pvt(int nchannels,std::string dump_filename, bool flag_dump_to_file);
|
hybrid_ls_pvt(int nchannels,std::string dump_filename, bool flag_dump_to_file);
|
||||||
~hybrid_ls_pvt();
|
~hybrid_ls_pvt();
|
||||||
|
|
||||||
bool get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, double hybrid_current_time, bool flag_averaging);
|
bool get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging);
|
||||||
int d_nchannels; //!< Number of available channels for positioning
|
int d_nchannels; //!< Number of available channels for positioning
|
||||||
//int d_valid_GPS_obs; //!< Number of valid GPS pseudorange observations (valid GPS satellites) -- used for hybrid configuration
|
|
||||||
//int d_valid_GAL_obs; //!< Number of valid GALILEO pseudorange observations (valid GALILEO satellites) -- used for hybrid configuration
|
|
||||||
|
|
||||||
//Galileo_Navigation_Message* d_Gal_ephemeris;
|
|
||||||
//Gps_Navigation_Message* d_GPS_ephemeris;
|
|
||||||
|
|
||||||
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
||||||
std::map<int,Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
std::map<int,Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
||||||
std::map<int,Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map;
|
std::map<int,Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map;
|
||||||
|
|
||||||
Galileo_Utc_Model galileo_utc_model;
|
Galileo_Utc_Model galileo_utc_model;
|
||||||
Galileo_Iono galileo_iono;
|
Galileo_Iono galileo_iono;
|
||||||
Galileo_Almanac galileo_almanac;
|
Galileo_Almanac galileo_almanac;
|
||||||
|
@ -3634,7 +3634,7 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Galileo_Utc_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const double obs_time, const std::map<int,Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
// RINEX observations timestamps are GPS timestamps.
|
// RINEX observations timestamps are GPS timestamps.
|
||||||
std::string line;
|
std::string line;
|
||||||
@ -3692,21 +3692,21 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
line += std::string(1, '0');
|
line += std::string(1, '0');
|
||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
int numSatellitesObserved = 0;
|
int numSatellitesObserved = 0;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
numSatellitesObserved++;
|
numSatellitesObserved++;
|
||||||
}
|
}
|
||||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
line += satelliteSystem["GPS"];
|
line += satelliteSystem["GPS"];
|
||||||
if (static_cast<int>(pseudoranges_iter->second.PRN) < 10) line += std::string(1, '0');
|
if (static_cast<int>(observables_iter->second.PRN) < 10) line += std::string(1, '0');
|
||||||
line += boost::lexical_cast<std::string>(static_cast<int>(pseudoranges_iter->second.PRN));
|
line += boost::lexical_cast<std::string>(static_cast<int>(observables_iter->second.PRN));
|
||||||
}
|
}
|
||||||
// Receiver clock offset (optional)
|
// Receiver clock offset (optional)
|
||||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||||
@ -3715,16 +3715,16 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
out << line << std::endl;
|
out << line << std::endl;
|
||||||
|
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string lineObs;
|
std::string lineObs;
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
line.clear();
|
line.clear();
|
||||||
// GPS L1 PSEUDORANGE
|
// GPS L1 PSEUDORANGE
|
||||||
line += std::string(2, ' ');
|
line += std::string(2, ' ');
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Pseudorange_m, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||||
|
|
||||||
//Loss of lock indicator (LLI)
|
//Loss of lock indicator (LLI)
|
||||||
int lli = 0; // Include in the observation!!
|
int lli = 0; // Include in the observation!!
|
||||||
@ -3738,10 +3738,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Signal Strength Indicator (SSI)
|
// Signal Strength Indicator (SSI)
|
||||||
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
|
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
// GPS L1 CA PHASE
|
// GPS L1 CA PHASE
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3752,7 +3752,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
}
|
}
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
// GPS L1 CA DOPPLER
|
// GPS L1 CA DOPPLER
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3763,7 +3763,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
}
|
}
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
//GPS L1 SIGNAL STRENGTH
|
//GPS L1 SIGNAL STRENGTH
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||||
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
||||||
out << lineObs << std::endl;
|
out << lineObs << std::endl;
|
||||||
}
|
}
|
||||||
@ -3798,10 +3798,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
|
|
||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
int numSatellitesObserved = 0;
|
int numSatellitesObserved = 0;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
numSatellitesObserved++;
|
numSatellitesObserved++;
|
||||||
}
|
}
|
||||||
@ -3815,17 +3815,17 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
Rinex_Printer::lengthCheck(line);
|
Rinex_Printer::lengthCheck(line);
|
||||||
out << line << std::endl;
|
out << line << std::endl;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string lineObs;
|
std::string lineObs;
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
lineObs += satelliteSystem["GPS"];
|
lineObs += satelliteSystem["GPS"];
|
||||||
if (static_cast<int>(pseudoranges_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
if (static_cast<int>(observables_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
||||||
lineObs += boost::lexical_cast<std::string>(static_cast<int>(pseudoranges_iter->second.PRN));
|
lineObs += boost::lexical_cast<std::string>(static_cast<int>(observables_iter->second.PRN));
|
||||||
//lineObs += std::string(2, ' ');
|
//lineObs += std::string(2, ' ');
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Pseudorange_m, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||||
|
|
||||||
//Loss of lock indicator (LLI)
|
//Loss of lock indicator (LLI)
|
||||||
int lli = 0; // Include in the observation!!
|
int lli = 0; // Include in the observation!!
|
||||||
@ -3839,11 +3839,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Signal Strength Indicator (SSI)
|
// Signal Strength Indicator (SSI)
|
||||||
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
|
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// GPS L1 CA PHASE
|
// GPS L1 CA PHASE
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3855,7 +3855,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// GPS L1 CA DOPPLER
|
// GPS L1 CA DOPPLER
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3868,7 +3868,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
//GPS L1 SIGNAL STRENGTH
|
//GPS L1 SIGNAL STRENGTH
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||||
|
|
||||||
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
||||||
out << lineObs << std::endl;
|
out << lineObs << std::endl;
|
||||||
@ -3877,7 +3877,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris & eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris & eph, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
// RINEX observations timestamps are GPS timestamps.
|
// RINEX observations timestamps are GPS timestamps.
|
||||||
std::string line;
|
std::string line;
|
||||||
@ -3920,10 +3920,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
|
|
||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
int numSatellitesObserved = 0;
|
int numSatellitesObserved = 0;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
numSatellitesObserved++;
|
numSatellitesObserved++;
|
||||||
}
|
}
|
||||||
@ -3936,18 +3936,18 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
Rinex_Printer::lengthCheck(line);
|
Rinex_Printer::lengthCheck(line);
|
||||||
out << line << std::endl;
|
out << line << std::endl;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string lineObs;
|
std::string lineObs;
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
lineObs += satelliteSystem["GPS"];
|
lineObs += satelliteSystem["GPS"];
|
||||||
if (static_cast<int>(pseudoranges_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
if (static_cast<int>(observables_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
||||||
lineObs += boost::lexical_cast<std::string>(static_cast<int>(pseudoranges_iter->second.PRN));
|
lineObs += boost::lexical_cast<std::string>(static_cast<int>(observables_iter->second.PRN));
|
||||||
//lineObs += std::string(2, ' ');
|
//lineObs += std::string(2, ' ');
|
||||||
//GPS L2 PSEUDORANGE
|
//GPS L2 PSEUDORANGE
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Pseudorange_m, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||||
|
|
||||||
//Loss of lock indicator (LLI)
|
//Loss of lock indicator (LLI)
|
||||||
int lli = 0; // Include in the observation!!
|
int lli = 0; // Include in the observation!!
|
||||||
@ -3961,11 +3961,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Signal Strength Indicator (SSI)
|
// Signal Strength Indicator (SSI)
|
||||||
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
|
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// GPS L2 PHASE
|
// GPS L2 PHASE
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3977,7 +3977,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// GPS L2 DOPPLER
|
// GPS L2 DOPPLER
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -3990,7 +3990,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
//GPS L2 SIGNAL STRENGTH
|
//GPS L2 SIGNAL STRENGTH
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||||
|
|
||||||
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
||||||
out << lineObs << std::endl;
|
out << lineObs << std::endl;
|
||||||
@ -3998,7 +3998,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Rinex_Printer::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> & pseudoranges)
|
void Rinex_Printer::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)
|
||||||
{
|
{
|
||||||
if(eph_cnav.d_i_0){} // avoid warning, not needed
|
if(eph_cnav.d_i_0){} // avoid warning, not needed
|
||||||
// RINEX observations timestamps are GPS timestamps.
|
// RINEX observations timestamps are GPS timestamps.
|
||||||
@ -4043,34 +4043,34 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
|||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
|
|
||||||
//Get maps with GPS L1 and L2 observations
|
//Get maps with GPS L1 and L2 observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1;
|
std::map<int, Gnss_Synchro> observablesL1;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL2;
|
std::map<int, Gnss_Synchro> observablesL2;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter2;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter2;
|
||||||
|
|
||||||
std::multimap<unsigned int, Gnss_Synchro> total_mmap;
|
std::multimap<unsigned int, Gnss_Synchro> total_mmap;
|
||||||
std::multimap<unsigned int, Gnss_Synchro>::iterator mmap_iter;
|
std::multimap<unsigned int, Gnss_Synchro>::iterator mmap_iter;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL1.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(pseudoranges_iter->second.PRN, pseudoranges_iter->second));
|
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(observables_iter->second.PRN, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL2.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
mmap_iter = total_mmap.find(pseudoranges_iter->second.PRN);
|
mmap_iter = total_mmap.find(observables_iter->second.PRN);
|
||||||
if(mmap_iter == total_mmap.end())
|
if(mmap_iter == total_mmap.end())
|
||||||
{
|
{
|
||||||
Gnss_Synchro gs = Gnss_Synchro();
|
Gnss_Synchro gs = Gnss_Synchro();
|
||||||
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(pseudoranges_iter->second.PRN, gs));
|
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(observables_iter->second.PRN, gs));
|
||||||
}
|
}
|
||||||
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(pseudoranges_iter->second.PRN, pseudoranges_iter->second));
|
total_mmap.insert(std::pair<unsigned int, Gnss_Synchro>(observables_iter->second.PRN, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4095,11 +4095,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
|||||||
|
|
||||||
std::set<unsigned int> available_prns;
|
std::set<unsigned int> available_prns;
|
||||||
std::set<unsigned int>::iterator it;
|
std::set<unsigned int>::iterator it;
|
||||||
for(pseudoranges_iter = pseudorangesL1.begin();
|
for(observables_iter = observablesL1.begin();
|
||||||
pseudoranges_iter != pseudorangesL1.end();
|
observables_iter != observablesL1.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
it = available_prns.find(prn_);
|
it = available_prns.find(prn_);
|
||||||
if(it == available_prns.end())
|
if(it == available_prns.end())
|
||||||
{
|
{
|
||||||
@ -4107,11 +4107,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesL2.begin();
|
for(observables_iter = observablesL2.begin();
|
||||||
pseudoranges_iter != pseudorangesL2.end();
|
observables_iter != observablesL2.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
it = available_prns.find(prn_);
|
it = available_prns.find(prn_);
|
||||||
if(it == available_prns.end())
|
if(it == available_prns.end())
|
||||||
{
|
{
|
||||||
@ -4191,7 +4191,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges, const std::string galileo_bands)
|
void Rinex_Printer::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)
|
||||||
{
|
{
|
||||||
// RINEX observations timestamps are Galileo timestamps.
|
// RINEX observations timestamps are Galileo timestamps.
|
||||||
// See http://gage14.upc.es/gLAB/HTML/Observation_Rinex_v3.01.html
|
// See http://gage14.upc.es/gLAB/HTML/Observation_Rinex_v3.01.html
|
||||||
@ -4236,28 +4236,28 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
|
|
||||||
//Get maps with Galileo observations
|
//Get maps with Galileo observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE1B;
|
std::map<int, Gnss_Synchro> observablesE1B;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE5A;
|
std::map<int, Gnss_Synchro> observablesE5A;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE5B;
|
std::map<int, Gnss_Synchro> observablesE5B;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("1B") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("1B") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE1B.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE1B.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("5X") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("5X") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE5A.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE5A.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("7X") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("7X") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE5B.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE5B.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::size_t found_1B = galileo_bands.find("1B");
|
std::size_t found_1B = galileo_bands.find("1B");
|
||||||
@ -4269,12 +4269,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
std::set<unsigned int>::iterator it;
|
std::set<unsigned int>::iterator it;
|
||||||
if(found_1B != std::string::npos)
|
if(found_1B != std::string::npos)
|
||||||
{
|
{
|
||||||
for(pseudoranges_iter = pseudorangesE1B.begin();
|
for(observables_iter = observablesE1B.begin();
|
||||||
pseudoranges_iter != pseudorangesE1B.end();
|
observables_iter != observablesE1B.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
it = available_prns.find(prn_);
|
it = available_prns.find(prn_);
|
||||||
if(it == available_prns.end())
|
if(it == available_prns.end())
|
||||||
{
|
{
|
||||||
@ -4284,11 +4284,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
}
|
}
|
||||||
if(found_E5a != std::string::npos)
|
if(found_E5a != std::string::npos)
|
||||||
{
|
{
|
||||||
for(pseudoranges_iter = pseudorangesE5A.begin();
|
for(observables_iter = observablesE5A.begin();
|
||||||
pseudoranges_iter != pseudorangesE5A.end();
|
observables_iter != observablesE5A.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
it = available_prns.find(prn_);
|
it = available_prns.find(prn_);
|
||||||
if(it == available_prns.end())
|
if(it == available_prns.end())
|
||||||
{
|
{
|
||||||
@ -4304,16 +4304,16 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(found_E5b != std::string::npos)
|
if(found_E5b != std::string::npos)
|
||||||
{
|
{
|
||||||
for(pseudoranges_iter = pseudorangesE5B.begin();
|
for(observables_iter = observablesE5B.begin();
|
||||||
pseudoranges_iter != pseudorangesE5B.end();
|
observables_iter != observablesE5B.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
it = available_prns.find(prn_);
|
it = available_prns.find(prn_);
|
||||||
if(it == available_prns.end())
|
if(it == available_prns.end())
|
||||||
{
|
{
|
||||||
@ -4356,7 +4356,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int numSatellitesObserved = available_prns.size();
|
int numSatellitesObserved = available_prns.size();
|
||||||
@ -4431,7 +4431,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int,Gnss_Synchro>& observables)
|
||||||
{
|
{
|
||||||
if(galileo_eph.e_1){} // avoid warning, not needed
|
if(galileo_eph.e_1){} // avoid warning, not needed
|
||||||
std::string line;
|
std::string line;
|
||||||
@ -4475,45 +4475,45 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
|
|
||||||
//Get maps with observations
|
//Get maps with observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesG1C;
|
std::map<int, Gnss_Synchro> observablesG1C;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE1B;
|
std::map<int, Gnss_Synchro> observablesE1B;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE5A;
|
std::map<int, Gnss_Synchro> observablesE5A;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesE5B;
|
std::map<int, Gnss_Synchro> observablesE5B;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("1B") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("1B") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE1B.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE1B.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("5X") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("5X") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE5A.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE5A.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("E") == 0) && (sig_.compare("7X") == 0))
|
if((system_.compare("E") == 0) && (sig_.compare("7X") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesE5B.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesE5B.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesG1C.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesG1C.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::multimap<unsigned int, Gnss_Synchro> total_gal_map;
|
std::multimap<unsigned int, Gnss_Synchro> total_gal_map;
|
||||||
std::set<unsigned int> available_gal_prns;
|
std::set<unsigned int> available_gal_prns;
|
||||||
std::set<unsigned int>::iterator it;
|
std::set<unsigned int>::iterator it;
|
||||||
for(pseudoranges_iter = pseudorangesE1B.begin();
|
for(observables_iter = observablesE1B.begin();
|
||||||
pseudoranges_iter != pseudorangesE1B.end();
|
observables_iter != observablesE1B.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
it = available_gal_prns.find(prn_);
|
it = available_gal_prns.find(prn_);
|
||||||
if(it == available_gal_prns.end())
|
if(it == available_gal_prns.end())
|
||||||
{
|
{
|
||||||
@ -4521,12 +4521,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesE5A.begin();
|
for(observables_iter = observablesE5A.begin();
|
||||||
pseudoranges_iter != pseudorangesE5A.end();
|
observables_iter != observablesE5A.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
it = available_gal_prns.find(prn_);
|
it = available_gal_prns.find(prn_);
|
||||||
if(it == available_gal_prns.end())
|
if(it == available_gal_prns.end())
|
||||||
{
|
{
|
||||||
@ -4534,12 +4534,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesE5B.begin();
|
for(observables_iter = observablesE5B.begin();
|
||||||
pseudoranges_iter != pseudorangesE5B.end();
|
observables_iter != observablesE5B.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, pseudoranges_iter->second));
|
total_gal_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||||
it = available_gal_prns.find(prn_);
|
it = available_gal_prns.find(prn_);
|
||||||
if(it == available_gal_prns.end())
|
if(it == available_gal_prns.end())
|
||||||
{
|
{
|
||||||
@ -4548,7 +4548,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
}
|
}
|
||||||
|
|
||||||
int numGalSatellitesObserved = available_gal_prns.size();
|
int numGalSatellitesObserved = available_gal_prns.size();
|
||||||
int numGpsSatellitesObserved = pseudorangesG1C.size();
|
int numGpsSatellitesObserved = observablesG1C.size();
|
||||||
int numSatellitesObserved = numGalSatellitesObserved + numGpsSatellitesObserved;
|
int numSatellitesObserved = numGalSatellitesObserved + numGpsSatellitesObserved;
|
||||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
||||||
|
|
||||||
@ -4561,18 +4561,18 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
std::string lineObs;
|
std::string lineObs;
|
||||||
for(pseudoranges_iter = pseudorangesG1C.begin();
|
for(observables_iter = observablesG1C.begin();
|
||||||
pseudoranges_iter != pseudorangesG1C.end();
|
observables_iter != observablesG1C.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
lineObs.clear();
|
lineObs.clear();
|
||||||
|
|
||||||
s.assign(1, pseudoranges_iter->second.System);
|
s.assign(1, observables_iter->second.System);
|
||||||
if(s.compare("G") == 0) lineObs += satelliteSystem["GPS"];
|
if(s.compare("G") == 0) lineObs += satelliteSystem["GPS"];
|
||||||
if(s.compare("E") == 0) lineObs += satelliteSystem["Galileo"]; // should not happen
|
if(s.compare("E") == 0) lineObs += satelliteSystem["Galileo"]; // should not happen
|
||||||
if (static_cast<int>(pseudoranges_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
if (static_cast<int>(observables_iter->second.PRN) < 10) lineObs += std::string(1, '0');
|
||||||
lineObs += boost::lexical_cast<std::string>(static_cast<int>(pseudoranges_iter->second.PRN));
|
lineObs += boost::lexical_cast<std::string>(static_cast<int>(observables_iter->second.PRN));
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Pseudorange_m, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||||
|
|
||||||
//Loss of lock indicator (LLI)
|
//Loss of lock indicator (LLI)
|
||||||
int lli = 0; // Include in the observation!!
|
int lli = 0; // Include in the observation!!
|
||||||
@ -4586,11 +4586,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Signal Strength Indicator (SSI)
|
// Signal Strength Indicator (SSI)
|
||||||
int ssi = Rinex_Printer::signalStrength(pseudoranges_iter->second.CN0_dB_hz);
|
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
|
||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// PHASE
|
// PHASE
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -4602,7 +4602,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// DOPPLER
|
// DOPPLER
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
|
||||||
if (lli == 0)
|
if (lli == 0)
|
||||||
{
|
{
|
||||||
lineObs += std::string(1, ' ');
|
lineObs += std::string(1, ' ');
|
||||||
@ -4614,7 +4614,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
|||||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
|
||||||
|
|
||||||
// SIGNAL STRENGTH
|
// SIGNAL STRENGTH
|
||||||
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
|
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||||
|
|
||||||
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
|
||||||
out << lineObs << std::endl;
|
out << lineObs << std::endl;
|
||||||
|
@ -184,27 +184,27 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \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> & pseudoranges);
|
void log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph, double obs_time, const std::map<int, 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> & pseudoranges);
|
void log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris & eph, double obs_time, const std::map<int, 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> & pseudoranges);
|
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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \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> & pseudoranges, const std::string galileo_bands = "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");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \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> & pseudoranges);
|
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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \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.
|
||||||
|
@ -145,17 +145,17 @@ 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)
|
bool Rtcm_Printer::Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, pseudoranges, 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);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string m1002 = rtcm->print_MT1002(gps_eph, obs_time, pseudoranges, 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);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ bool Rtcm_Printer::Print_Rtcm_MSM(unsigned int msm_number, const Gps_Ephemeris &
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
int smooth_int,
|
int smooth_int,
|
||||||
@ -191,31 +191,31 @@ bool Rtcm_Printer::Print_Rtcm_MSM(unsigned int msm_number, const Gps_Ephemeris &
|
|||||||
std::string msm;
|
std::string msm;
|
||||||
if(msm_number == 1)
|
if(msm_number == 1)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_1(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 2)
|
else if(msm_number == 2)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_2(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 3)
|
else if(msm_number == 3)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_3(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 4)
|
else if(msm_number == 4)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_4(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 5)
|
else if(msm_number == 5)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_5(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 6)
|
else if(msm_number == 6)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_6(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else if(msm_number == 7)
|
else if(msm_number == 7)
|
||||||
{
|
{
|
||||||
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);
|
msm = rtcm->print_MSM_7(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables, station_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more_messages);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -55,8 +55,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
~Rtcm_Printer();
|
~Rtcm_Printer();
|
||||||
|
|
||||||
bool Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
bool Print_Rtcm_MT1001(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<int, Gnss_Synchro> & pseudoranges);
|
bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, 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
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
int smooth_int,
|
int smooth_int,
|
||||||
|
@ -391,11 +391,11 @@ std::string Rtcm::build_message(const std::string & data) const
|
|||||||
//
|
//
|
||||||
// ********************************************************
|
// ********************************************************
|
||||||
|
|
||||||
std::bitset<64> Rtcm::get_MT1001_4_header(unsigned int msg_number, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges,
|
std::bitset<64> Rtcm::get_MT1001_4_header(unsigned int msg_number, double obs_time, const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id, unsigned int smooth_int, bool sync_flag, bool divergence_free)
|
unsigned int ref_id, unsigned int smooth_int, bool sync_flag, bool divergence_free)
|
||||||
{
|
{
|
||||||
unsigned int reference_station_id = ref_id; // Max: 4095
|
unsigned int reference_station_id = ref_id; // Max: 4095
|
||||||
const std::map<int, Gnss_Synchro> pseudoranges_ = pseudoranges;
|
const std::map<int, Gnss_Synchro> observables_ = observables;
|
||||||
bool synchronous_GNSS_flag = sync_flag;
|
bool synchronous_GNSS_flag = sync_flag;
|
||||||
bool divergence_free_smoothing_indicator = divergence_free;
|
bool divergence_free_smoothing_indicator = divergence_free;
|
||||||
unsigned int smoothing_interval = smooth_int;
|
unsigned int smoothing_interval = smooth_int;
|
||||||
@ -403,7 +403,7 @@ std::bitset<64> Rtcm::get_MT1001_4_header(unsigned int msg_number, double obs_ti
|
|||||||
Rtcm::set_DF003(reference_station_id);
|
Rtcm::set_DF003(reference_station_id);
|
||||||
Rtcm::set_DF004(obs_time);
|
Rtcm::set_DF004(obs_time);
|
||||||
Rtcm::set_DF005(synchronous_GNSS_flag);
|
Rtcm::set_DF005(synchronous_GNSS_flag);
|
||||||
Rtcm::set_DF006(pseudoranges_);
|
Rtcm::set_DF006(observables_);
|
||||||
Rtcm::set_DF007(divergence_free_smoothing_indicator);
|
Rtcm::set_DF007(divergence_free_smoothing_indicator);
|
||||||
Rtcm::set_DF008(smoothing_interval);
|
Rtcm::set_DF008(smoothing_interval);
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ 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, unsigned short station_id)
|
std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id)
|
||||||
{
|
{
|
||||||
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
||||||
unsigned int smooth_int = 0;
|
unsigned int smooth_int = 0;
|
||||||
@ -448,29 +448,29 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, c
|
|||||||
bool divergence_free = false;
|
bool divergence_free = false;
|
||||||
|
|
||||||
//Get a map with GPS L1 only observations
|
//Get a map with GPS L1 only observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1;
|
std::map<int, Gnss_Synchro> observablesL1;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL1.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::bitset<64> header = Rtcm::get_MT1001_4_header(1001, obs_time, pseudorangesL1, ref_id, smooth_int, sync_flag, divergence_free);
|
std::bitset<64> header = Rtcm::get_MT1001_4_header(1001, obs_time, observablesL1, ref_id, smooth_int, sync_flag, divergence_free);
|
||||||
std::string data = header.to_string();
|
std::string data = header.to_string();
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesL1.begin();
|
for(observables_iter = observablesL1.begin();
|
||||||
pseudoranges_iter != pseudorangesL1.end();
|
observables_iter != observablesL1.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::bitset<58> content = Rtcm::get_MT1001_sat_content(gps_eph, obs_time, pseudoranges_iter->second);
|
std::bitset<58> content = Rtcm::get_MT1001_sat_content(gps_eph, obs_time, observables_iter->second);
|
||||||
data += content.to_string();
|
data += content.to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ 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, unsigned short station_id)
|
std::string Rtcm::print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id)
|
||||||
{
|
{
|
||||||
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
||||||
unsigned int smooth_int = 0;
|
unsigned int smooth_int = 0;
|
||||||
@ -498,29 +498,29 @@ std::string Rtcm::print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, c
|
|||||||
bool divergence_free = false;
|
bool divergence_free = false;
|
||||||
|
|
||||||
//Get a map with GPS L1 only observations
|
//Get a map with GPS L1 only observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1;
|
std::map<int, Gnss_Synchro> observablesL1;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL1.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::bitset<64> header = Rtcm::get_MT1001_4_header(1002, obs_time, pseudorangesL1, ref_id, smooth_int, sync_flag, divergence_free);
|
std::bitset<64> header = Rtcm::get_MT1001_4_header(1002, obs_time, observablesL1, ref_id, smooth_int, sync_flag, divergence_free);
|
||||||
std::string data = header.to_string();
|
std::string data = header.to_string();
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesL1.begin();
|
for(observables_iter = observablesL1.begin();
|
||||||
pseudoranges_iter != pseudorangesL1.end();
|
observables_iter != observablesL1.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::bitset<74> content = Rtcm::get_MT1002_sat_content(gps_eph, obs_time, pseudoranges_iter->second);
|
std::bitset<74> content = Rtcm::get_MT1002_sat_content(gps_eph, obs_time, observables_iter->second);
|
||||||
data += content.to_string();
|
data += content.to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,7 +562,7 @@ 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, unsigned short station_id)
|
std::string Rtcm::print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id)
|
||||||
{
|
{
|
||||||
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
||||||
unsigned int smooth_int = 0;
|
unsigned int smooth_int = 0;
|
||||||
@ -570,61 +570,61 @@ std::string Rtcm::print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephem
|
|||||||
bool divergence_free = false;
|
bool divergence_free = false;
|
||||||
|
|
||||||
//Get maps with GPS L1 and L2 observations
|
//Get maps with GPS L1 and L2 observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1;
|
std::map<int, Gnss_Synchro> observablesL1;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL2;
|
std::map<int, Gnss_Synchro> observablesL2;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter2;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter2;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL1.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL2.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get common observables
|
// Get common observables
|
||||||
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > > common_pseudoranges;
|
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > > common_observables;
|
||||||
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >::const_iterator common_pseudoranges_iter;
|
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >::const_iterator common_observables_iter;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1_with_L2;
|
std::map<int, Gnss_Synchro> observablesL1_with_L2;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesL1.begin();
|
for(observables_iter = observablesL1.begin();
|
||||||
pseudoranges_iter != pseudorangesL1.end();
|
observables_iter != observablesL1.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
for(pseudoranges_iter2 = pseudorangesL2.begin();
|
for(observables_iter2 = observablesL2.begin();
|
||||||
pseudoranges_iter2 != pseudorangesL2.end();
|
observables_iter2 != observablesL2.end();
|
||||||
pseudoranges_iter2++)
|
observables_iter2++)
|
||||||
{
|
{
|
||||||
if(pseudoranges_iter2->second.PRN == prn_)
|
if(observables_iter2->second.PRN == prn_)
|
||||||
{
|
{
|
||||||
std::pair<Gnss_Synchro, Gnss_Synchro> p;
|
std::pair<Gnss_Synchro, Gnss_Synchro> p;
|
||||||
Gnss_Synchro pr1 = pseudoranges_iter->second;
|
Gnss_Synchro pr1 = observables_iter->second;
|
||||||
Gnss_Synchro pr2 = pseudoranges_iter2->second;
|
Gnss_Synchro pr2 = observables_iter2->second;
|
||||||
p = std::make_pair(pr1, pr2);
|
p = std::make_pair(pr1, pr2);
|
||||||
common_pseudoranges.push_back(p);
|
common_observables.push_back(p);
|
||||||
pseudorangesL1_with_L2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1_with_L2.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::bitset<64> header = Rtcm::get_MT1001_4_header(1003, obs_time, pseudorangesL1_with_L2, ref_id, smooth_int, sync_flag, divergence_free);
|
std::bitset<64> header = Rtcm::get_MT1001_4_header(1003, obs_time, observablesL1_with_L2, ref_id, smooth_int, sync_flag, divergence_free);
|
||||||
std::string data = header.to_string();
|
std::string data = header.to_string();
|
||||||
|
|
||||||
for(common_pseudoranges_iter = common_pseudoranges.begin();
|
for(common_observables_iter = common_observables.begin();
|
||||||
common_pseudoranges_iter != common_pseudoranges.end();
|
common_observables_iter != common_observables.end();
|
||||||
common_pseudoranges_iter++)
|
common_observables_iter++)
|
||||||
{
|
{
|
||||||
std::bitset<101> content = Rtcm::get_MT1003_sat_content(ephL1, ephL2, obs_time, common_pseudoranges_iter->first, common_pseudoranges_iter->second);
|
std::bitset<101> content = Rtcm::get_MT1003_sat_content(ephL1, ephL2, obs_time, common_observables_iter->first, common_observables_iter->second);
|
||||||
data += content.to_string();
|
data += content.to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ 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, unsigned short station_id)
|
std::string Rtcm::print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id)
|
||||||
{
|
{
|
||||||
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
unsigned int ref_id = static_cast<unsigned int>(station_id);
|
||||||
unsigned int smooth_int = 0;
|
unsigned int smooth_int = 0;
|
||||||
@ -680,61 +680,61 @@ std::string Rtcm::print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephem
|
|||||||
bool divergence_free = false;
|
bool divergence_free = false;
|
||||||
|
|
||||||
//Get maps with GPS L1 and L2 observations
|
//Get maps with GPS L1 and L2 observations
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1;
|
std::map<int, Gnss_Synchro> observablesL1;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL2;
|
std::map<int, Gnss_Synchro> observablesL2;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter2;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter2;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string system_(&pseudoranges_iter->second.System, 1);
|
std::string system_(&observables_iter->second.System, 1);
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("1C") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL1.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
if((system_.compare("G") == 0) && (sig_.compare("2S") == 0))
|
||||||
{
|
{
|
||||||
pseudorangesL2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL2.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get common observables
|
// Get common observables
|
||||||
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > > common_pseudoranges;
|
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > > common_observables;
|
||||||
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >::const_iterator common_pseudoranges_iter;
|
std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >::const_iterator common_observables_iter;
|
||||||
std::map<int, Gnss_Synchro> pseudorangesL1_with_L2;
|
std::map<int, Gnss_Synchro> observablesL1_with_L2;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudorangesL1.begin();
|
for(observables_iter = observablesL1.begin();
|
||||||
pseudoranges_iter != pseudorangesL1.end();
|
observables_iter != observablesL1.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
unsigned int prn_ = pseudoranges_iter->second.PRN;
|
unsigned int prn_ = observables_iter->second.PRN;
|
||||||
for(pseudoranges_iter2 = pseudorangesL2.begin();
|
for(observables_iter2 = observablesL2.begin();
|
||||||
pseudoranges_iter2 != pseudorangesL2.end();
|
observables_iter2 != observablesL2.end();
|
||||||
pseudoranges_iter2++)
|
observables_iter2++)
|
||||||
{
|
{
|
||||||
if(pseudoranges_iter2->second.PRN == prn_)
|
if(observables_iter2->second.PRN == prn_)
|
||||||
{
|
{
|
||||||
std::pair<Gnss_Synchro, Gnss_Synchro> p;
|
std::pair<Gnss_Synchro, Gnss_Synchro> p;
|
||||||
Gnss_Synchro pr1 = pseudoranges_iter->second;
|
Gnss_Synchro pr1 = observables_iter->second;
|
||||||
Gnss_Synchro pr2 = pseudoranges_iter2->second;
|
Gnss_Synchro pr2 = observables_iter2->second;
|
||||||
p = std::make_pair(pr1, pr2);
|
p = std::make_pair(pr1, pr2);
|
||||||
common_pseudoranges.push_back(p);
|
common_observables.push_back(p);
|
||||||
pseudorangesL1_with_L2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
|
observablesL1_with_L2.insert(std::pair<int, Gnss_Synchro>(observables_iter->first, observables_iter->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::bitset<64> header = Rtcm::get_MT1001_4_header(1004, obs_time, pseudorangesL1_with_L2, ref_id, smooth_int, sync_flag, divergence_free);
|
std::bitset<64> header = Rtcm::get_MT1001_4_header(1004, obs_time, observablesL1_with_L2, ref_id, smooth_int, sync_flag, divergence_free);
|
||||||
std::string data = header.to_string();
|
std::string data = header.to_string();
|
||||||
|
|
||||||
for(common_pseudoranges_iter = common_pseudoranges.begin();
|
for(common_observables_iter = common_observables.begin();
|
||||||
common_pseudoranges_iter != common_pseudoranges.end();
|
common_observables_iter != common_observables.end();
|
||||||
common_pseudoranges_iter++)
|
common_observables_iter++)
|
||||||
{
|
{
|
||||||
std::bitset<125> content = Rtcm::get_MT1004_sat_content(ephL1, ephL2, obs_time, common_pseudoranges_iter->first, common_pseudoranges_iter->second);
|
std::bitset<125> content = Rtcm::get_MT1004_sat_content(ephL1, ephL2, obs_time, common_observables_iter->first, common_observables_iter->second);
|
||||||
data += content.to_string();
|
data += content.to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1564,7 +1564,7 @@ int Rtcm::read_MT1045(const std::string & message, Galileo_Ephemeris & gal_eph)
|
|||||||
|
|
||||||
// **********************************************************************************************
|
// **********************************************************************************************
|
||||||
//
|
//
|
||||||
// MESSAGE TYPE MSM1 (COMPACT PSEUDORANGES)
|
// MESSAGE TYPE MSM1 (COMPACT observables)
|
||||||
//
|
//
|
||||||
// **********************************************************************************************
|
// **********************************************************************************************
|
||||||
|
|
||||||
@ -1572,7 +1572,7 @@ std::string Rtcm::print_MSM_1( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -1596,7 +1596,7 @@ std::string Rtcm::print_MSM_1( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -1604,9 +1604,9 @@ std::string Rtcm::print_MSM_1( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_1_content_signal_data(pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_1_content_signal_data(observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
|
|
||||||
@ -1621,7 +1621,7 @@ std::string Rtcm::print_MSM_1( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string Rtcm::get_MSM_header(unsigned int msg_number,
|
std::string Rtcm::get_MSM_header(unsigned int msg_number,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -1640,8 +1640,8 @@ std::string Rtcm::get_MSM_header(unsigned int msg_number,
|
|||||||
Rtcm::set_DF417(divergence_free);
|
Rtcm::set_DF417(divergence_free);
|
||||||
Rtcm::set_DF418(smooth_int);
|
Rtcm::set_DF418(smooth_int);
|
||||||
|
|
||||||
Rtcm::set_DF394(pseudoranges);
|
Rtcm::set_DF394(observables);
|
||||||
Rtcm::set_DF395(pseudoranges);
|
Rtcm::set_DF395(observables);
|
||||||
|
|
||||||
std::string header = DF002.to_string() + DF003.to_string();
|
std::string header = DF002.to_string() + DF003.to_string();
|
||||||
header += DF004.to_string();
|
header += DF004.to_string();
|
||||||
@ -1654,38 +1654,38 @@ std::string Rtcm::get_MSM_header(unsigned int msg_number,
|
|||||||
DF418.to_string() +
|
DF418.to_string() +
|
||||||
DF394.to_string() +
|
DF394.to_string() +
|
||||||
DF395.to_string() +
|
DF395.to_string() +
|
||||||
Rtcm::set_DF396(pseudoranges);
|
Rtcm::set_DF396(observables);
|
||||||
|
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_1_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_1_content_sat_data(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string sat_data;
|
std::string sat_data;
|
||||||
sat_data.clear();
|
sat_data.clear();
|
||||||
|
|
||||||
Rtcm::set_DF394(pseudoranges);
|
Rtcm::set_DF394(observables);
|
||||||
unsigned int num_satellites = DF394.count();
|
unsigned int num_satellites = DF394.count();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
||||||
std::vector<unsigned int> pos;
|
std::vector<unsigned int> pos;
|
||||||
std::vector<unsigned int>::iterator it;
|
std::vector<unsigned int>::iterator it;
|
||||||
|
|
||||||
for(gnss_synchro_iter = pseudoranges.begin();
|
for(gnss_synchro_iter = observables.begin();
|
||||||
gnss_synchro_iter != pseudoranges.end();
|
gnss_synchro_iter != observables.end();
|
||||||
gnss_synchro_iter++)
|
gnss_synchro_iter++)
|
||||||
{
|
{
|
||||||
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
||||||
if(it == pos.end())
|
if(it == pos.end())
|
||||||
{
|
{
|
||||||
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
||||||
pseudoranges_vector.push_back(*gnss_synchro_iter);
|
observables_vector.push_back(*gnss_synchro_iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(observables_vector);
|
||||||
|
|
||||||
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
||||||
{
|
{
|
||||||
@ -1697,23 +1697,23 @@ std::string Rtcm::get_MSM_1_content_sat_data(const std::map<int, Gnss_Synchro> &
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_1_content_signal_data(const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_1_content_signal_data(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
signal_data.clear();
|
signal_data.clear();
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -1737,7 +1737,7 @@ std::string Rtcm::print_MSM_2( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -1761,7 +1761,7 @@ std::string Rtcm::print_MSM_2( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -1769,9 +1769,9 @@ std::string Rtcm::print_MSM_2( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_2_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_2_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -1783,26 +1783,26 @@ std::string Rtcm::print_MSM_2( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_2_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_2_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
std::string second_data_type;
|
std::string second_data_type;
|
||||||
std::string third_data_type;
|
std::string third_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -1832,7 +1832,7 @@ std::string Rtcm::print_MSM_3( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -1856,7 +1856,7 @@ std::string Rtcm::print_MSM_3( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -1864,9 +1864,9 @@ std::string Rtcm::print_MSM_3( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_1_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_3_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_3_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -1878,7 +1878,7 @@ std::string Rtcm::print_MSM_3( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_3_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_3_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -1886,19 +1886,19 @@ std::string Rtcm::get_MSM_3_content_signal_data(const Gps_Ephemeris & ephNAV, co
|
|||||||
std::string third_data_type;
|
std::string third_data_type;
|
||||||
std::string fourth_data_type;
|
std::string fourth_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -1929,7 +1929,7 @@ std::string Rtcm::print_MSM_4( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -1953,7 +1953,7 @@ std::string Rtcm::print_MSM_4( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -1961,9 +1961,9 @@ std::string Rtcm::print_MSM_4( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_4_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_4_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_4_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_4_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -1975,33 +1975,33 @@ std::string Rtcm::print_MSM_4( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_4_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_4_content_sat_data(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string sat_data;
|
std::string sat_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
std::string second_data_type;
|
std::string second_data_type;
|
||||||
|
|
||||||
Rtcm::set_DF394(pseudoranges);
|
Rtcm::set_DF394(observables);
|
||||||
unsigned int num_satellites = DF394.count();
|
unsigned int num_satellites = DF394.count();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
||||||
std::vector<unsigned int> pos;
|
std::vector<unsigned int> pos;
|
||||||
std::vector<unsigned int>::iterator it;
|
std::vector<unsigned int>::iterator it;
|
||||||
|
|
||||||
for(gnss_synchro_iter = pseudoranges.begin();
|
for(gnss_synchro_iter = observables.begin();
|
||||||
gnss_synchro_iter != pseudoranges.end();
|
gnss_synchro_iter != observables.end();
|
||||||
gnss_synchro_iter++)
|
gnss_synchro_iter++)
|
||||||
{
|
{
|
||||||
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
||||||
if(it == pos.end())
|
if(it == pos.end())
|
||||||
{
|
{
|
||||||
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
||||||
pseudoranges_vector.push_back(*gnss_synchro_iter);
|
observables_vector.push_back(*gnss_synchro_iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(observables_vector);
|
||||||
|
|
||||||
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
||||||
{
|
{
|
||||||
@ -2015,7 +2015,7 @@ std::string Rtcm::get_MSM_4_content_sat_data(const std::map<int, Gnss_Synchro> &
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_4_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_4_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -2024,19 +2024,19 @@ std::string Rtcm::get_MSM_4_content_signal_data(const Gps_Ephemeris & ephNAV, co
|
|||||||
std::string fourth_data_type;
|
std::string fourth_data_type;
|
||||||
std::string fifth_data_type;
|
std::string fifth_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -2069,7 +2069,7 @@ std::string Rtcm::print_MSM_5( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -2093,7 +2093,7 @@ std::string Rtcm::print_MSM_5( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -2101,9 +2101,9 @@ std::string Rtcm::print_MSM_5( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_5_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_5_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_5_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_5_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -2115,7 +2115,7 @@ std::string Rtcm::print_MSM_5( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string sat_data;
|
std::string sat_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -2123,27 +2123,27 @@ std::string Rtcm::get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> &
|
|||||||
std::string third_data_type;
|
std::string third_data_type;
|
||||||
std::string fourth_data_type;
|
std::string fourth_data_type;
|
||||||
|
|
||||||
Rtcm::set_DF394(pseudoranges);
|
Rtcm::set_DF394(observables);
|
||||||
unsigned int num_satellites = DF394.count();
|
unsigned int num_satellites = DF394.count();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
std::map<int, Gnss_Synchro>::const_iterator gnss_synchro_iter;
|
||||||
std::vector<unsigned int> pos;
|
std::vector<unsigned int> pos;
|
||||||
std::vector<unsigned int>::iterator it;
|
std::vector<unsigned int>::iterator it;
|
||||||
|
|
||||||
for(gnss_synchro_iter = pseudoranges.begin();
|
for(gnss_synchro_iter = observables.begin();
|
||||||
gnss_synchro_iter != pseudoranges.end();
|
gnss_synchro_iter != observables.end();
|
||||||
gnss_synchro_iter++)
|
gnss_synchro_iter++)
|
||||||
{
|
{
|
||||||
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
it = std::find(pos.begin(), pos.end(), 65 - gnss_synchro_iter->second.PRN);
|
||||||
if(it == pos.end())
|
if(it == pos.end())
|
||||||
{
|
{
|
||||||
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
pos.push_back(65 - gnss_synchro_iter->second.PRN);
|
||||||
pseudoranges_vector.push_back(*gnss_synchro_iter);
|
observables_vector.push_back(*gnss_synchro_iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(observables_vector);
|
||||||
|
|
||||||
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
for(unsigned int nsat = 0; nsat < num_satellites; nsat++)
|
||||||
{
|
{
|
||||||
@ -2161,7 +2161,7 @@ std::string Rtcm::get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> &
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_5_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_5_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -2171,19 +2171,19 @@ std::string Rtcm::get_MSM_5_content_signal_data(const Gps_Ephemeris & ephNAV, co
|
|||||||
std::string fifth_data_type;
|
std::string fifth_data_type;
|
||||||
std::string sixth_data_type;
|
std::string sixth_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -2219,7 +2219,7 @@ std::string Rtcm::print_MSM_6( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -2243,7 +2243,7 @@ std::string Rtcm::print_MSM_6( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -2251,9 +2251,9 @@ std::string Rtcm::print_MSM_6( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_4_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_4_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_6_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_6_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -2265,7 +2265,7 @@ std::string Rtcm::print_MSM_6( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_6_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_6_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -2274,19 +2274,19 @@ std::string Rtcm::get_MSM_6_content_signal_data(const Gps_Ephemeris & ephNAV, co
|
|||||||
std::string fourth_data_type;
|
std::string fourth_data_type;
|
||||||
std::string fifth_data_type;
|
std::string fifth_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -2320,7 +2320,7 @@ std::string Rtcm::print_MSM_7( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -2344,7 +2344,7 @@ std::string Rtcm::print_MSM_7( const Gps_Ephemeris & gps_eph,
|
|||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number,
|
std::string header = Rtcm::get_MSM_header(msg_number,
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
observables,
|
||||||
ref_id,
|
ref_id,
|
||||||
clock_steering_indicator,
|
clock_steering_indicator,
|
||||||
external_clock_indicator,
|
external_clock_indicator,
|
||||||
@ -2352,9 +2352,9 @@ std::string Rtcm::print_MSM_7( const Gps_Ephemeris & gps_eph,
|
|||||||
divergence_free,
|
divergence_free,
|
||||||
more_messages);
|
more_messages);
|
||||||
|
|
||||||
std::string sat_data = Rtcm::get_MSM_5_content_sat_data(pseudoranges);
|
std::string sat_data = Rtcm::get_MSM_5_content_sat_data(observables);
|
||||||
|
|
||||||
std::string signal_data = Rtcm::get_MSM_7_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges);
|
std::string signal_data = Rtcm::get_MSM_7_content_signal_data(gps_eph, gps_cnav_eph, gal_eph, obs_time, observables);
|
||||||
|
|
||||||
std::string message = build_message(header + sat_data + signal_data);
|
std::string message = build_message(header + sat_data + signal_data);
|
||||||
if(server_is_running)
|
if(server_is_running)
|
||||||
@ -2366,7 +2366,7 @@ std::string Rtcm::print_MSM_7( const Gps_Ephemeris & gps_eph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::get_MSM_7_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::get_MSM_7_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string signal_data;
|
std::string signal_data;
|
||||||
std::string first_data_type;
|
std::string first_data_type;
|
||||||
@ -2376,19 +2376,19 @@ std::string Rtcm::get_MSM_7_content_signal_data(const Gps_Ephemeris & ephNAV, co
|
|||||||
std::string fifth_data_type;
|
std::string fifth_data_type;
|
||||||
std::string sixth_data_type;
|
std::string sixth_data_type;
|
||||||
|
|
||||||
unsigned int Ncells = pseudoranges.size();
|
unsigned int Ncells = observables.size();
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > pseudoranges_vector;
|
std::vector<std::pair<int, Gnss_Synchro> > observables_vector;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
std::map<int, Gnss_Synchro>::const_iterator map_iter;
|
||||||
|
|
||||||
for(map_iter = pseudoranges.begin();
|
for(map_iter = observables.begin();
|
||||||
map_iter != pseudoranges.end();
|
map_iter != observables.end();
|
||||||
map_iter++)
|
map_iter++)
|
||||||
{
|
{
|
||||||
pseudoranges_vector.push_back(*map_iter);
|
observables_vector.push_back(*map_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(pseudoranges_vector);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_signal = Rtcm::sort_by_signal(observables_vector);
|
||||||
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
std::reverse(ordered_by_signal.begin(), ordered_by_signal.end());
|
||||||
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
std::vector<std::pair<int, Gnss_Synchro> > ordered_by_PRN_pos = Rtcm::sort_by_PRN_mask(ordered_by_signal);
|
||||||
|
|
||||||
@ -2769,14 +2769,14 @@ int Rtcm::set_DF005(bool sync_flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Rtcm::set_DF006(const std::map<int, Gnss_Synchro> & pseudoranges)
|
int Rtcm::set_DF006(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
unsigned short int nsats = 0;
|
unsigned short int nsats = 0;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
nsats++;
|
nsats++;
|
||||||
}
|
}
|
||||||
@ -3623,12 +3623,12 @@ int Rtcm::set_DF395(const std::map<int, Gnss_Synchro> & gnss_synchro)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rtcm::set_DF396(const std::map<int, Gnss_Synchro> & pseudoranges)
|
std::string Rtcm::set_DF396(const std::map<int, Gnss_Synchro> & observables)
|
||||||
{
|
{
|
||||||
std::string DF396;
|
std::string DF396;
|
||||||
std::map<int, Gnss_Synchro>::const_iterator pseudoranges_iter;
|
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||||
Rtcm::set_DF394(pseudoranges);
|
Rtcm::set_DF394(observables);
|
||||||
Rtcm::set_DF395(pseudoranges);
|
Rtcm::set_DF395(observables);
|
||||||
unsigned int num_signals = DF395.count();
|
unsigned int num_signals = DF395.count();
|
||||||
unsigned int num_satellites = DF394.count();
|
unsigned int num_satellites = DF394.count();
|
||||||
|
|
||||||
@ -3643,16 +3643,16 @@ std::string Rtcm::set_DF396(const std::map<int, Gnss_Synchro> & pseudoranges)
|
|||||||
std::vector<unsigned int> list_of_sats;
|
std::vector<unsigned int> list_of_sats;
|
||||||
std::vector<int> list_of_signals;
|
std::vector<int> list_of_signals;
|
||||||
|
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
list_of_sats.push_back(pseudoranges_iter->second.PRN);
|
list_of_sats.push_back(observables_iter->second.PRN);
|
||||||
|
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
sig = sig_.substr(0,2);
|
sig = sig_.substr(0,2);
|
||||||
|
|
||||||
std::string sys(&pseudoranges_iter->second.System, 1);
|
std::string sys(&observables_iter->second.System, 1);
|
||||||
|
|
||||||
if ((sig.compare("1C") == 0) && (sys.compare("G") == 0 ) )
|
if ((sig.compare("1C") == 0) && (sys.compare("G") == 0 ) )
|
||||||
{
|
{
|
||||||
@ -3697,40 +3697,40 @@ std::string Rtcm::set_DF396(const std::map<int, Gnss_Synchro> & pseudoranges)
|
|||||||
for(unsigned int sat = 0; sat < num_satellites; sat++)
|
for(unsigned int sat = 0; sat < num_satellites; sat++)
|
||||||
{
|
{
|
||||||
value = false;
|
value = false;
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(observables_iter = observables.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
observables_iter != observables.end();
|
||||||
pseudoranges_iter++)
|
observables_iter++)
|
||||||
{
|
{
|
||||||
std::string sig_(pseudoranges_iter->second.Signal);
|
std::string sig_(observables_iter->second.Signal);
|
||||||
sig = sig_.substr(0,2);
|
sig = sig_.substr(0,2);
|
||||||
std::string sys(&pseudoranges_iter->second.System, 1);
|
std::string sys(&observables_iter->second.System, 1);
|
||||||
|
|
||||||
if ((sig.compare("1C") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 2) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("1C") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 2) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sig.compare("2S") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 15) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("2S") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 15) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sig.compare("5X") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 24) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("5X") == 0) && (sys.compare("G") == 0 ) && (list_of_signals.at(row) == 32 - 24) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sig.compare("1B") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 4) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("1B") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 4) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sig.compare("5X") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 24) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("5X") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 24) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sig.compare("7X") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 16) && (pseudoranges_iter->second.PRN == list_of_sats.at(sat) ) )
|
if ((sig.compare("7X") == 0) && (sys.compare("E") == 0 ) && (list_of_signals.at(row) == 32 - 16) && (observables_iter->second.PRN == list_of_sats.at(sat) ) )
|
||||||
{
|
{
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
@ -89,22 +89,22 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1001 (L1-Only GPS RTK Observables)
|
* \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, unsigned short station_id);
|
std::string print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1002 (Extended L1-Only GPS RTK Observables)
|
* \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, unsigned short station_id);
|
std::string print_MT1002(const Gps_Ephemeris & gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1003 (L1 & L2 GPS RTK Observables)
|
* \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, unsigned short station_id);
|
std::string print_MT1003(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1004 (Extended L1 & L2 GPS RTK Observables)
|
* \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, unsigned short station_id);
|
std::string print_MT1004(const Gps_Ephemeris & ephL1, const Gps_CNAV_Ephemeris & ephL2, double obs_time, const std::map<int, Gnss_Synchro> & observables, unsigned short station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1005 (Stationary Antenna Reference Point)
|
* \brief Prints message type 1005 (Stationary Antenna Reference Point)
|
||||||
@ -155,13 +155,13 @@ public:
|
|||||||
int read_MT1045(const std::string & message, Galileo_Ephemeris & gal_eph);
|
int read_MT1045(const std::string & message, Galileo_Ephemeris & gal_eph);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints messages of type MSM1 (Compact GNSS pseudoranges)
|
* \brief Prints messages of type MSM1 (Compact GNSS observables)
|
||||||
*/
|
*/
|
||||||
std::string print_MSM_1( const Gps_Ephemeris & gps_eph,
|
std::string print_MSM_1( 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,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -191,7 +191,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -206,7 +206,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -221,7 +221,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -236,7 +236,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -251,7 +251,7 @@ public:
|
|||||||
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
const Gps_CNAV_Ephemeris & gps_cnav_eph,
|
||||||
const Galileo_Ephemeris & gal_eph,
|
const Galileo_Ephemeris & gal_eph,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -290,7 +290,7 @@ private:
|
|||||||
//
|
//
|
||||||
std::bitset<64> get_MT1001_4_header(unsigned int msg_number,
|
std::bitset<64> get_MT1001_4_header(unsigned int msg_number,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int smooth_int,
|
unsigned int smooth_int,
|
||||||
bool sync_flag,
|
bool sync_flag,
|
||||||
@ -305,7 +305,7 @@ private:
|
|||||||
|
|
||||||
std::string get_MSM_header(unsigned int msg_number,
|
std::string get_MSM_header(unsigned int msg_number,
|
||||||
double obs_time,
|
double obs_time,
|
||||||
const std::map<int, Gnss_Synchro> & pseudoranges,
|
const std::map<int, Gnss_Synchro> & observables,
|
||||||
unsigned int ref_id,
|
unsigned int ref_id,
|
||||||
unsigned int clock_steering_indicator,
|
unsigned int clock_steering_indicator,
|
||||||
unsigned int external_clock_indicator,
|
unsigned int external_clock_indicator,
|
||||||
@ -313,17 +313,17 @@ private:
|
|||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages);
|
bool more_messages);
|
||||||
|
|
||||||
std::string get_MSM_1_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_1_content_sat_data(const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_4_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_4_content_sat_data(const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_5_content_sat_data(const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
std::string get_MSM_1_content_signal_data(const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_1_content_signal_data(const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_2_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_2_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_3_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_3_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_4_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_4_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_5_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_5_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_6_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_6_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
std::string get_MSM_7_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string get_MSM_7_content_signal_data(const Gps_Ephemeris & ephNAV, const Gps_CNAV_Ephemeris & ephCNAV, const Galileo_Ephemeris & ephFNAV, double obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Utilities
|
// Utilities
|
||||||
@ -799,7 +799,7 @@ private:
|
|||||||
int set_DF005(bool sync_flag);
|
int set_DF005(bool sync_flag);
|
||||||
|
|
||||||
std::bitset<5> DF006;
|
std::bitset<5> DF006;
|
||||||
int set_DF006(const std::map<int, Gnss_Synchro> & pseudoranges);
|
int set_DF006(const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
std::bitset<1> DF007;
|
std::bitset<1> DF007;
|
||||||
int set_DF007(bool divergence_free_smoothing_indicator); // 0 - Divergence-free smoothing not used 1 - Divergence-free smoothing used
|
int set_DF007(bool divergence_free_smoothing_indicator); // 0 - Divergence-free smoothing not used 1 - Divergence-free smoothing used
|
||||||
@ -1071,12 +1071,12 @@ private:
|
|||||||
int set_DF393(bool more_messages); //1 indicates that more MSMs follow for given physical time and reference station ID
|
int set_DF393(bool more_messages); //1 indicates that more MSMs follow for given physical time and reference station ID
|
||||||
|
|
||||||
std::bitset<64> DF394;
|
std::bitset<64> DF394;
|
||||||
int set_DF394(const std::map<int, Gnss_Synchro> & pseudoranges);
|
int set_DF394(const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
std::bitset<32> DF395;
|
std::bitset<32> DF395;
|
||||||
int set_DF395(const std::map<int, Gnss_Synchro> & pseudoranges);
|
int set_DF395(const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
std::string set_DF396(const std::map<int, Gnss_Synchro> & pseudoranges);
|
std::string set_DF396(const std::map<int, Gnss_Synchro> & observables);
|
||||||
|
|
||||||
std::bitset<8> DF397;
|
std::bitset<8> DF397;
|
||||||
int set_DF397(const Gnss_Synchro & gnss_synchro);
|
int set_DF397(const Gnss_Synchro & gnss_synchro);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user