[PATCH] Add two new libraries to requirement list (deb)

Linus Torvalds torvalds at linux-foundation.org
Thu Jun 11 13:52:02 PDT 2015


On Thu, Jun 11, 2015 at 11:53 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> QtPositioning is new - I use that to quickly calculate distances between
> GPS locations.

Umm. Is that the only thing you use it for?

Because if it is, it's kind of wasteful.

The thing is, you only care about distances when they are near each
other, at which point the surface of the earth can pretty much be
considered flat.

Which means that you can just calculate the distance in the
north-south direction, which is trivial:

  earthradius * (difference in latitude in radians)

and the distance in east-west direction:

  earthradius * (difference in longitude in radians) * cos(latitude)

and then - because you can approximate all relevant distances as being
euclidian - you just get the usual d = sqrt(x*x+y*y) and you're done.

No silly new libraries needed.

Now, if we care about distances on a bigger scale, that would be
different. But I guess the "distance" you are calculating is the one
where you then compare it to "20m or less"?

Yeah, the earth really *is* flat at those kinds of scales. Unless you
want to take wave height etc into account.

               Linus


More information about the subsurface mailing list