Error in distance between points in spherical coordinates

388 Views Asked by At

I have two points with spherical coordinates: $a=(r_1,\theta_1,\phi_1)$ and $b=(r_2,\theta_2,\phi_2)$. The cartesian coordinates of the points are:

$$ (r_i \cos\theta_i \cos\phi_i, r_i \cos\theta_i \sin\phi_i, r_i\sin\theta_i);\;\;i=[1, 2]$$

so the distance between the two points is given by:

$$ d= \sqrt{r_1^2+r_2^2-2r_1r_2\left(\cos\theta_1\cos\theta_2\cos(\phi_1-\phi_2)+\sin\theta_1\sin\theta_2\right)}$$

as stated here.

I need to calculate the error associated with $d$, assuming that only the distances and not the angles have uncertainties assigned, that is: $r_i\pm \sigma_i$. I re-write $d$ as:

$$ d= \sqrt{r_1^2+r_2^2-2r_1r_2A}$$

and use the standard formula for obtaining $\sigma_d$:

$$\sigma_d = \sqrt{ \left(\frac{\partial d}{\partial {r_1} }\right)^2 \sigma_1^2 + \left(\frac{\partial d}{\partial {r_2} }\right)^2 \sigma_2^2}$$

assuming no covariances between $r_1, r_2$. I obtain the following relation:

$$\sigma_d = \frac{1}{d}\sqrt{ \left(r_1-r_2*A\right)^2 \sigma_1^2 + \left(r_2-r_1*A\right)^2 \sigma_2^2}$$

My question: is this final equation correct?