Subsurface isn't matching my last 4 dives from the service

Marc MERLIN marc at merlins.org
Tue Jun 24 18:37:45 PDT 2014


On Mon, Jun 23, 2014 at 10:33:13PM +0200, Salvador Cuñat wrote:
> Good Night Marc.
> 
> If you are on linux, would you be so kind to try the attached patch with
> your dives?

Yes, I'm on linux and I applied your patch to TOT.
 
> I thik the problem arises from the fact that in
> function merge_locations_into_dives(), we test if a fix is automatic, and
> in this case we apply  find_dive_including(gpsfix->when).  This function
> *only* returns a dive if there is a position fix during the dive time, in
> other case it simply fails (quiet and silently).  Actually we weren't
> testing such a failure so for automatic fixes out of the diving time we
> never captured the dive.

Thanks for your patch.
It helps as in my dives get tagged, but they mostly get tagged
incorrectly.

<dive number='376' date='2014-06-21' time='09:46:06' duration='52:46 min'>
  <location gps='32.762200 -117.237000'>San Diego Kelp</location>

<dive number='377' date='2014-06-21' time='11:42:54' duration='51:12 min'>
  <location gps='32.762100 -117.236000'>San Diego Kelp</location>

<dive number='378' date='2014-06-21' time='14:56:55' duration='37:59 min'>
  <location gps='32.760500 -117.189000'>San Diego Yukon</location>

<dive number='379' date='2014-06-21' time='16:45:07' duration='47:41 min'>
  <location gps='32.767200 -117.277000'>San Diego Ruby</location>

The last dive (379) shows a proper location.

378 is the most wrong. I happened between these two points:
{"name":"Auto-created dive", "latitude":"32.762", "longitude":"-117.236", "date":"2014-06-21", "time":"13:54:00"},
{"name":"Auto-created dive", "latitude":"32.7798", "longitude":"-117.283", "date":"2014-06-21", "time":"14:54:00"},

Note longitude -117.189 is wway off (inland)
Turns out it matched against my last point way later:
{"name":"Auto-created dive", "latitude":"32.7605", "longitude":"-117.189", "date":"2014-06-21", "time":"20:27:00"},
(time is way off)

The first 2 dives (376/377)  also have a wrong longitude matching
{"name":"Auto-created dive", "latitude":"32.7622", "longitude":"-117.237", "date":"2014-06-21", "time":"07:41:00"},
{"name":"Auto-created dive", "latitude":"32.7621", "longitude":"-117.236", "date":"2014-06-21", "time":"08:24:00"},

When really they should match these points:
{"name":"Auto-created dive", "latitude":"32.7091", "longitude":"-117.271", "date":"2014-06-21", "time":"09:41:00"},
{"name":"Auto-created dive", "latitude":"32.7092", "longitude":"-117.271", "date":"2014-06-21", "time":"10:42:00"},
{"name":"Auto-created dive", "latitude":"32.6965", "longitude":"-117.274", "date":"2014-06-21", "time":"11:12:00"},
{"name":"Auto-created dive", "latitude":"32.6927", "longitude":"-117.268", "date":"2014-06-21", "time":"11:42:00"},
{"name":"Auto-created dive", "latitude":"32.6926", "longitude":"-117.268", "date":"2014-06-21", "time":"12:42:00"},

Any ideas?

Also, if I feed better points via a GPX track, will they override the
bad points?

Oh, and as a wishlist for later:
1) I'd love to be able to just feed a GPX track to subsurface without
having to copy to android, import, upload and download on subsurface

2) even better, it should be able to use the trackpoints in the GPX file
to get the nearest points (right now, it only uses waypoints if I took
any, and ignores GPX points).
http://www.carto.net/projects/photoTools/gpsPhoto/
and
http://www.sno.phy.queensu.ca/~phil/exiftool/
both have code that will find the nearest GPS location in a GPX track
based on time.

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901


More information about the subsurface mailing list