Extract astronomical event computation into its own class.