http://www.perlmonks.org?node_id=1012338


in reply to Perl and Solving Trig/Converting GPS to x,y Cords

Pizentios:

It may not be quite that simple. Flat maps of spheres always have distortion. (Look up "spherical conformal mapping".) So circles on your map won't be the same as circles on the sphere. In addition, the type of projection used will affect the conversion of your planar coordinates to your spherical coordinates.

I'd suggest you find out what your error tolerances are, the largest distance you're going to be interested in, and what sorts of maps you'll be using.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: Perl and Solving Trig/Converting GPS to x,y Cords

Replies are listed 'Best First'.
Re^2: Perl and Solving Trig/Converting GPS to x,y Cords
by BrowserUk (Patriarch) on Jan 08, 2013 at 22:09 UTC

    The Earth is round, but very big.

    Between +70 and -70 degrees and distances under about 20 kilometers, bog standard 2D trig will produce results with errors less than 0.2%.

    Between +-50 degs, it is less that 0.1%


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      BrowserUk:

      That may be true for all the practical cases for the OP, but it's not generally true. A trivial example being several of the polar maps. In those cases, the equator would give terrible results, and the center pole would give similarly good results.

      For anyone interested, some really interesting stuff is at http://www.progonos.com/furuti/MapProj/Normal/TOC/cartTOC.html, especially the "Mathematics of Cartography" section.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        it's not generally true. A trivial example being several of the polar maps.

        How many people are plotting GPS locations inside the artic/antartic circles?

        Especially given that ionospheric signal path distortion renders GPS essentially unusable in those regions.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.