Dedicated to bringing you the best information on successfully starting, marketing and running a business online and off.

Converting cartesian coordinates to geographical gps

Hi everybody,
I need to convert cartesian coordinates to geographical gps. Knowing
X,Y coordinates how can I calculate Latitude and Longitude?

A friend of mine give me this formula:

/*gps coordinates of zero local point*/
X0POL = 38.4758676627; # 1° ZERO POINT POLAR
Y0POL = 15.9189614895; # 2° ZERO POINT POLAR

/*convert zero point from DD coordinate to DDM*/
B5 = (60 * X0POL) - (38 * 60) + 3800;#3828.5521 # 1° ZERO
POINT
B6 = (60 * Y0POL) - (15 * 60) + 1500;#1555.1377 # 2° ZERO POINT

G5 = 4.12841392; # TERRESTRIAL ROTATION
RADIANS DEGREE

COEFFX = 1849.94;
COEFFY = 1454.88;

VALORE1 = (X * SIN(G5) + B5 * COEFFX + Y * COS(G5)) / COEFFX;
VALORE2 = (VALORE1 * COEFFX * COT(G5) - Y * (SIN(G5) + COS(G5) * COT
(G5)) - B5 * COEFFX * COT(G5) + B6 * COEFFY) / COEFFY;

/*transform from DDM to DD*/
LatGPS = (VALORE1+38*60-3800)/60;
LongGPS = (VALORE2+15*60-1500)/60;

But he doesn't remember how he got COEFFX and COEFFY.
Using these formula the gps coordinates I get are enough precise, they
correspond "enough" to what they should be considering the position of
some points about which I know the correct Lat/Lon coordinates.

But I need a better precision, therefore I hope you can help me
finding some formulas to convert cartesian coordinates to geographical
gps.

Thank you very much in advance