Commit graph

9 commits

Author SHA1 Message Date
Salvador Cuñat
3ca4e14d5c OSTCTools-Add support to import .dive files
OSTCTools is a windows based software by Robert Angeymar which performs
configuration upgrade, memory analysis and download tasks for H&W OSTC
devices.

Downloaded dives are stored in files (one archive each) with the raw
binary data heavily padded at the begining of the file, and some other
data not included in H&W dive header protocol as the device's serial
number.

The import function simply takes the raw data part of the file and lets
libdivecomputer do the parseing.

Then adds some additional info as OSTC reported dive number and serial
device number.

Please note that OSTCTools is *not* a real logging software, it simply
gets the DC raw data, so there isn't any information about dive site,
equipment and so.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04 10:33:49 -07:00
Salvador Cuñat
ed6ae14a9f Move extern declaration to header file
Move extern declaration of function datatrak_import() to file.h, where it
fits better than in file.c

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04 10:33:11 -07:00
John Van Ostrand
d4121fb42a Liquivision import fixes
Fixed rounding of temperatures
Fixed compile warnings

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07 13:15:44 -08:00
John Van Ostrand
49401eec0b Finished Cochran dive log import
I fixed up the decode and finished the parse for Cochran EMC, Commander
and Gemini computers. I suspect that this code may only work with files
from certain versions of Cochran Analyst. It works with my own CAN files
and with the samples that came with Analyst v4.01v.

A seemingly arbitrary offset of 0x4914 is needed to access data.
The previous code uses 0x4a14 and 0x4b14. I suspect these are from
different version of Analyst.

[Dirk Hohndel: whitespace cleanup, add files to subsurface.pro, made sure
	       this compiles without the corresponding patch to
	       libdivecomputer (that isn't upstream, yet), cleaned up the
	       usage of structs, removed a few unused variables]

Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 15:21:19 -07:00
Boris Barbulovski
ccb1c33d02 Put include guard to every header
* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11 12:37:01 -08:00
Robert C. Helling
5c1abde2a5 Include images in profile
This adds an entry to the dive list context menu to load images. The user
can select image files and set a time offset to align camera and dive
computer clocks.

Using the exif time stamp the images are tried to match to the times of
the selected dives (with a grace period of an hour before and after the
dive).  Upon success an event of type 123 is created per image with the
string value being the path to the image.  Those images are displayed as
thumbnails in the profile. If the matching dive does not yet have a geo
location specified but the image provides one it is copied to the dive
(making the camera a poor man's companion app).

This patch includes easyexif https://code.google.com/p/easyexif/ which is
originally under a New BSD License to parse the image meta data.

This commit includes a new test dive dives/test31.xml with a matching
image wreck.jpg to try out the functionallity.

Obvious to do's:
Have images on the map
Have the images clickable
Have a proper picture viewer
Give visual reference for image time shifting.
Use the new profile

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-06 11:29:23 -08:00
Dirk Hohndel
4b12f28ca4 First steps towards removing glib dependencies
- remove the build flags and libraries from the Makefile / Configure.mk
- remove the glib types (gboolean, gchar, gint64, gint)
- comment out / hack around gettext
- replace the glib file helper functions
- replace g_ascii_strtod
- replace g_build_filename
- use environment variables instead of g_get_home_dir() & g_get_user_name()
- comment out GPS string parsing (uses glib utf8 macros)

This needs massive cleanup, but it's a snapshot of what I have right now, in
case people want to look at it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06 10:41:44 -07:00
Dirk Hohndel
bd9f8ad7f8 First simplistic implementation of a divelogs.de upload
This has no user interface and hardcodes a testing username / password.
But it can successfully create a DLD file (thanks to Miika and Lubomir)
and then uses libsoup to upload that to the server.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-13 20:37:38 -07:00
Linus Torvalds
b1a747f537 Add some initial cochran CAN file parsing
It's broken, and currently only writes out a debug output file per dive.
I'm not sure I'll ever really be able to decode the mess that is the
Cochran ANalyst stuff, but I have a few test files, along with separate
depth info from a couple of the dives in question, so in case this ever
works I can at least validate it to some degree.

The file format is definitely very intentionally obscured, though.
Annoying.  It's not like the Cochran software is actually all that good
(it's really quite a horribly nasty Windows-only app, I'm told).

Cochran Analyst is very much not the reason why people would buy those
computers.  So Cochran making their computers harder to use with other
software is just stupid.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-27 12:43:40 -08:00