From e5f4697f91550d80b1587fe38fcab8f9a27f7950 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 24 Jun 2015 22:38:44 -0700 Subject: Rewrite GPS fix matching code for imports from our webservice The longer I stared at the existing code the less it made sense. So instead I rewrote it in a way that seems logical to me. And added a boatload of debugging output (which needs to be removed, of course). I tested this against more than a hundred dives and it seemed to always pick the right fix. Signed-off-by: Dirk Hohndel --- dive.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dive.h') diff --git a/dive.h b/dive.h index 36d9a1200..f07c9d9b2 100644 --- a/dive.h +++ b/dive.h @@ -635,6 +635,7 @@ extern const char *get_error_string(void); extern struct dive *find_dive_including(timestamp_t when); extern bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset); +extern bool time_during_dive_with_offset(struct dive *dive, timestamp_t when, timestamp_t offset); struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset); /* Check if two dive computer entries are the exact same dive (-1=no/0=maybe/1=yes) */ -- cgit v1.2.3-70-g09d2