Dynamics of celestial bodies