Use Redfearn's formulae to convert between latitude & longitude and grid coordinates and vice versa. Further detail and other calulators can be found on the ICSM website. If you find any issues, or re-use the code for your own projects, please take the time to send a note and let us know how it works for you. Python code is available on pypi, or via pip install redfearn. Source code is available from bitbucket with some documentation. PHP source code is available here.