On a voyage to St Helena in 1761 he successfully tested tables of the Moon’s position compiled by the German astronomer Johan Tobias Mayer (1723–62) for finding longitude at sea. When in 1765 he became the fifth Astronomer Royal, Maskelyne included tables of lunar positions for navigation in The Nautical Almanac, which he founded in 1766. He observed the 1769 transit of Venus and from it calculated the Sun’s distance to an accuracy of 1%. In 1774 he measured the deflection of a plumbline near the Scottish mountain Schiehallion, from which he calculated the Earth’s average density to be 4.7g/cm3, the first good approximation to the true value (5.52g/cm3).