# Perifocal coordinate system

The perifocal coordinate (PQW) system is a frame of reference for an orbit. The frame is centered at the focus of the orbit, i.e. the celestial body about which the orbit is centered. The unit vectors $\mathbf {\hat {p}}$ and $\mathbf {\hat {q}}$ lie in the plane of the orbit. $\mathbf {\hat {p}}$ is directed towards the periapsis of the orbit and $\mathbf {\hat {q}}$ has a true anomaly ($\theta$) of 90 degrees past the periapsis. The third unit vector $\mathbf {\hat {w}}$ is the angular momentum vector and is directed orthogonal to the orbital plane such that: $\mathbf {\hat {w}} =\mathbf {\hat {p}} \times \mathbf {\hat {q}}$
And, since $\mathbf {\hat {w}}$ is the unit vector in the direction of the angular momentum vector, it may also be expressed as: $\mathbf {\hat {w}} ={\frac {\mathbf {h} }{\|\mathbf {h} \|}}$ where h is the specific relative angular momentum.
The position and velocity vectors can be determined for any location of the orbit. The position vector, r, can be expressed as: $\mathbf {r} =r\cos \theta \mathbf {\hat {p}} +r\sin \theta \mathbf {\hat {q}}$ where $\theta$ is the true anomaly and the radius $r=\|\mathbf {r} \|$ may be calculated from the orbit equation.
The velocity vector, v, is found by taking the time derivative of the position vector: $\mathbf {v} =\mathbf {\dot {r}} =({\dot {r}}\cos \theta -r{\dot {\theta }}\sin \theta )\mathbf {\hat {p}} +({\dot {r}}\sin \theta +r{\dot {\theta }}\cos \theta )\mathbf {\hat {q}}$
A derivation from the orbit equation can be made to show that: ${\dot {r}}={\frac {\mu }{h}}e\sin \theta$ where $\mu$ is the gravitational parameter of the focus, h is the specific relative angular momentum of the orbital body, e is the eccentricity of the orbit, and $\theta$ is the true anomaly. ${\dot {r}}$ is the radial component of the velocity vector (pointing inward toward the focus) and $r{\dot {\theta }}$ is the tangential component of the velocity vector. By substituting the equations for ${\dot {r}}$ and $r{\dot {\theta }}$ into the velocity vector equation and simplifying, the final form of the velocity vector equation is obtained as: $\mathbf {v} ={\frac {\mu }{h}}\left[-\sin \theta \mathbf {\hat {p}} +(e+\cos \theta )\mathbf {\hat {q}} \right]$

## Conversion between coordinate systems

The perifocal coordinate system can also be defined using the orbital parameters inclination (i), right ascension of the ascending node ($\Omega$) and the argument of periapsis ($\omega$). The following equations convert from perifocal coordinates to equatorial coordinates and vice versa.

### Perifocal to equatorial

${\begin{bmatrix}x_{\text{equatorial}}\\y_{\text{equatorial}}\\z_{\text{equatorial}}\\\end{bmatrix}}={\begin{bmatrix}\cos \Omega \cos \omega -\sin \Omega \cos i\sin \omega &-\cos \Omega \sin \omega -\sin \Omega \cos i\cos \omega &\sin \Omega \sin i\\\sin \Omega \cos \omega +\cos \Omega \cos i\sin \omega &-\sin \Omega \sin \omega +\cos \Omega \cos i\cos \omega &-\cos \Omega \sin i\\\sin i\sin \omega &\sin i\cos \omega &\cos i\\\end{bmatrix}}{\begin{bmatrix}x_{\text{perifocal}}\\y_{\text{perifocal}}\\z_{\text{perifocal}}\\\end{bmatrix}}$
In most cases, $z_{\text{perifocal}}=0$.

### Equatorial to perifocal

${\begin{bmatrix}x_{\text{perifocal}}\\y_{\text{perifocal}}\\z_{\text{perifocal}}\\\end{bmatrix}}={\begin{bmatrix}\cos \Omega \cos \omega -\sin \Omega \cos i\sin \omega &\sin \Omega \cos \omega +\cos \Omega \cos i\sin \omega &\sin i\sin \omega \\-\cos \Omega \sin \omega -\sin \Omega \cos i\cos \omega &-\sin \Omega \sin \omega +\cos \Omega \cos i\cos \omega &\sin i\cos \omega \\\sin \Omega \sin i&-\cos \Omega \sin i&\cos i\\\end{bmatrix}}{\begin{bmatrix}x_{\text{equatorial}}\\y_{\text{equatorial}}\\z_{\text{equatorial}}\\\end{bmatrix}}$

## Applications

Perifocal reference frames are most commonly used with elliptical orbits for the reason that the $\mathbf {\hat {p}}$ coordinate must be aligned with the eccentricity vector. Circular orbits, having no eccentricity, give no means by which to orient the coordinate system about the focus.
The perifocal coordinate system may also be used as an inertial frame of reference because the axes do not rotate relative to the fixed stars. This allows the inertia of any orbital bodies within this frame of reference to be calculated. This is useful when attempting to solve problems like the two-body problem.