Approximately 2300 years ago, Aristarchus proposed a method for determining the relative distances of the sun and the moon in relation to the earth. Specifically, he asserted that when the moon is in its half-phase, a right triangle is formed between the Sun, the Moon, and the Earth. (This is quite true.)
From there, he determined that $\angle ESM = 3^{\circ}$, $\angle MES = 87^{\circ}$, and $\angle SME = 90^{\circ}$ and proceeded to calculate that the Sun is approximately 19 times farther away from the Earth than the Moon is. (Actually, a more precise value for $\angle ESM$ is $89^{\circ}50'$ which would put the Sun approximately 400 times farther away from the Earth than the Moon is.)
But my question is, what forms of trigonometry were available to Aristarchus to solve this problem, given that it was about this time that trigonometric methods were being developed for geometrical and astronomical applications? Also, does anyone know how Aristarchus came to discover that a right triangle exists between the Sun, Moon, and Earth when the moon is in half-phase?
Truly, today, a problem like this might appear in a pre-Calculus book as a homework exercise and is a straightforward computation with a calculator. But I would like to know how an ancient astronomer would have arrived at the answer. Thank you.