First attempt at gravity calculator