public function x()
    {
        // Load file
        $file = new \SplFileObject($this->storage('finals.all'));

        // Get instance MJD, and MJD at line 0
        $mjdQ = $this->mjd;
        $mjd0 = (int)substr($file->getCurrentLine(), 7, 8);

        // Check for requested MJD before first date
        if ($mjdQ < $mjd0) {
            return false;
        }

        // Determine nearest center pointer
        $p = $mjdQ - $mjd0 - 1;

        // Fix for values within |n| of lower bound
        if ($p < static::INTERP_C && $p > -static::INTERP_C) {
            $p = static::INTERP_C;
        }

        // Compile dataset
        $ds = [];
        for ($i = $p - static::INTERP_C; $i < $p + static::INTERP_C; $i++) {
            $file->seek($i);
            $line = $file->getCurrentLine();

            // Parse data from line
            $mjd = substr($line, 7, 8);
            $xf  = substr($line, 136, 9);
            $xp  = substr($line, 18, 9);

            // Use final value first, if not present use prediction
            $x = trim($xf) ? $xf : $xp;

            // Check if no dut1 data, error
            if (trim($x) == '') {
                return false;
            }

            // Add the data
            $ds[$i - $p + static::INTERP_C]['x'] = (float)$mjd;
            $ds[$i - $p + static::INTERP_C]['y'] = (float)$x;
        }

        // Interpolate pole x
        return $this->lagrangeInterp($mjdQ, $ds);
    }
public function x()
    {
        // Load file
        $file = new \SplFileObject($this->storage('finals.all'));

        // Get instance MJD, and MJD at line 0
        $mjdQ = $this->mjd;
        $mjd0 = (int)substr($file->getCurrentLine(), 7, 8);

        // Check for requested MJD before first date
        if ($mjdQ < $mjd0) {
            return false;
        }

        // Determine nearest center pointer
        $p = $mjdQ - $mjd0 - 1;

        // Fix for values within |n| of lower bound
        if ($p < static::INTERP_C && $p > -static::INTERP_C) {
            $p = static::INTERP_C;
        }

        // Compile dataset
        $ds = [];
        for ($i = $p - static::INTERP_C; $i < $p + static::INTERP_C; $i++) {
            $file->seek($i);
            $line = $file->getCurrentLine();

            // Parse data from line
            $mjd = substr($line, 7, 8);
            $xf  = substr($line, 136, 9);
            $xp  = substr($line, 18, 9);

            // Use final value first, if not present use prediction
            $x = trim($xf) ? $xf : $xp;

            // Check if no dut1 data, error
            if (trim($x) == '') {
                return false;
            }

            // Add the data
            $ds[$i - $p + static::INTERP_C]['x'] = (float)$mjd;
            $ds[$i - $p + static::INTERP_C]['y'] = (float)$x;
        }

        // Interpolate pole x
        return $this->lagrangeInterp($mjdQ, $ds);
    }
public function x ( ) { // Load file $ file = new \ SplFileObject ( $ this -> storage ( 'finals.all' ) ) ; // Get instance MJD, and MJD at line 0 $ mjdQ = $ this -> mjd ; $ mjd0 = ( int ) substr ( $ file -> getCurrentLine ( ) , 7 , 8 ) ; // Check for requested MJD before first date if ( $ mjdQ < $ mjd0 ) { return false ; } // Determine nearest center pointer $ p = $ mjdQ - $ mjd0 - 1 ; // Fix for values within |n| of lower bound if ( $ p < static :: INTERP_C && $ p > - static :: INTERP_C ) { $ p = static :: INTERP_C ; } // Compile dataset $ ds = [ ] ; for ( $ i = $ p - static :: INTERP_C ; $ i < $ p + static :: INTERP_C ; $ i ++ ) { $ file -> seek ( $ i ) ; $ line = $ file -> getCurrentLine ( ) ; // Parse data from line $ mjd = substr ( $ line , 7 , 8 ) ; $ xf = substr ( $ line , 136 , 9 ) ; $ xp = substr ( $ line , 18 , 9 ) ; // Use final value first, if not present use prediction $ x = trim ( $ xf ) ? $ xf : $ xp ; // Check if no dut1 data, error if ( trim ( $ x ) == '' ) { return false ; } // Add the data $ ds [ $ i - $ p + static :: INTERP_C ] [ 'x' ] = ( float ) $ mjd ; $ ds [ $ i - $ p + static :: INTERP_C ] [ 'y' ] = ( float ) $ x ; } // Interpolate pole x return $ this -> lagrangeInterp ( $ mjdQ , $ ds ) ; }
Interpolates the celestial pole offset value of x in seconds of arc.

@return float|boolean Returns false on error.
Interpolates the celestial pole offset value of x in seconds of arc .