utils/SSEphem/astrtime.cc
void utc2ut2 (long mjd, double utc, long &ut2_mjd, double &ut2)
{
    long ut1_mjd;
    double ut1;
    utc2ut1(mjd, utc, ut1_mjd, ut1);
    double arg = TWOPI * (2000.0 + ((double)ut1_mjd + ut1 - 51544.03))
								/ 365.2422;
    ut2 = ut1 + (0.022 * sin(arg) - 0.012 * cos(arg)
		 - 0.006 * sin(2.0 * arg) + 0.007 * cos(2.0 * arg)) / 86400.0;
    ut2_mjd = ut1_mjd;
    if (ut2 < 0.0) {
	ut2 += 1.0;
	ut2_mjd--;
    }
    if (ut2 > 1.0) {
	ut2 -= 1.0;
	ut2_mjd++;
    }
}
// UT2 appears to be of mostly historical interest.  Before 1972 the time
// broadcast services kept their time signals within 0.1 seconds of UT2,
// which is UT1 with annual and semiannual variations in the earth's
// rotation removed.  The formal relation between UT1 and UT2 is
//         UT2 = UT1 + 0.022 * sin(2 * Pi * t) - 0.012 * cos(2 * Pi * t)
//                   - 0.006 * sin(4 * Pi * t) + 0.007 * cos(4 * Pi * t)
// where t = 2000.0 + (MJD - 51544.03) / 365.2422, the Besselian day
// fraction.  See the Explanatory Supplement to the Astronomical Almanac
// (1992) page 85 and the Explanatory Supplement to IERS Bulletins A and B,
// March 1995.
UT2 appears to be of mostly historical interest.  Before 1972 the time
broadcast services kept their time signals within 0.1 seconds of UT2,
which is UT1 with annual and semiannual variations in the earth's
rotation removed.
UT2 appears to be of mostly historical interest . Before 1972 the time broadcast services kept their time signals within 0 . 1 seconds of UT2 which is UT1 with annual and semiannual variations in the earth ' s rotation removed .
void utc2ut2 (long mjd, double utc, long &ut2_mjd, double &ut2)
{
    long ut1_mjd;
    double ut1;
    utc2ut1(mjd, utc, ut1_mjd, ut1);
    double arg = TWOPI * (2000.0 + ((double)ut1_mjd + ut1 - 51544.03))
								/ 365.2422;
    ut2 = ut1 + (0.022 * sin(arg) - 0.012 * cos(arg)
		 - 0.006 * sin(2.0 * arg) + 0.007 * cos(2.0 * arg)) / 86400.0;
    ut2_mjd = ut1_mjd;
    if (ut2 < 0.0) {
	ut2 += 1.0;
	ut2_mjd--;
    }
    if (ut2 > 1.0) {
	ut2 -= 1.0;
	ut2_mjd++;
    }
}
void utc2ut2 ( long mjd , double utc , long & ut2_mjd , double & ut2 ) { long ut1_mjd ; double ut1 ; utc2ut1 ( mjd , utc , ut1_mjd , ut1 ) ; double arg = TWOPI * ( 2000.0 + ( ( double ) ut1_mjd + ut1 - 51544.03 ) ) / 365.2422 ; ut2 = ut1 + ( 0.022 * sin ( arg ) - 0.012 * cos ( arg ) - 0.006 * sin ( 2.0 * arg ) + 0.007 * cos ( 2.0 * arg ) ) / 86400.0 ; ut2_mjd = ut1_mjd ; if ( ut2 < 0.0 ) { ut2 += 1.0 ; ut2_mjd -- ; } if ( ut2 > 1.0 ) { ut2 -= 1.0 ; ut2_mjd ++ ; } }
UT2 appears to be of mostly historical interest.
UT2 appears to be of mostly historical interest .