## Re: GPS positions

From: Frank Bax PostgreSQL List - Novice Re: GPS positions 2010-05-22 11:04:05 BLU0-SMTP4251B901EC7E86D212F1C3ACE50@phx.gbl (view raw, whole thread or download thread mbox) 2010-05-22 01:19:15 from Frank Bax  2010-05-22 01:22:12 from Sean Davis   2010-05-22 03:55:40 from Mike Ellsworth    2010-05-22 09:49:49 from Jasen Betts     2010-05-22 11:04:05 from Frank Bax pgsql-novice
```Jasen Betts wrote:
> On 2010-05-22, Mike Ellsworth <younicycle(at)gmail(dot)com> wrote:
>> If you don't want to work with postgis, I think you could just use a bit of sqrt
>> using double precision - for a circle anyway.
>>
>> I did something similar for a simple target archery scoring example I
>> set up awhile ago.
>> http://www.younicycle.com/web/younicycle_com/xml-hr/ex_12_a.html
>>
>> believe this specific page works.
>> round(GREATEST(10.5 - sqrt((("xyarchery"."xx" - 200) ^ 2) +
>> (("xyarchery"."yy" - 200) ^ 2)) / 20, 0))
>> where pixels are being recorded & scored.
>
> you can't apply pythagoras's theorem to latt0tude,longitude
> coordinates and get a useful result unless the points are near the
> equator.
>
> By far the easiest solution is to us a package, like postgis, that was
> prepared by persons who know what they are doing.
>
> the same goes time arithmetic, where leap-years are just one of the
> pitfalls.

Thanks Sean Mike & Jasen.

Installing PostGIS is not possible at this time.

http://en.wikipedia.org/wiki/Geographical_distance
which mentions Pythagorean formula has an error of at least 30m for
distance of 20km in my area; this is close enough for my purposes.

If/when more accuracy is needed, I'll look into PostGIS.

Frank

```

### pgsql-novice by date

 Next: From: Nathaniel Trellice Date: 2010-05-22 11:45:31 Subject: Re: GPS positions Previous: From: Jasen Betts Date: 2010-05-22 10:00:52 Subject: Re: Transferring Data between databases