Hi,
After seeing a discussion a while back about javascript and converting
OSGRs to latitude and longitude I decided to convert some of the Python
code I was using.
Here is my javascript GeoPosition class which will allow to convert
between OSGR and WGS84.
http://ccgi.arutherford.plus.com/code/javascript/geoposition/
For example
var testZone = "SP";
var testEasting = 8721;
var testNorthing = 91231;
// Create object
var position = new GeoPosition();
// Convert test point to lat and long. The converted values are
// accesses through position.latitude and position.longitude
position.osgbToLL(testZone, testEasting, testNorthing);
// As a sanity check convert back to OSGR and compare. The osgr values
// accessed through
// position.osgbGridSquare,
// position.osgbEasting and position.osgbNorthing
position.llToOSGB(position.latitude, position.longitude);
I hope someone finds this useful.
Cheers
Al.