summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-12-05 09:59:52 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-05 10:34:02 -0800
commit5e5e3460acf9d29b03aff71228aff01e31a3bf45 (patch)
tree07629133d0d9ea1948692690929582ae9029e12e /dive.h
parent708df33539ef3b6d3cfde435df93fd4475cdde75 (diff)
downloadsubsurface-5e5e3460acf9d29b03aff71228aff01e31a3bf45.tar.gz
Turn latitude and longitude into integer micro-degree values
This actually makes us internally use 'micro-degrees' for latitude and longitude, and we never turn them into floating point either at parse time or save time. That said, the Uemis downloader internally does still use atof() when converting things, which is likely a bug (locale issues and all that), but I'll ask Dirk to check it out. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index 746d2a9fc..4cfa6fa38 100644
--- a/dive.h
+++ b/dive.h
@@ -75,6 +75,10 @@ typedef struct {
int grams;
} weight_t;
+typedef struct {
+ int udeg;
+} degrees_t;
+
struct gasmix {
fraction_t o2;
fraction_t he;
@@ -300,7 +304,7 @@ struct dive {
char *notes;
char *divemaster, *buddy;
int rating;
- double latitude, longitude;
+ degrees_t latitude, longitude;
depth_t maxdepth, meandepth;
int salinity; // kg per 10000 l
duration_t duration, surfacetime;