>The calculation in that article is in miles. What exactly has to be adjusted for km is not 100% clear.
For that one, I took 6371 for now but it came as a surprise that it ended up with an integer value. As, for the miles, to obtain the exact precision, we have a lot of decimals. Or, maybe 6371 was given as a reference and to obtain the exact precision, I would need to add some decimals.