Accuracy – a 2025 update.
The conversion of latitude and longitude to ordnance survey references is complex if great accuracy is required.
The code to convert latitude and longitude to ordnance survey references was originally written in the early 1990s. It used a Molodensky transformation to convert from the WGS84 grid to OS1936, and code published by my late colleague, Dr Derek Maling (see SBN 540 00974 1) to convert that to OS references. At the time there were no published reference points to check the routines but the conversions did match my Garmin receiver with a discrepancy of no more than a metre. GPS references had very limited accuracy due to selective availability anyway and the stability of paper maps was always a limitation.
On 1st May 2000 selective availability was turned off, but consumer GPS devices still produced errors of several metres.
Even then the code was fine for my hiking use as any errors in the code would be masked by other variances. Typically, a track log with WGS84 values would be downloaded, converted to OS references to check against a map, then converted back to plot on Google Earth or downloaded to a GPS receiver. Any errors would be reversed!
In 2024 it was pointed out that Ordnance Survey had published code to do these conversions, but they use a more sophisticated algorithm for WGS84 to OS1936 conversions – a Helmert transformation and their own code for OS1936 to OS reference. Ordnance Survey caution that even the Helmert transformation may produce errors of up to about 3.5m. OS also made available a batch convertor of much higher accuracy which includes 1.6 million corrections to cater for factors such as gravitational anomalies near mountains and continental drift.
See: https://www.ordnancesurvey.co.uk/gps/transformation/
https://www.ordnancesurvey.co.uk/geodesy-positioning/coordinate-transformations/tool?tab=batch
and page 39 of https://www.ordnancesurvey.co.uk/documents/resources/guide-coordinate-systems-great-britain.pdf
Results with the batch method diverged from my original Molodensky routines by 1.4 metres on Scafell Pike, 4 to 7 metres across most of England and Wales, and 14 metres in Shetland.
The code has now been updated to use Helmert by default rather than Molodensky. For the purist wishing to compare methods the osref, latitude and longitude routines all have an extra optional parameter added to switch Molodensky vs Helmert, Maling vs OSref and the rounding algorithm but I caution that matching to the nearest metre is a fraught exercise resulting in sleep-less nights!
I stress though that ANY of these methods will be fine for the original purposes of finding yourself on a map with consumer grade GPS.
I acknowledge and thank Ordnance Survey, both for their code which I have plundered and for their customer service which has been most helpful. I also wish to thank Murray Fullerton for his invaluable assistance and encouragement in both understanding the issues and for his thorough testing.
Phil Brady 20th May 2025.