Methods suggested in this, that and there all recommend the following:
$$x = R \cos(\theta) \cos(\phi)$$ $$y = R \cos(\theta) \sin(\phi)$$ $$z = R \sin(\theta),$$
where latitude is $\theta$, longitude is $\phi$ and the Earth's approximate radius is $R$ (6371km).
However, I am not sure why these equations are using $R$ rather than their documented form:
$$x = (N(\theta) + h) \cos(\theta) \cos(\phi)$$ $$y = (N(\theta) + h) \cos(\theta) \sin(\phi)$$ $$z = \left(\frac{b^2}{a^2} N(\theta) + h\right) \sin(\theta),$$
where altitude is $h$, semi-major axis is $a$, semi-minor axis is $b$ and the prime vertical radius of curvature is $N(\theta)$. Further, we can say:
$$N(\theta) = \frac{a}{\sqrt{1-{e^2}\sin^{2}(\theta)}}$$ and... $$e^2 = 1 - \frac{b^2}{a^2}$$ thus... $$z = (1 - e^2) (N(\theta) + h) \sin(\theta).$$
Now for my purposes, I am treating all points with an altitude of 1, so the $h$ can be eliminated. What I am not comprehending is how they are arriving at:
$$N(\theta) = R$$
and...
$$(1-e^2) * N(\theta) = R$$
Is it safe to use the radius of the Earth as an approximation or should I use the WGS84 constraints (semi-major and first eccentricity) in my computations?