From bab7033ccba8840eb661feed0750e60404d06fc0 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 24 Apr 2019 23:59:59 +0200 Subject: Dive site: create new dive site at location from GPS data Some dive computers save GPS data. Currently, this is stored by libdivecomputer in an "extra field". When generating a new dive site for a dive try to use this data to place the dive site. To do so, create a "dive_get_gps_location()" function. This function can be extended later to use e.g. event. When creating a dive site, use the result of this function over a potential pre-existing dive site. Signed-off-by: Berthold Stoeger --- core/dive.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/dive.h') diff --git a/core/dive.h b/core/dive.h index 588ed7041..e71bb1323 100644 --- a/core/dive.h +++ b/core/dive.h @@ -456,6 +456,7 @@ extern struct dive *get_dive_by_uniq_id(int id); extern int get_idx_by_uniq_id(int id); extern bool dive_site_has_gps_location(const struct dive_site *ds); extern int dive_has_gps_location(const struct dive *dive); +extern location_t dive_get_gps_location(const struct dive *d); extern int report_error(const char *fmt, ...); extern void set_error_cb(void(*cb)(char *)); // Callback takes ownership of passed string -- cgit v1.2.3-70-g09d2