GPS degrees, radians, and degrees Conversion

Source: Internet
Author: User
# 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 );}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.