public static function Tcgtt($tcg1, $tcg2, &$tt1, &$tt2) {
    /* 1977 Jan 1 00:00:32.184 TT, as MJD */
    $t77t = DJM77 + TTMTAI / DAYSEC;

    /* Result, safeguarding precision. */
    if ($tcg1 > $tcg2) {
      $tt1 = $tcg1;
      $tt2 = $tcg2 - ( ( $tcg1 - DJM0 ) + ( $tcg2 - $t77t ) ) * ELG;
    }
    else {
      $tt1 = $tcg1 - ( ( $tcg2 - DJM0 ) + ( $tcg1 - $t77t ) ) * ELG;
      $tt2 = $tcg2;
    }

    /* OK status. */
    return 0;
  }