mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Adapt GPS coordinate download from our companion app to dive sites
This is a bit awkward now. We are downloading what looks like fake dives in the v2 format. So we create a dive site for every single fix. After we merge those new dive sites into the existing dives we need to throw away all the dive sites that weren't used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
be1b6c67c1
commit
6708e06872
2 changed files with 42 additions and 16 deletions
11
dive.h
11
dive.h
|
@ -389,17 +389,6 @@ extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic);
|
|||
|
||||
extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc);
|
||||
|
||||
static inline void copy_gps_location(struct dive *from, struct dive *to)
|
||||
{
|
||||
if (from && to) {
|
||||
to->latitude.udeg = from->latitude.udeg;
|
||||
to->longitude.udeg = from->longitude.udeg;
|
||||
if (!to->location) {
|
||||
to->location = strdup(from->location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline int get_surface_pressure_in_mbar(const struct dive *dive, bool non_null)
|
||||
{
|
||||
int mbar = dive->surface_pressure.mbar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue