# Include "stdafx. H "Double dhhd (Double X) // degrees radians {double XX, X1, Y; Double Z, PI; double out; Pi = 3.1415926535897932; xx = X; x1 = (XX); y = (xx-x1) * 100.0); Z = (xx-x1); Z = z * 100.0-y; Z = z * 100.0; xx = (X1 + Y/60.0 + z/3600.0) * PI/180.0; out = xx; Return out;} double hdhd (Double X) // radians {double XX, X1, Y; Double Z, PI; double out; Pi = 3.1415926535897932; xx = x; xx = XX * 180.0/PI; x1 = (XX); y = (xx-x1) * 60.0); Z = (xx-x1-y/60.0) * 3600.0; xx = X1 + Y/100.0 + z/10000.0; out = xx; Return out;} double gpsdhhd (Double X) // degrees radians of GPS: {double xx1, xx2; double out; double PI; Pi = 3.1415926535897932; xx1 = int (X)/100; xx2 = x-xx1 * 100; out = (xx1 + xx2/60 .) * PI/180 .; return out;} int _ tmain (INT argc, _ tchar * argv []) {double XX, lx, RX; xx = dhhd (3959.87300); RX = gpsdhhd (11620.5572 ); lx = hdhd (RX );}