mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 12:12:57 +00:00
Fix wrong comparison
This commit is contained in:
parent
4bb1872e17
commit
16f9e623c1
@ -11082,7 +11082,7 @@ 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
|
//: 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);
|
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::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||||
if (nav_msg.i_GPS_week > 512)
|
if (nav_msg.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||||
return p_time;
|
return p_time;
|
||||||
@ -11116,7 +11116,7 @@ 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
|
// --??? No time correction here, since it will be done in the RINEX processor
|
||||||
const double gps_t = obs_time;
|
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::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||||
if (eph.i_GPS_week > 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||||
return p_time;
|
return p_time;
|
||||||
@ -11137,7 +11137,7 @@ 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
|
// --??? No time correction here, since it will be done in the RINEX processor
|
||||||
const double gps_t = obs_time;
|
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::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week % 1024)) * 1000));
|
||||||
if (eph.i_GPS_week > 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t);
|
||||||
return p_time;
|
return p_time;
|
||||||
|
Loading…
Reference in New Issue
Block a user