Skip to content

Commit

Permalink
Fix toWGS84
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Jul 17, 2021
1 parent 6bd0a1b commit 1df79ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/uk/gov/dstl/geo/osgb/OSGB36.java
Expand Up @@ -51,14 +51,14 @@ public static double[] toWGS84(double lat, double lon) {
double[] cartesian =
fromLatLon(
new double[] {lat, lon, 0},
Constants.ELLIPSOID_GRS80_MAJORAXIS,
Constants.ELLIPSOID_GRS80_MINORAXIS);
Constants.ELLIPSOID_AIRY1830_MAJORAXIS,
Constants.ELLIPSOID_AIRY1830_MINORAXIS);
double[] transformed = helmertTransformation(cartesian, -tX, -tY, -tZ, -s, -rX, -rY, -rZ);
double[] ret =
toLatLon(
transformed,
Constants.ELLIPSOID_AIRY1830_MAJORAXIS,
Constants.ELLIPSOID_AIRY1830_MINORAXIS,
Constants.ELLIPSOID_GRS80_MAJORAXIS,
Constants.ELLIPSOID_GRS80_MINORAXIS,
0.00000001);

return new double[] {ret[0], ret[1]};
Expand Down

0 comments on commit 1df79ea

Please sign in to comment.