Mathematical facets of Euler’s astronomical works