Theoretical and applied celestial mechanics