Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accuracy of Easting Northing to Lat Lng #7

Closed
stevegoddard opened this issue Jan 26, 2016 · 1 comment
Closed

Accuracy of Easting Northing to Lat Lng #7

stevegoddard opened this issue Jan 26, 2016 · 1 comment

Comments

@stevegoddard
Copy link
Contributor

With version 1, I could take an E/N, convert to Lat/Lng and plot on a Bing OS map with almost perfect accuarcy.

I have just moved to version 2 and points plotted appear to be 10-20m out. I'm plotting 1km grid squares which should line up perfectly with the blue OS grid lines (and did in version 1).

I.e.

Version 1.1.2

$var_grid_ref_osref = new OSRef($var_easting, $var_northing); 
$var_grid_ref_lat_lng = $var_grid_ref_osref->toLatLng();
$var_grid_ref_lat_lng->OSGB36ToWGS84();

"easting": ​322000, "northing": ​241000, "lat": ​52.06187, "lng": ​-3.13916
version1

Version 2.0.1

$var_grid_ref_osref = new OSRef($var_easting, $var_northing);
$var_grid_ref_lat_lng = $var_grid_ref_osref->toLatLng();
$var_grid_ref_lat_lng->toWGS84();

"easting": ​322000, "northing": ​241000, "lat": ​52.06193, "lng": ​-3.13935
version2

If I plot the points in ArcMap (without the toWGS84 conversion) they are perfect. So the issue seems to be with the toWGS84 function. To confirm this, I've checked and both version 1 and 2 return the same lat/lng values for this example if you take off the WGS84 conversion (52.06146,-3.13788). But after the OSGB36ToWGS84() in 1.2.1 or toWGS84() in 2.0.1 conversions I get different answers.

Is this an issue or am i doing something wrong?

Thanks
Steve

@dvdoug
Copy link
Owner

dvdoug commented Jan 27, 2016

Hmm, interesting. I'll take a look at the weekend

@dvdoug dvdoug closed this as completed in c8e95ab Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants