ported planetary_calculations