aboutsummaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-24 23:59:59 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-11 12:35:11 -0700
commitbab7033ccba8840eb661feed0750e60404d06fc0 (patch)
treecbabc793980bc844e4d36a88234eb46034d1648f /core/dive.h
parentc529cfd361365d3440823efe289a68af6310a983 (diff)
downloadsubsurface-bab7033ccba8840eb661feed0750e60404d06fc0.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h1
1 files changed, 1 insertions, 0 deletions
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