1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-06-27 07:32:57 +00:00

Merge branch 'dmiralles2009-glonass_dec' into next

This commit is contained in:
Carles Fernandez 2018-01-28 11:47:44 +01:00
commit bc1ce24570
5 changed files with 124 additions and 78 deletions

View File

@ -505,7 +505,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_M
line += Rinex_Printer::rightJustify(month, 6); line += Rinex_Printer::rightJustify(month, 6);
line += Rinex_Printer::rightJustify(day, 6); line += Rinex_Printer::rightJustify(day, 6);
line += std::string(3, ' '); line += std::string(3, ' ');
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(glonass_gnav_utc_model.d_tau_c, 16, 2), 19); line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(glonass_gnav_utc_model.d_tau_c, 19, 2), 19);
line += std::string(20, ' '); line += std::string(20, ' ');
line += Rinex_Printer::leftJustify("CORR TO SYSTEM TIME", 20); line += Rinex_Printer::leftJustify("CORR TO SYSTEM TIME", 20);
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
@ -3319,12 +3319,24 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
out << line << std::endl; out << line << std::endl;
// -------- Line MARKER TYPE // -------- Line MARKER TYPE
if (version == 2)
{
line.clear();
line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER NUMBER", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
}
if (version == 3)
{
line.clear(); line.clear();
line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += std::string(40, ' '); line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER TYPE", 20); line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
out << line << std::endl; out << line << std::endl;
}
// -------- Line OBSERVER / AGENCY // -------- Line OBSERVER / AGENCY
line.clear(); line.clear();
@ -3619,12 +3631,25 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
out << line << std::endl; out << line << std::endl;
// -------- Line MARKER NAME // -------- Line MARKER NAME / TYPE
if (version == 2)
{
line.clear(); line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += Rinex_Printer::leftJustify("MARKER NAME", 20); line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER NUMBER", 20);
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
out << line << std::endl; out << line << std::endl;
}
if (version == 3)
{
line.clear();
line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
}
// -------- Line MARKER TYPE // -------- Line MARKER TYPE
line.clear(); line.clear();
@ -3958,11 +3983,24 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
out << line << std::endl; out << line << std::endl;
// -------- Line MARKER NAME // -------- Line MARKER NAME
if (version == 2)
{
line.clear(); line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += Rinex_Printer::leftJustify("MARKER NAME", 20); line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER NUMBER", 20);
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
out << line << std::endl; out << line << std::endl;
}
if (version == 3)
{
line.clear();
line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
}
// -------- Line MARKER TYPE // -------- Line MARKER TYPE
line.clear(); line.clear();
@ -4264,17 +4302,17 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
// -------- Line MARKER NAME // -------- Line MARKER NAME
line.clear(); line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property,
line += Rinex_Printer::leftJustify("MARKER NAME", 20); line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
out << line << std::endl; out << line << std::endl;
// -------- Line MARKER TYPE // -------- Line MARKER TYPE
//line.clear(); line.clear();
//line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
//line += std::string(40, ' '); line += std::string(40, ' ');
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20); line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
//Rinex_Printer::lengthCheck(line); Rinex_Printer::lengthCheck(line);
//out << line << std::endl; out << line << std::endl;
// -------- Line OBSERVER / AGENCY // -------- Line OBSERVER / AGENCY
line.clear(); line.clear();

View File

@ -150,7 +150,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second); eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
//convert observation from GNSS-SDR class to RTKLIB structure //convert observation from GNSS-SDR class to RTKLIB structure
obsd_t newobs = {{0,0}, '0', '0', {}, {}, {}, {}, {}, {}}; obsd_t newobs = {{0,0}, '0', '0', {}, {}, {}, {}, {}, {}};
obs_data[valid_obs] = insert_obs_to_rtklib(newobs, obs_data[valid_obs+glo_valid_obs] = insert_obs_to_rtklib(newobs,
gnss_observables_iter->second, gnss_observables_iter->second,
galileo_ephemeris_iter->second.WN_5, galileo_ephemeris_iter->second.WN_5,
0); 0);
@ -295,7 +295,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
if (eph_data[i].sat == static_cast<int>(gnss_observables_iter->second.PRN)) if (eph_data[i].sat == static_cast<int>(gnss_observables_iter->second.PRN))
{ {
eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second); eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
obs_data[i] = insert_obs_to_rtklib(obs_data[i], obs_data[i+glo_valid_obs] = insert_obs_to_rtklib(obs_data[i],
gnss_observables_iter->second, gnss_observables_iter->second,
gps_cnav_ephemeris_iter->second.i_GPS_week, gps_cnav_ephemeris_iter->second.i_GPS_week,
2);//Band 3 (L5) 2);//Band 3 (L5)
@ -313,7 +313,7 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
obsd_t newobs = {{0,0}, '0', '0', {}, {}, obsd_t newobs = {{0,0}, '0', '0', {}, {},
{default_code_, default_code_, default_code_}, {default_code_, default_code_, default_code_},
{}, {0.0, 0.0, 0.0}, {}}; {}, {0.0, 0.0, 0.0}, {}};
obs_data[valid_obs] = insert_obs_to_rtklib(newobs, obs_data[valid_obs+glo_valid_obs] = insert_obs_to_rtklib(newobs,
gnss_observables_iter->second, gnss_observables_iter->second,
gps_cnav_ephemeris_iter->second.i_GPS_week, gps_cnav_ephemeris_iter->second.i_GPS_week,
2);//Band 3 (L5) 2);//Band 3 (L5)

View File

@ -194,6 +194,7 @@ void glonass_l1_ca_telemetry_decoder_cc::decode_string(double *frame_symbols,int
if (d_nav.have_new_ephemeris() == true) if (d_nav.have_new_ephemeris() == true)
{ {
// get object for this SV (mandatory) // get object for this SV (mandatory)
d_nav.gnav_ephemeris.i_satellite_freq_channel = d_satellite.get_rf_link();
std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris()); std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV Ephemeris have been received on channel" << d_channel << " from satellite " << d_satellite; LOG(INFO) << "GLONASS GNAV Ephemeris have been received on channel" << d_channel << " from satellite " << d_satellite;

View File

@ -223,7 +223,13 @@ void Gnss_Satellite::set_PRN(unsigned int PRN_)
} }
signed int Gnss_Satellite::get_rf_link() const
{
// Get satellite's rf link. Identifies the GLONASS Frequency Channel
signed int rf_link_;
rf_link_ = rf_link;
return rf_link_;
}
unsigned int Gnss_Satellite::get_PRN() const unsigned int Gnss_Satellite::get_PRN() const

View File

@ -52,6 +52,7 @@ public:
~Gnss_Satellite(); //!< Default Destructor. ~Gnss_Satellite(); //!< Default Destructor.
void update_PRN(unsigned int PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages void update_PRN(unsigned int PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
unsigned int get_PRN() const; //!< Gets satellite's PRN unsigned int get_PRN() const; //!< Gets satellite's PRN
signed int get_rf_link() const; //!< Gets the satellite's rf link
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"} std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"} std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"} std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}