mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-30 06:52:58 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into rx_clock_correction
This commit is contained in:
@@ -11082,8 +11082,16 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Me
|
||||
//: idea resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
if (nav_msg.i_GPS_week < 512)
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||
return p_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11108,8 +11116,16 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_Ephemeris& ep
|
||||
// --??? No time correction here, since it will be done in the RINEX processor
|
||||
const double gps_t = obs_time;
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
if (eph.i_GPS_week < 512)
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||
return p_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11121,8 +11137,16 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_CNAV_Ephemeri
|
||||
// --??? No time correction here, since it will be done in the RINEX processor
|
||||
const double gps_t = obs_time;
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
if (eph.i_GPS_week < 512)
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||
return p_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
|
||||
return p_time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11178,6 +11202,7 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Glonass_Gnav_Ephe
|
||||
return utc_time;
|
||||
}
|
||||
|
||||
|
||||
double Rinex_Printer::get_leap_second(const Glonass_Gnav_Ephemeris& eph, const double gps_obs_time)
|
||||
{
|
||||
double tod = 0.0;
|
||||
|
||||
@@ -49,7 +49,7 @@ void Tracking_2nd_PLL_filter::calculate_lopp_coef(float* tau1, float* tau2, floa
|
||||
|
||||
void Tracking_2nd_PLL_filter::set_PLL_BW(float pll_bw_hz)
|
||||
{
|
||||
//Calculate filter coefficient values
|
||||
// Calculate filter coefficient values
|
||||
d_pllnoisebandwidth = pll_bw_hz;
|
||||
calculate_lopp_coef(&d_tau1_carr, &d_tau2_carr, d_pllnoisebandwidth, d_plldampingratio, 0.25); // Calculate filter coefficient values
|
||||
}
|
||||
@@ -64,14 +64,13 @@ void Tracking_2nd_PLL_filter::initialize()
|
||||
|
||||
|
||||
/*
|
||||
* PLL second order FIR filter
|
||||
* PLL second order IIR filter
|
||||
* Req Input in [Hz/Ti]
|
||||
* The output is in [Hz/s].
|
||||
*/
|
||||
float Tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
||||
{
|
||||
float carr_nco = d_old_carr_nco + (d_tau2_carr / d_tau1_carr) * (PLL_discriminator - d_old_carr_error) + (PLL_discriminator + d_old_carr_error) * (d_pdi_carr / (2.0 * d_tau1_carr));
|
||||
//carr_nco = d_old_carr_nco + (d_tau2_carr/d_tau1_carr)*(PLL_discriminator - d_old_carr_error) + PLL_discriminator * (d_pdi_carr/d_tau1_carr);
|
||||
d_old_carr_nco = carr_nco;
|
||||
d_old_carr_error = PLL_discriminator;
|
||||
return carr_nco;
|
||||
@@ -80,16 +79,15 @@ float Tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
||||
|
||||
Tracking_2nd_PLL_filter::Tracking_2nd_PLL_filter(float pdi_carr)
|
||||
{
|
||||
//--- PLL variables --------------------------------------------------------
|
||||
// PLL variables
|
||||
d_pdi_carr = pdi_carr; // Summation interval for carrier
|
||||
//d_plldampingratio = 0.65;
|
||||
d_plldampingratio = 0.7;
|
||||
}
|
||||
|
||||
|
||||
Tracking_2nd_PLL_filter::Tracking_2nd_PLL_filter()
|
||||
{
|
||||
//--- PLL variables --------------------------------------------------------
|
||||
// PLL variables
|
||||
d_pdi_carr = 0.001; // Summation interval for carrier
|
||||
d_plldampingratio = 0.7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user