Grid coordinate calculator

calculates grid x, y coords