1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Function L93_TO_WGS84(X_L93 As Double, Y_L93 As Double) As Object
Dim c As Double = 11754255.426096 'constante de la projection
Dim e As Double = 0.0818191910428158 'première excentricité de l'ellipsoïde
Dim n As Double = 0.725607765053267 'exposant de la projection
Dim xs As Double = 700000 'coordonnées en projection du pole
Dim ys As Double = 12655612.049876 'coordonnées en projection du pole
Dim a As Double = (Math.Log(c / (Math.Sqrt(Math.Pow((X_L93 - xs), 2) + Math.Pow((Y_L93 - ys), 2)))) / n)
Dim LONGITUDE As Double = ((Math.Atan(-(X_L93 - xs) / (Y_L93 - ys))) / n + 3 / 180 * Math.PI) / Math.PI * 180
Dim LATITUDE As Double = Math.Asin(Math.Tanh((Math.Log(c / Math.Sqrt(Math.Pow((X_L93 - xs), 2) + Math.Pow((Y_L93 - ys), 2))) / n) + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * (Math.Tanh(a + e * ATanH(e * Math.Sin(1)))))))))))))))))))))) / Math.PI * 180
Return {LATITUDE, LONGITUDE}
End Function |
Partager