public static function Pmpx($rc, $dc, $pr, $pd, $px, $rv, $pmt, array $pob,
          array &$pco) {

    /* Km/s to au/year */
    $VF = DAYSEC * DJM / DAU;

    /* Light time for 1 au, Julian years */
    $AULTY = AULT / DAYSEC / DJY;

    $i;
    $sr;
    $cr;
    $sd;
    $cd;
    $x;
    $y;
    $z;
    $p  = [];
    $dt;
    $pxr;
    $w;
    $pdz;
    $pm = [];

    /* Spherical coordinates to unit vector (and useful functions). */
    $sr   = sin($rc);
    $cr   = cos($rc);
    $sd   = sin($dc);
    $cd   = cos($dc);
    $p[0] = $x    = $cr * $cd;
    $p[1] = $y    = $sr * $cd;
    $p[2] = $z    = $sd;

    /* Proper motion time interval (y) including Roemer effect. */
    $dt = $pmt + IAU::Pdp($p, $pob) * $AULTY;

    /* Space motion (radians per year). */
    $pxr   = $px * DAS2R;
    $w     = $VF * $rv * $pxr;
    $pdz   = $pd * $z;
    $pm[0] = - $pr * $y - $pdz * $cr + $w * $x;
    $pm[1] = $pr * $x - $pdz * $sr + $w * $y;
    $pm[2] = $pd * $cd + $w * $z;

    /* Coordinate direction of star (unit vector, BCRS). */
    for ($i = 0; $i < 3; $i++) {
      $p[$i] += $dt * $pm[$i] - $pxr * $pob[$i];
    }
    IAU::Pn($p, $w, $pco);

    /* Finished. */
  }