Function Repository Resource:

DistanceFromEarthCenter

Source Notebook

Compute the distance of a position on Earth's surface from the center of Earth

Contributed by: Peter Cullen Burbery

ResourceFunction["DistanceFromEarthCenter"][position]

computes the distance from the center of Earth for position on Earth’s surface.

ResourceFunction["DistanceFromEarthCenter"][]

computes the distance of your location from the center of Earth.

Examples

Basic Examples

Find the distance of your location from the center of the Earth:

In[1]:=
ResourceFunction["DistanceFromEarthCenter"][]
Out[1]=

See how fast would it take light to travel this distance:

In[2]:=
ResourceFunction["DistanceFromEarthCenter"][]/
 Quantity["SpeedOfLight"] // UnitSimplify
Out[2]=

Find the distance of the Empire State Building from the Earth's center:

In[3]:=
ResourceFunction["DistanceFromEarthCenter"][
 Entity["Building", "EmpireStateBuilding::h583b"]]
Out[3]=

Publisher

Peter Burbery

Version History

  • 1.0.0 – 29 August 2022

Related Resources

License Information