How to Measure the Distance to the Moon

Hypatia Alexandria
13 min readSep 24, 2018

--

The Moon shot with a 300mm lens and a Canon 350D crop-sensor DSLR. Cropped 2x. Credit: Demeter Alexandria CC-BY 4.0

The night sky is captivating. Barring light pollution and bad weather, our little window to the universe offers stunning sights. From the ethereal glow of bright nebulae to the dark dust lanes in the Milky Way, space awakens something primordial in us. Everyone remembers their first time seeing the Moon or Saturn through a telescope.

Despite the ever-present romance of space, there is a seeming detachment from the general public and astronomers. Though there have been numerous contributions to astronomy by citizen scientists, many people believe understanding the night sky requires a degree to do. Or worse still, there is an alarming amount of individuals believe that it is all somehow part of a massive conspiracy to hide aliens or the shape of the Earth.

What many people don’t realize is how accessible astronomy is to the average person. Not just observing or photographing, but also measuring. It is in fact more than possible to measure the cosmos from your backyard! Even measurements of exoplanets and distant galaxies are within the grasp of the amateur. But perhaps it would be best to start off with something simpler before getting carried away…

Our nearest celestial neighbor, the Moon, makes an excellent first target. The Moon has been studied since antiquity, the first estimate of its distance made by Greek astronomer Hipparchus in the 2nd century BCE. The method we’ll be using is actually quite similar to what Hipparchus used, but with the advantages of modern tools and that it doesn’t require an eclipse.

The Experiment

Materials Required:

* An inclinometer or similar angle measuring device
* A DSLR Camera or any camera that allows for long exposures
* A lens that can show the Moon with modest detail while also showing the surrounding star-field. A 75–300mm zoom lens is perfect for this
* A tripod to mount the camera on
* A shutter release cable to take long exposures without disturbing the camera
* A friend with a similar or identical setup
* Several hundred miles between you and said friend.
* Astronomy software such as the free program Stellarium
* Image processing software such as Photoshop or GIMP

Introduction to Parallax

Stick out your finger, now close one eye, and then the other. Notice how your finger appears to move between the two viewpoints? This is parallax. Parallax is the apparent displacement of an object when viewed along two different lines of sight. It’s important to our experiment because by measuring the amount of parallax an object displays, one can find its distance via trigonometry. Parallax is often used by astronomers to measure the distance to nearby stars, and was used by early astronomers to determine the distance to the planets and the Sun. In this experiment we’ll be measuring the Moon’s parallax in order to determine its distance.

An example of Lunar parallax. (Not to scale)

The Observation

Pick a night when the moon is visible to both you and your friend, preferably one where the moon is near a bright star. This can be planned in advance using astronomy programs like Stellarium and websites like CalSky.

Ensure you have everything set up and focused at least fifteen minutes before the the observation. Punctuality isn’t crucial to this experiment but it is worth practicing.

Ensure you have reliable communication with your partner in the experiment. The synchronization of the photos you will be taking is crucial as the Moon is not a static object and has its own motion besides its apparent motion caused by Earth’s rotation.

Have the camera set on a remote shutter so you don’t bump the camera while it is shooting.

Each synchronized shot should be long enough in exposure to show your target star, but short enough to show a sharply defined terminator on the Moon. This will be important for image alignment later.

Make sure to also measure the elevation angle of the Moon from both locations using your inclinometer. This will be important later. You can find a guide to making a basic inclinometer here. Or you can use a smartphone app such as Theodolite (iOS) or Dioptra (Android).

This essentially ends the main bulk of observing, though it is wise to take multiple shots and then discard the bad ones (i.e an airplane passes through the frame or wind shakes the camera), that way only the best data is selected.

As a final part to your observing session take a long exposure photo of the night sky after the Moon has drifted out of frame. Make sure to not change the focus or the zoom of your lens. This star field image will be useful in calculating the scale of your image, which will be important for measuring angles later.

The following measurements will be taken from images taken by the Kerbal Space Program forum user “Cubinator” in Minneapolis, MN and myself in Santa Fe, NM on 9/15/18 at 1:51 UTC. Major thanks to Cubinator for being my partner in this observation!

Image Analysis

Now for the actual measurements. Open yours and your partners’ images in the image editor of your choice. If you shot RAW, now would be the time to open your image in the raw converter and apply any lens and noise corrections. If you used a telescope or didn’t shoot RAW, ignore this.

Once your images are open, layer one on top of the other and align the two. This may require some rotation and scaling depending on the difference in equipment used to take the images. Use the “difference” blending mode on the top layer so you can align it with the bottom to the nearest pixel. Some difference is fine but try to get it as close as possible. A great point to align both images with is the Lunar terminator. Once your images are aligned any parallactic displacements should show up as a displacement of your target star.

Parallax displacement of the Moon relative to the star Theta Lyrae. Images have been brightened to better show the star. Credit: Demeter Alexandria, Kerbal Space Program forum user “Cubinator”

Now that you have your images aligned, you can now begin to accurately measure the Moon’s parallax. Use the ruler tool in your image editing software of choice to measure the apparent displacement of your target star in your moon-aligned image. Try to be as accurate as possible when making this measurement, record to the nearest hundredth of a pixel. Alternatively, if there are multiple stars apparent in both images, you can choose to align your images on the stars instead and measure the displacement of the center of the Moon’s disc. Both should net similar results.

Measurement of the parallax displacement of the Moon relative to the star, Theta Lyrae. My partner’s image has been overlaid on mine at 50% opacity. Images aligned using the surface features on the Moon. Theta Lyrae appears as a brightish slpotch inside each cross-hair. Credit: Demeter Alexandria, KSP Forum user Cubinator.

Pixels are arbitrary units, so a parallax measurement in them isn’t exactly useful. What we need to do now is to find the pixel scale of your image. This is where those star field images come into play. Find your best one and (if your shot in RAW) apply the same lens corrections as you did your moon image. Save this image as a high-quality JPEG. We are now going to use a technique called plate-solving to find the scale of the image. Plate solving compares the stars in your image to a database of stars to correctly identify the celestial coordinates and scale of your image. We will use the online plate solver Astrometry.net to find the scale of our image. It is possible to do this manually using star charts, but using a computer is both faster and more accurate.

An image solved by Astrometry.net. My image ended up having a pixel scale of 4.55 arcseconds per pixel.

Now that we know the pixel scale, we can finally begin to do some math.

Preliminary Calculations

From here on out you’re going to need to know some trigonometry. If you’re math averse, you can use the spreadsheet provided at the end of this article instead. To find the distance to the Moon, we need two values, the parallax (angle p in fig. 1), and the separation between the observers aka the baseline (line AB in fig. 1).

Figure 1. (Not to Scale)

To find the parallax angle, take your value for displacement in pixels and multiply it by your image’s pixel scale. This should give you your parallax in arcseconds. For me an image scale of 4.55 arcseconds per pixel and a measured displacement of 62.3 pixels results in a parallax angle of ~283.6 arcseconds. To convert arcseconds to degrees divide by 60 twice.

To find the baseline requires some trigonometry. The Earth is spherical, so it’s not enough to measure distance in Google Earth and call it done. We need to find the direct distance through the Earth so that our baseline is a straight line rather than an arc. To do this we need to know the Great Circle distance (The distance Google Earth spits out) and the radius of the Earth. The Earth isn’t a perfect sphere, but the mean radius of 6,371 kilometers will do.

We’ll first need to find the angle between points A and B. Call it angle “θ”. Draw some imaginary lines from the center of the Earth to points A and B. These lines are one Earth radius long and angle θ is between them. θ can be found by dividing the arc length (our great circle distance) by the radius of the Earth. The resulting value is in radians. We know that the angles in a triangle add up to π radians and since two legs of the triangle (the two radii) are the same, then the remaining two angles are the same. The other two angles can be found by subtracting angle θ from π and dividing by two. The result is in radians.

Figure 2. Direct (chord) distance between two points on Earth.

Now that we have all three angles of the triangle and the lengths of two legs, the direct distance between A and B can be found using the law of sines. The law of sines tells us that the sine of angle “α” over length “r” is equal to the sine of angle “θ” over length “x”, some rearranging later and you can solve for the length of “x”, which is the direct distance between points A and B. There was a great circle distance of 1511.21 kilometers between me and my partner, which translates to a direct distance of 1507.67 kilometers between us. With that out of the way we can finally measure the distance to the Moon.

Measuring Lunar Distance & Sources of Error

So we now know the parallax of the Moon and also the length of our baseline. We finally have what we need to measure the distance to the Moon. If we make the simplifying assumption the triangle ABM (Figure 1.) is isosceles, than the equation to find distance is simply:

Figure 3.

For me, the length of AB was 1507.67 kilometers and the parallax was 283.6 arcseconds (0.0787 degrees, 0.00137 radians). If we plug those numbers in to the equation in figure 3, the resulting distance to the Moon is:

1,096,536 kilometers

Something went wrong. We’ve somehow come up with a distance that’s 285% larger than the commonly accepted value. Proof of conspiracy? Shoddy math? Poor observing? The answer lies in the assumption we made in Figure 3 and the position of the Moon above the horizon. My partner and I observed the Moon in an early phase. This means the Moon was already setting by the time our images were taken! If you visualize this, this puts the Moon at a highly oblique angle to us, and makes triangle ABM a very scalene triangle, not isosceles like we assumed. What this means is our baseline distance was significantly larger than our angle of parallax, and approximating with an isosceles triangle only works well when the baseline distance is very close to the angle of parallax, leading to the skewed result. What we’ll have to do is solve the scalene triangle directly, and if you measured the Moon’s elevation angle during your observation, you have all you need to accurately calculate the Moon’s distance.

To solve a scalene triangle you need knowledge of three elements, and one of them needs to be a side. Thankfully, we know a side of the triangle, our baseline AB, and an angle, the Moon’s parallax. Two down, one to go. This is where our measurement of the Moon’s elevation angle, and the angle “ θ” (Figure 2.) we calculated earlier comes in.

Figure 4. (Not to Scale) The dashed line represents the horizon for the observer at A.

Angle γ is the elevation angle of the Moon in radians above the horizon from point A. Angle β can be found via a geometry rule that says angle β is half of angle θ. The summation of angle γ and angle β gives us the angle at A, angle BAM in figure 4.

With angle BAM known, we’ve now effectively solved the entire triangle. Since all angles in a triangle add up to π radians, angle ABM is simply π minus angle BAM plus our parallax angle p. With all angles known the distance from point A to point M (the Moon) is thus:

Figure 5.

And the distance from point B to point M is:

Figure 6.

Be sure to convert your parallax angle to radians if you haven’t already. My partner at Point A measured a Moon elevation angle of 14 degrees, or 0.244 radians. Combining with angle β gives us a value of 0.362 radians for angle BAM and thus a value of 2.77 radians for angle ABM. With a baseline of 1507.67 kilometers and a parallax of 0.00137 radians, the distance of the Moon from point A works out to be:

390,775.4 kilometers

That’s not only acceptable, that’s right on the mark. The astronomy app Stellarium gave a lunar distance from point A at the time of the observation of 389,128.6 kilometers. An error of only 0.42%! Using the equation in figure 6, the distance of the Moon from point B works out to be:

389,366.3 kilometers

Stellarium gives a value of Lunar distance of 387,716.6 kilometers from point B at the time of the observation. So again, dead on the mark with a percent error of only 0.42%!

Hipparchus would be proud.

It should be noted that what we have just measured is the topocentric lunar distance, the distance from the Moon to the observer. To get the geocentric lunar distance, the distance from the Moon to the center of the Earth, requires some extra number crunching and will be left as an exercise for the reader.

Bonus Project: Measure the Diameter of the Moon

Now that we know the Moon’s distance, figuring out its size is relatively straightforward. Using the same images from your parallax experiment, measure the Moon’s diameter in pixels. Multiply this value by your pixel scale to get the Moon’s angular diameter in arcseconds. Divide by 60 twice to get the value in degrees.

Measurement of the Moon’s angular diameter in pixels using the “horns” of the crescent Moon as endpoints. Credit: Demeter Alexandria

Now that you know the Moon’s angular diameter and distance you can find the Moon’s true diameter using the equation in figure 7. (Alternatively you can use the angular size calculator here: https://www.1728.org/angsize.htm)

Figure 7.

Make sure to make the appropriate conversions if your calculator uses radians. For the distance value you can either use the distance you calculated or the true distance given by your astronomy software. For me I measured the Moon’s distance to be 389,366.3 kilometers. It measured 404.57 pixels across in my image which had a pixel scale of 4.55 arcseconds per pixel. This gives the Moon an angular diameter of 1840.79 arcseconds. (0.51 degrees, 0.0089 radians.) If we plug those values in to the equation in figure 7, the Moon’s diameter works out to be:

3,474.89 kilometers

According to the Moon Fact Sheet at NASA.gov, the Moon has a mean diameter of 3,474.8 kilometers. Compared to our value, there’s almost no discrepancy with a percent error of 0.0026%! Bullseye.

Conclusion

To conclude, you don’t need to be a scientist to measure the cosmos. You don’t even need that expensive of gear. Hipparchus and Tycho measured the Moon’s distance by eye and nothing more! Attached below is a spreadsheet that will hopefully make people more willing to carry out experiments such as this. It will do all the math for you given a few measurements. If you do end up doing your own parallax measurement, please don’t be afraid to contact me and let me know! And if I fudged up any math, especially contact me so I can fix it right away! This is hopefully the first in a series of many science articles that explain how you can measure the cosmos from down here on Earth. Is this a good first impression? Give my article a clap or two if you thought so!

Moon Parallax Spreadsheet

Attached below is the spreadsheet I used to make all my calculations. Hopefully, it’s readable. If you have any questions or critiques about it, don’t hesitate to write to me. I’m open to feedback.

Acknowledgements:

In addition to thanking KSP forum user Cubinator for his participation in this experiment, I would also like to thank Twitter users @keigh_see, @hugh_bothwell, @badibulgator, @becauseofnow and @doctorbuttons for error checking my math and giving me general feedback. This article would not be as free of bias or error without them. I’d also like to acknowledge the following resources for being incredibly useful:

Buchheim, Robert K. Astronomical Discoveries You Can Make, Too! Replicating the Work of the Great Observers. Springer International Publishing, 2015. Chapter 2, Project 17

Cenadelli, Davide, et al. “Geometry Can Take You to the Moon.” Science in School, www.scienceinschool.org/content/geometry-can-take-you-moon.

Freeman, Lanier. “Converting the Great Circle Distance to Direct Distance between Two Points on Earth?” Mathematics Stack Exchange, math.stackexchange.com/questions/1799528/converting-the-great-circle-distance-to-direct-distance-between-two-points-on-ea.

Wright, Ernie. “Lunar Parallax.” Lunar Parallax, www.etwright.org/astro/moonpar.html.

“Instructions for Lunar Parallax Challenge — Sun-Earth Day.” Sun Earth Days, sunearthday.nasa.gov/2008eclipse/materials/LunarParallaxChallenge.pdf. pg. 4–5 “Sources of Error”

--

--

Hypatia Alexandria

Photographer and image processor. Interested in learning about the world. Nonbinary and proud. pronouns: they/them or she/her