mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-21 08:44:10 +00:00
Modify CNAV message structure header
This commit is contained in:
parent
e9e8de7d40
commit
11486670ec
@ -258,7 +258,10 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
|
|||||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_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', {}, {}, {}, {}, {}, {}};
|
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
|
obsd_t newobs = {{0,0}, '0', '0', {}, {},
|
||||||
|
{default_code_, default_code_, default_code_},
|
||||||
|
{}, {0.0, 0.0, 0.0}, {}};
|
||||||
obs_data[valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[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,
|
||||||
@ -271,6 +274,53 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
|
|||||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//GPS L5
|
||||||
|
if(sig_.compare("5X") == 0)
|
||||||
|
{
|
||||||
|
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
|
if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend())
|
||||||
|
{
|
||||||
|
// 1. Find the same satellite in GPS L1 band
|
||||||
|
gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
|
if (gps_ephemeris_iter != gps_ephemeris_map.cend())
|
||||||
|
{
|
||||||
|
// 2. If found, replace the existing GPS L1 ephemeris with the GPS L5 ephemeris
|
||||||
|
// (more precise!), and attach the L5 observation to the L1 observation in RTKLIB structure
|
||||||
|
for (int i = 0; i < valid_obs; i++)
|
||||||
|
{
|
||||||
|
if (eph_data[i].sat == static_cast<int>(gnss_observables_iter->second.PRN))
|
||||||
|
{
|
||||||
|
eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
|
obs_data[i] = insert_obs_to_rtklib(obs_data[i],
|
||||||
|
gnss_observables_iter->second,
|
||||||
|
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||||
|
2);//Band 3 (L5)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 3. If not found, insert the GPS L5 ephemeris and the observation
|
||||||
|
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
|
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
|
//convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
|
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
|
obsd_t newobs = {{0,0}, '0', '0', {}, {},
|
||||||
|
{default_code_, default_code_, default_code_},
|
||||||
|
{}, {0.0, 0.0, 0.0}, {}};
|
||||||
|
obs_data[valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
|
gnss_observables_iter->second,
|
||||||
|
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||||
|
2);//Band 3 (L5)
|
||||||
|
valid_obs++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // the ephemeris are not available for this SV
|
||||||
|
{
|
||||||
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
|
@ -154,13 +154,13 @@ int gps_l5_telemetry_decoder_cc::general_work (int noutput_items __attribute__((
|
|||||||
//* delay by the formulae:
|
//* delay by the formulae:
|
||||||
//* \code
|
//* \code
|
||||||
//* symbolTime_ms = msg->tow * 6000 + *pdelay * 20
|
//* symbolTime_ms = msg->tow * 6000 + *pdelay * 20
|
||||||
d_TOW_at_current_symbol = static_cast<double>(msg.tow) * 6.0 + static_cast<double>(delay) * GPS_L5_PERIOD + 6 * GPS_L5_PERIOD;
|
d_TOW_at_current_symbol = static_cast<double>(msg.tow) * 6.0 + static_cast<double>(delay) * GPS_L5i_PERIOD + 6 * GPS_L5i_PERIOD;
|
||||||
d_TOW_at_current_symbol = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
|
d_TOW_at_current_symbol = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
|
||||||
d_flag_valid_word = true;
|
d_flag_valid_word = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d_TOW_at_current_symbol += GPS_L5_PERIOD;
|
d_TOW_at_current_symbol += GPS_L5i_PERIOD;
|
||||||
if (current_synchro_data.Flag_valid_symbol_output == false)
|
if (current_synchro_data.Flag_valid_symbol_output == false)
|
||||||
{
|
{
|
||||||
d_flag_valid_word = false;
|
d_flag_valid_word = false;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <utility> // std::pair
|
#include <utility> // std::pair
|
||||||
#include "MATH_CONSTANTS.h"
|
#include "MATH_CONSTANTS.h"
|
||||||
#include "gnss_frequencies.h"
|
#include "gnss_frequencies.h"
|
||||||
#include "GPS_L2C.h"
|
#include "GPS_L2C.h" // CNAV GPS NAVIGATION MESSAGE STRUCTURE
|
||||||
|
|
||||||
// Physical constants
|
// Physical constants
|
||||||
const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s]
|
const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s]
|
||||||
@ -178,7 +178,7 @@ const int32_t GPS_L5q_INIT_REG[210] =
|
|||||||
|
|
||||||
const int GPS_L5_CNAV_DATA_PAGE_BITS = 300; //!< GPS L5 CNAV page length, including preamble and CRC [bits]
|
const int GPS_L5_CNAV_DATA_PAGE_BITS = 300; //!< GPS L5 CNAV page length, including preamble and CRC [bits]
|
||||||
const int GPS_L5_SYMBOLS_PER_BIT = 2;
|
const int GPS_L5_SYMBOLS_PER_BIT = 2;
|
||||||
const int GPS_L5_SAMPLES_PER_SYMBOL = 1;
|
const int GPS_L5_SAMPLES_PER_SYMBOL = 10;
|
||||||
const int GPS_L5_CNAV_DATA_PAGE_SYMBOLS = 600;
|
const int GPS_L5_CNAV_DATA_PAGE_SYMBOLS = 600;
|
||||||
const int GPS_L5_CNAV_DATA_PAGE_DURATION_S = 6;
|
const int GPS_L5_CNAV_DATA_PAGE_DURATION_S = 6;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user