Posts Tagged ‘ GPS ’

Thank you Garmin!

I bought a brand new Edge 500 off of eBay last May.  It has been great, except the lap / reset button has been getting progressively harder and harder to press.  I’d press it and it wouldn’t register which sucked because in order to record a ride so that its data can be exported you have to press and hold the button for 3 seconds.  It finally got to the point where I was unable to record my last ride last week.

I was prepared to pay $89 in order to RMA my device because even if I wasn’t a few months past the end of the warranty period, since I bought it off eBay the warranty was never valid.  I called the RMA line and explained my problem.  The operator was nice enough to extend the warranty to me!  All I had to do was mail in my broken Edge and they sent me a refurbished model that is as good as a new unit.  Thanks Garmin!

Checking Distances in a Single Table

At work we have two identical GPS units.  One had to be sent in for service so we wanted to check to make sure it was back in working order.  We collected a series of points with both units.  I took the data collected and put it into a Postgres table; the table ended up with three fields:  set_id which identified the point as collected on each unit, unit_name to show which unit collected the point, and geom for the geometry of the point itself.  Here’s the query I came up with to compare the data:

SELECT DISTINCT a.set_id, ST_Distance(a.geom, b.geom) As dist
FROM test_pts As a JOIN test_pts As b USING (set_id)
WHERE a.unit_name <> b.unit_name

Too often I forget about self-joins.  They made this query quick to write and easy to understand.