This is taken from wikipedia... Not sure if there are more precises calculations of Earth radius out there.

In addition, I don't like too much the ".0" to avoid integer division in the place where this is used. Any prettier alternative in C/C++?