Seol mar théacs é seo: Analytical mechanics of space systems