Skip to content

Notes: Distance Calculations (via John Rutherford)

Greg Malcolm edited this page Apr 10, 2016 · 1 revision

Extract from discord conversation:

John Rutherford #117-Today at 4:34 AM

Btw. @Marlon Blake (EDMaterializer) if you are interested in the distance calculation it basically uses spherical coordinates by looking up the radius og the planet, only it converts long and lat into spherical coordinates.

For the estimate of the error it uses Gauss' error propagation law on this formula based on the resolution of the long lat coordinates.

That formula was hell to calculate!

Had to do it 4 times to check that I had done the math right. So many partial derivatives!

The spherical coordinates is a way of calculating arc length yes so this is a very good approximation provided the planet is not glados potato shaped. When I get to work Ill write you a formula for this if you want so you dont have to decrypt all the spreadsheet code.

Here ya go!

https://drive.google.com/file/d/0B_uPoL_ylM-Ec0t5MWwtaUcwUjg/view?usp=sharing

Even included a short derivation. The formula you need is Eq. (5).