[PATCH] Add two new libraries to requirement list (deb)
Dirk Hohndel
dirk at hohndel.org
Thu Jun 11 14:18:14 PDT 2015
On Thu, Jun 11, 2015 at 01:52:02PM -0700, Linus Torvalds wrote:
> 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?
Umm, right now, yet.
> 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.
Ok, so I'm lazy. What else is new.
> 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"?
Yes.
> Yeah, the earth really *is* flat at those kinds of scales. Unless you
> want to take wave height etc into account.
not really.
/C
More information about the subsurface
mailing list