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

New feature (FE01): RINEX v 2.11 now outputs the following observables:

PSEUDORANGE
CARRIER PHASE
CARRIER DOPPLER
SIGNAL STRENGTH (dB-Hz)

thus, it enables the realtime kinematics and PPP positioning for first time in an open source GNSS SDR. Enjoy!

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@359 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas 2013-05-24 16:11:48 +00:00
parent 91e83dfa1a
commit e728450192
10 changed files with 34 additions and 19 deletions

View File

@ -221,7 +221,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{ {
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, d_tx_time, pseudoranges); rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, d_tx_time, gnss_pseudoranges_map);
} }
} }
} }

View File

@ -136,6 +136,7 @@ Rinex_Printer::Rinex_Printer()
// RINEX v2.10 and v2.11 codes // RINEX v2.10 and v2.11 codes
observationType["PSEUDORANGE_CA_v2"] = "C"; observationType["PSEUDORANGE_CA_v2"] = "C";
observationType["PSEUDORANGE_P_v2"] = "P"; observationType["PSEUDORANGE_P_v2"] = "P";
observationType["CARRIER_PHASE_CA_v2"] = "L";
observationType["DOPPLER_v2"] = "D"; observationType["DOPPLER_v2"] = "D";
observationType["SIGNAL_STRENGTH_v2"] = "S"; observationType["SIGNAL_STRENGTH_v2"] = "S";
observationCode["GPS_L1_CA_v2"] = "1"; observationCode["GPS_L1_CA_v2"] = "1";
@ -992,10 +993,17 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, Gps_Ephemeris eph, doub
strm << numberTypesObservations; strm << numberTypesObservations;
line += Rinex_Printer::rightJustify(strm.str(), 6); line += Rinex_Printer::rightJustify(strm.str(), 6);
// per type of observation // per type of observation
// GPS L1 PSEUDORANGE
line += Rinex_Printer::rightJustify(observationType["PSEUDORANGE_CA_v2"], 5); line += Rinex_Printer::rightJustify(observationType["PSEUDORANGE_CA_v2"], 5);
line += observationCode["GPS_L1_CA_v2"]; line += observationCode["GPS_L1_CA_v2"];
line += std::string(1, ' '); // GPS L1 PHASE
line += observationType["SIGNAL_STRENGTH_v2"]; line += Rinex_Printer::rightJustify(observationType["CARRIER_PHASE_CA_v2"], 5);
line += observationCode["GPS_L1_CA_v2"];
// GPS DOPPLER L1
line += Rinex_Printer::rightJustify(observationType["DOPPLER_v2"], 5);
line += observationCode["GPS_L1_CA_v2"];
// GPS L1 SIGNAL STRENGTH
line += Rinex_Printer::rightJustify(observationType["SIGNAL_STRENGTH_v2"], 5);
line += observationCode["GPS_L1_CA_v2"]; line += observationCode["GPS_L1_CA_v2"];
line += std::string(60-line.size(), ' '); line += std::string(60-line.size(), ' ');
line += Rinex_Printer::leftJustify("# / TYPES OF OBSERV", 20); line += Rinex_Printer::leftJustify("# / TYPES OF OBSERV", 20);
@ -1050,7 +1058,7 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, Gps_Ephemeris eph, doub
void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double obs_time, std::map<int,double> pseudoranges) void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double obs_time, std::map<int,Gnss_Synchro> pseudoranges)
{ {
// RINEX observations timestamps are GPS timestamps. // RINEX observations timestamps are GPS timestamps.
@ -1103,14 +1111,14 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
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,double>::iterator pseudoranges_iter; std::map<int,Gnss_Synchro>::iterator pseudoranges_iter;
for(pseudoranges_iter = pseudoranges.begin(); for(pseudoranges_iter = pseudoranges.begin();
pseudoranges_iter != pseudoranges.end(); pseudoranges_iter != pseudoranges.end();
pseudoranges_iter++) pseudoranges_iter++)
{ {
numSatellitesObserved++; numSatellitesObserved++;
} }
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 2); line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
for(pseudoranges_iter = pseudoranges.begin(); for(pseudoranges_iter = pseudoranges.begin();
pseudoranges_iter != pseudoranges.end(); pseudoranges_iter != pseudoranges.end();
pseudoranges_iter++) pseudoranges_iter++)
@ -1133,8 +1141,9 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
std::string lineObs; std::string lineObs;
lineObs.clear(); lineObs.clear();
line.clear(); line.clear();
// GPS L1 PSEUDORANGE
line += std::string(2, ' '); line += std::string(2, ' ');
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second, 3), 14); lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_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!!
@ -1146,15 +1155,13 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
{ {
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1); lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
} }
int ssi=signalStrength(54.0); // TODO: include estimated signal strength // GPS L1 CA PHASE
if (ssi == 0) lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_phase_rads/GPS_TWO_PI, 3), 14);
{ // GPS L1 CA DOPPLER
lineObs += std::string(1, ' '); lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.Carrier_Doppler_hz, 3), 14);
} //GPS L1 SIGNAL STRENGTH
else //int ssi=signalStrength(54.0); // The original RINEX 2.11 file stores the RSS in a tabulated format 1-9. However, it is also valid to store the CN0 using dB-Hz units
{ lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second.CN0_dB_hz, 3), 14);
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(ssi), 1);
}
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;
} }
@ -1189,7 +1196,7 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
//Number of satellites observed in current epoch //Number of satellites observed in current epoch
int numSatellitesObserved = 0; int numSatellitesObserved = 0;
std::map<int,double>::iterator pseudoranges_iter; std::map<int,Gnss_Synchro>::iterator pseudoranges_iter;
for(pseudoranges_iter = pseudoranges.begin(); for(pseudoranges_iter = pseudoranges.begin();
pseudoranges_iter != pseudoranges.end(); pseudoranges_iter != pseudoranges.end();
pseudoranges_iter++) pseudoranges_iter++)
@ -1216,7 +1223,7 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
if ((int)pseudoranges_iter->first < 10) lineObs += std::string(1, '0'); if ((int)pseudoranges_iter->first < 10) lineObs += std::string(1, '0');
lineObs += boost::lexical_cast<std::string>((int)pseudoranges_iter->first); lineObs += boost::lexical_cast<std::string>((int)pseudoranges_iter->first);
//lineObs += std::string(2, ' '); //lineObs += std::string(2, ' ');
lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_iter->second, 3), 14); lineObs += Rinex_Printer::rightJustify(asString(pseudoranges_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!!

View File

@ -59,6 +59,7 @@
#include "gps_navigation_message.h" #include "gps_navigation_message.h"
#include "boost/date_time/posix_time/posix_time.hpp" #include "boost/date_time/posix_time/posix_time.hpp"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "gnss_synchro.h"
/*! /*!
* \brief Class that handles the generation of Receiver * \brief Class that handles the generation of Receiver
@ -109,7 +110,7 @@ public:
/*! /*!
* \brief Writes observables into the RINEX file * \brief Writes observables into the RINEX file
*/ */
void log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double obs_time, std::map<int,double> pseudoranges); void log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double obs_time, std::map<int,Gnss_Synchro> pseudoranges);
std::map<std::string,std::string> satelliteSystem; //<! GPS, GLONASS, SBAS payload, Galileo or Compass std::map<std::string,std::string> satelliteSystem; //<! GPS, GLONASS, SBAS payload, Galileo or Compass
std::map<std::string,std::string> observationType; //<! PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH std::map<std::string,std::string> observationType; //<! PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
std::map<std::string,std::string> observationCode; //<! GNSS observation descriptors std::map<std::string,std::string> observationCode; //<! GNSS observation descriptors

View File

@ -438,6 +438,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
// This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0 // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0
current_synchro_data.Code_phase_secs = 0; current_synchro_data.Code_phase_secs = 0;
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz= (double)d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;

View File

@ -451,6 +451,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
// This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0 // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0
current_synchro_data.Code_phase_secs=0; current_synchro_data.Code_phase_secs=0;
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz= (double)d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;

View File

@ -553,6 +553,7 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
// This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, Code_phase_secs=0 // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, Code_phase_secs=0
current_synchro_data.Code_phase_secs=0; current_synchro_data.Code_phase_secs=0;
current_synchro_data.Carrier_phase_rads=d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads=d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz=d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz=d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz=d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_tracking=true; current_synchro_data.Flag_valid_tracking=true;
*out[0] =current_synchro_data; *out[0] =current_synchro_data;

View File

@ -494,6 +494,7 @@ int Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::general_work (int noutput_items, gr_vec
// This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0 // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0
current_synchro_data.Code_phase_secs=0; current_synchro_data.Code_phase_secs=0;
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz= (double)d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;

View File

@ -498,6 +498,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
// This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0 // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, thus, Code_phase_secs=0
current_synchro_data.Code_phase_secs=0; current_synchro_data.Code_phase_secs=0;
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz= (double)d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;

View File

@ -534,6 +534,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
current_synchro_data.Prompt_Q = (double)(*d_Prompt).imag(); current_synchro_data.Prompt_Q = (double)(*d_Prompt).imag();
current_synchro_data.Tracking_timestamp_secs = d_sample_counter_seconds; current_synchro_data.Tracking_timestamp_secs = d_sample_counter_seconds;
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad; current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
current_synchro_data.Carrier_Doppler_hz= (double)d_carrier_doppler_hz;
current_synchro_data.Code_phase_secs = (double)d_code_phase_samples * (1/(float)d_fs_in); current_synchro_data.Code_phase_secs = (double)d_code_phase_samples * (1/(float)d_fs_in);
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz; current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
*out[0] = current_synchro_data; *out[0] = current_synchro_data;

View File

@ -59,6 +59,7 @@ public:
double Code_phase_secs; //!< Set by Tracking processing block double Code_phase_secs; //!< Set by Tracking processing block
double Tracking_timestamp_secs; //!< Set by Tracking processing block double Tracking_timestamp_secs; //!< Set by Tracking processing block
double CN0_dB_hz; //!< Set by Tracking processing block double CN0_dB_hz; //!< Set by Tracking processing block
double Carrier_Doppler_hz; //!< Set by Tracking processing block
bool Flag_valid_tracking; bool Flag_valid_tracking;
//Telemetry Decoder //Telemetry Decoder
double Preamble_timestamp_ms; //!< Set by Telemetry Decoder processing block double Preamble_timestamp_ms; //!< Set by Telemetry Decoder processing block