# Algorithm for converting from projected coordinate system to geographic one using Helmert transformation

I have a data in projected coordinates system and I need to convert them to WGS84. I know the parameters of position vector transformation and I know the projection details of my projected coordinate system.

I think I need firstly transform my projected points to geographic one and secondly use Helmert transformation to transform between geographic coordinates.

I think I need to use my projection details for projected system to transform it into geographic, but I am completely helpless with it.

I am looking for algorithm, I mean some code or pseudo code, not for a software, since I wish to implement this later in javascript.

Here is what I've got.

If I may borrow Helmert transformation function from the accepted answer to this post (What is the process to calculate Helmert parameters?), my position vector details are:

``````#displacement in meters
c0 = c(485.000000,169.500000,483.800000)
#rotation in arcseconds
r=c(7.786000,4.398000,4.103000)
#scale in ppm
s=0.000000
``````

And my projected system details are:

S-JTSK_Krovak_East_North WKID: 5514 Authority: EPSG

Projection: Krovak False_Easting: 0.0 False_Northing: 0.0 Pseudo_Standard_Parallel_1: 78.5 Scale_Factor: 0.9999 Azimuth: 30.28813975277778 Longitude_Of_Center: 24.83333333333333 Latitude_Of_Center: 49.5 X_Scale: -1.0 Y_Scale: 1.0 XY_Plane_Rotation: 90.0 Linear Unit: Meter (1.0)

Geographic Coordinate System: GCS_S_JTSK Angular Unit: Degree (0.0174532925199433) Prime Meridian: Greenwich (0.0) Datum: D_S_JTSK
Spheroid: Bessel_1841 Semimajor Axis: 6377397.155 Semiminor Axis: 6356078.962818189 Inverse Flattening: 299.1528128

• The math for both is available in the IOGP (EPSG) Guidance Note 7-2. – mkennedy May 20 '16 at 17:10
• @mkennedy that material looks awesome, thank you for pointing me to this. – makak May 23 '16 at 4:31