Jacco van_Koll <jko@haringstad.com>
v0.0.7, January 2012
:Author Initials: JKO
:toc:
:icons:
:numbered:
:website: http://subsurface.hohndel.org
Scope of this document is the usage of the program. Please read the build manual for instructions how to build the software and (if needed) its dependencies.
Audience: Fun Divers, Tec Divers, Professional Divers
[[S_Introduction]]
Introduction:
Subsurface was started because of a lack of viable dive log software on Linux. It turns out that the resulting software was easily ported to Windows and Mac, but it clearly is a native Linux program first. Right now, the program is under development and from version 1.1 it is already very usable for divers with supported dive-computers.
In this manual the Suunto Viper will be used for all examples.
[[S_Requirements]]
Requirements
Before you are able to import information from your divecomputer into Subsurface, you need some preparation. Do you have the following:
[[S_StartUsing]]
Start using the program
When you start the program for the first time, it shows no information at all. This is because the program does not automatically load the already available dive-log files.
There is a menu, containing 'File', 'Log', 'Filter' and Help.
The screen is devided in 3 area's:
[[S_ImportNewDives]]
Import new dives from your divecomputer
Before you start fiddeling around with your divecomputer, note that there are divecomputers that consume more power when they are in the PC-Communication mode. This could drain your battery. Therefor, ensure if your computer is recharging when connecting to the USB port. The Suunto Viper does not recharge trough the USB connection. Please consult the manual of your divecomputer if you are unsure if it will be recharged when connected to the USB port.
Now it is time to hook up your divecomputer to your Linux system:
(You should consult the manual of your specific divecomputer for your brand and type)
** On Linux, default is /dev/ttyUSB0 ** On Windows, default is COM3 ** On Mac, default is ... specific to the dive computer
[[S_ViewingLogs]]
Viewing and completing your logs
When all data from your divecomputer is transferred, you will see a listing of your dives in Area 3.
An example:
On Sunday Oct 23, 2011 you made a dive. In the log line of this dive, you see the following information: [width="70%",cols="<5%,10%,<20%,<65%",grid="none",frame="none",style="monospaced"] |=============================================================================== || # | 12 | Dive number || Date | Sun, Oct 23, 2011 10:50 | Date and time of your dive
|| * | | Your rating (none at this time) || m | 12.8 | Your maximum depth in meters || min | 31:20 | Your dive-time in minutes and seconds || Deg. C | 13.0 | Lowest water temperature during your dive || Cyl | | Your used cylinder (none at this time) || O2% | air | What type of mixture || SAC | | SAC (none at this time) || Location | | Where you performed your dive (empty)
|===============================================================================
As you can see, some information is already there because it is retrieved from your divecomputer. Some information is waiting for you to be added. By double clicking on this dive, you can view and complete the log.
[[S_EditDiveInfo]]
Edit the dive info
When you double click on the dive log line, the editor window opens. Now you can add information that is missing. Let start with completing the example:
You double clicked on dive #12, as described in <<S_ViewingLogs,Viewing and
completing your logs>>. The Dive Info window pops up and you will see
the following:
[horizontal]
Location:: An input where you can enter your new location, or you can choose with the pull-down previous locations
Dive Master:: An input where you can enter the name of your Dive Master, or you can choose with the pull-down a previous name
Buddy:: An input where you can enter het name of you Buddy, or you can choose with the pull-down a previous name Rating:: A pull-down where you can rate your dive. Notes:: A free input where you can enter information about your dive. What you've seen, etc.
In this example we use the following information: [horizontal]
Location:: Oostvoornse Meer Dive Master:: S. de Vries Buddy:: S. de Vries Rating:: 3 stars Notes:: First dive here. Good visibility. Did see the concrete poles, some crab and fish. Very nice and easy dive. + Made movie with headcam.
Now don't press ok yet!
[[S_EditEquipmentInfo]]
Edit equipment info
You also want to edit your Cylinder information. And in the <<S_EditDiveInfo, previous chapter>>, this was not edited. There is still another item to edit in the Dive Info screen:
So, when you double click on the cylinder info, you get another popup. This popup gives you the following:
Now we are going to enter the data:
Now tick the option for Start & End pressure
Now your dive information for this dive is complete. You can now press ok in the Dive Info screen and view the results.
[[S_AddingEquipment]]
Adding equipment info
In Area with the 3 tabs there is the tab Equipment. With this tab, you can add Cylinders. We are going to add an additional Cylinder:
[[S_ViewInfoStats]]
View info & Stats
After adding all the information, you can use the tab Info & Stats. This tab will provide you with all the (statistical and calculated) information regarding your dive.
The information contains:
** Date: Date and time of your dive ** Dive Time: Duration of your dive ** Surf Intv: Interval between previous dive and this dive ** Max Depth: Maximum depth of this dive ** Avg Depth: The average depth of this dive ** Water Temp: Lowest temperature of the water ** SAC: The amount of Surface Air Consumption liters per minute ** OTU: The Oxygen Toxicity Units of this dive ** O2/He: Amount of Oxygen/Helium ** Gas Used: The total volume of gas used during this dive
** Total time: Total time of all your dives together, calculated ** Avg Time: The average divetime of your dives, calculated ** Max Depth: The maximum depth of all your dives ** Avg Depth: The average depth of all your dives, calculated ** Max SAC: Highest of Surface Air Consumption of all your dives ** Min SAC: Lowest of Surface Air Consumption of all your dives ** Avg SAC: Average Surface Air Consuption of all your dives, calculated
[[S_SettingUpPreferences]]
Setting up preferences
Subsurface has the ability to modify the preferences you want. By using menu 'File - Preferences' you will be presented a popup with the 'Units'. You are free to choose what is your preference, with other words, use Metric or Imperial.
You can set the following options:
In the main screen, you did see in Area 3, some information. In the Columns options, you can enable/disable options you would like to show there:
And, you can change the font usage of the program.
I will give an example here:
I am a diver in The Netherlands, using the Metric System. Therefor, I go to the menu File, choose Preferences here. In the Units section, I use the following:
I would like to see the:
As a beginning diver, I don't need to track my OTUs. So I leave this one not enabled.
Clicking OK on the dialog stores these settings.
[[S_HowFindDeviceName]]
How to find the Device Name
When you connect your divecomputer by using an USB connector, most of the time, the default of '/dev/ttyUSB0' should work. But if you have other Serial to USB devices, this can be different because '/dev/ttyUSB0' is already in use.
One of the ways to find out what your dive name is:
Within your terminal you should see a message similair to this one:
usb 2-1.1: new full speed USB device number 14 using ehci_hcd usbcore: registered new interface driver usbserial USB Serial support registered for generic usbcore: registered new interface driver usbserial_generic usbserial: USB Serial Driver core USB Serial support registered for FTDI USB Serial Device ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected usb 2-1.1: Detected FT232BM usb 2-1.1: Number of endpoints 2 usb 2-1.1: Endpoint 1 MaxPacketSize 64 usb 2-1.1: Endpoint 2 MaxPacketSize 64 usb 2-1.1: Setting MaxPacketSize 64 usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB3 usbcore: registered new interface driver ftdi_sio ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
You see that in the third line from the bottom, the usb adapter is detected and is connected to 'ttyUSB3'. Now you use this information in the import settings as '/dev/ttyUSB3'. Your divecomputer interface is connected and you should be able to import your dives.
[[S_ImportingDivesJDivelog]]
Importing dives from JDivelog
Maybe you have been using JDivelog and you have a lot of dives logged in this program. You don't have to type all information by hand into Subsurface, because you can import your divelogs from JDivelog.
JDivelog stores its information into files with the extension of .jlb. These .jlb contain all the information that has been stored, except your images in xml format.
By using the menu 'File - Import' you get the popup, like described in <<S_ImportNewDives, chapter 4>>, Importing new dives. Within this popup there is the option to import existing files which are already on your computer. To import your JDivelog file(s) do the following:
After a few moments, you see your existing logs in Subsurface. Now you can edit your dives like explained in <<S_EditDiveInfo, chapter 6>>.
Information that is imported from JDivelog into the location field:
Information that is merged into the location or notes field:
Alternatively, you can start subsurface with the --import command line which will have the same effect:
subsurface MyDives.xml --import JDivelogDives.jlb
will open your divelog (assuming that's called MyDives.xml) and then import the dives from JdivelogDives.jlb. You can now save the combined divelog back as MyDives.xml.
Subsurface will similarly import xml exports from DivingLog as well as Suunto DiveManager.
When importing dives subsurface tries to detect multiple records for the same dive and merges the information as best as it can. So as long as there are no time zone issues (or other reasons that would cause the beginning time of the dives to be substantially different) subsurface will not create duplicate entries.
[[S_ImportingDivesSuunto]]
Importing dives from Suunto Divemanager 3.*
Before you can start importing dives from Suunto Divemanager, you first have to export the dives you want to import. Subsurface does not import directly from the Suunto Divemanager log files. The following procedures unpacking instructions for Linux and Windows.
** A file-manager like window pops up ** Navigate to the directory where you want to store the Divelog.SDE file ** Optional change the name of the file you want to save ** Click 'Save'
Renaming your file to a .zip:
The file could be unusable when changing the extension. Are you sure: Press OK. * Your filemanager will show now the filename Divelogs.SDE.zip
When you double click your Divelogs.SDE.zip file, your preferred archiving tool will start and show you the list of xml files that are in the zip archive. Select all the xml files and extract them to a place where you can find them later in the process.
The assumption is that you have exported your Divelogs.SDE on a Windows system. You have to transfer the file to a location where you can read it from within your Linux environment. You can use file-transfer, shared storage or an USB storage device to do this. The example uses an USB storage:
Now the file is in /tmp, we can extract the xml files from it. You can do this by hand, or use the example script in <<AppendixB,Appendix B>>.
To extract the xml files, we need to open a terminal and use the following commands:
cd /tmp mkdir suunto cd suunto unzip ../Divelogs.SDE
Your divelogs have now been extracted from the Divelogs.SDE file and you can import them with the command:
subsurface *.xml
And with the menu 'File - Save' you can save your dives into the Subsurface format.
[[S_Menu]]
The menu and sub-menus
Within Subsurface, there are several menu and sub-menu options. All of those will be described here with their function.
The file menu is used for the following menu options:
Within the Log menu, there are only 2 sub-items:
popup you can choose what the first number of your dives should be for this set of dives.
This menu gives you the choice to enable or disable Events for the selected divelog(s). At this time, you can enable or disable ascent. When you enable ascent for your dives, within the dive profile, a yellow marker with exclamation sign (!) will show on the points where you have ascented.
The Help menu shows only the About, which contains the version and author information and License button.
[[AppendixA]]
Appendix A: Supported Dive Computers
The use of libdivecomputer provides the support for divecomputers. Within the list of computers in the 'File - import' menu, you will see a listing of divecomputers. This list is covering a compatible set. Please check your users manual to check if your computer will be supported.
Supported divecomputers::
Atomics:: Cobalt Cressi:: Edi Mares:: Icon HD Nemo Puck Air Oceanic:: Veo250 VT Pro OSTC:: DR5 2N Reefnet:: Sensus Sensus Pro Sensus Ultra Suunto:: Cobra 2 3 D3 D9 D4 D4i D6 D6i D9tx Eon Gekko HelO2 Mosquito Solution Alpha Nitrox/Vario Stinger Vyper 2 Air Vytec DS Zoop Uwatec:: Aladin Memo Mouse Smart Zeagle:: N2iTiON 3
[[AppendixB]]
Appendix B: Suunto Export Unpacking Script
#!/bin/bash # # Small basic example script to unpack Suunto Export files # for the use with Subsurface # echo -n "Enter the directory where you stored your Suunto Divemanager export file: " read SuuntoExportDir echo -n "Enter the name of your Suunto Divemanager export file: " read SuuntoExportFile echo "You have entered: $SuuntoExportDir/$SuuntoExportFile" cd $SuuntoExportDir if [ -e ./$SuuntoExportFile ]; then mkdir SuuntoXML cd SuuntoXML unzip ../$SuuntoExportFile subsurface *.xml else echo "Nothing found! Try again!" fi