Sub Process_Globals
...
'Declare these constants as global variables
Dim DEG_TO_RADIANS = 0.017453292519943295769236907684886127134428718885417 As Double
Dim RAD_TO_DEGREES = 57.29577951308232087679815481410517033240547246656432 As Double
...
End Sub
Sub toDegrees(radians As Double) As Double
Return radians * RAD_TO_DEGREES
End Sub
Sub toRadians(degrees As Double) As Double
Return degrees * DEG_TO_RADIANS
End Sub
There is a mistake in your code. The Java code doesn't call Math.asin(n) (the arc-sine or inverse sine). It calls Math.sinh(n) (the hyperbolic sine). There's no built-in B4X function that performs the hyperbolic sine but you can easily build your own by appealing to the definition of the hyperbolic sine: https://en.wikipedia.org/wiki/Hyperbolic_function or using JavaObject to access Java's built-in hyperbolic sine function (you'll want to create-static a java.lang.Math object).
Thanks for all helpers... my mathematical and english knowledge in combination is not good enough to unterstand the meaning of hyberbolic, asin etc.
Maybe i can better explain what i want to do: i want to use this page: mapire.eu on android. In the past this page used simple long and lat values inside the url, so that i could use my own position to search the position on the page.
Now the changed to another coodinate system, now they are using openstreetmap instead of google maps and the coordinates are gone and the url is in this way: