source: subsurface/Documentation/user-manual.txt @ 869a7fc

Last change on this file since 869a7fc was 869a7fc, checked in by Dirk Hohndel <dirk@…>, 8 months ago

dive master > divemaster

  • Property mode set to 100644
File size: 252.2 KB
1// Subsurface 4.5 User Manual
2// ==========================
3// :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
4// Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem
5// Ferguson, Salvador Cuñat, Pedro Neves
6// :revnumber: 4.6
7// :revdate: January 2017
10:toc-placement: manual
12// :website:
16[big]#USER MANUAL#
18*Manual authors*: Willem Ferguson, Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
19Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat, Pedro Neves
21[blue]#_Version 4.6, January 2017_#
23Welcome as a user of _Subsurface_, an advanced dive logging program with
24extensive infrastructure to describe, organize, interpret and print scuba
25and free dives. _Subsurface_ offers many advantages over other similar
26software solutions:
28 - Do you need a flexible way of logging dives using recreational equipment,
29   even without a dive computer?
30 - Do you wish to seamlessly include GPS locations of dive sites into your dive log?
31 - Do you use two different dive computer brands, each with its own proprietary
32   software for downloading dive logs? Do you dive with rebreathers as well
33   as open circuit or recreational equipment? Do you use a Reefnet Sensus time-depth
34   recorder along with a dive computer? _Subsurface_ offers a standard
35   interface for downloading dive logs from all of these different pieces of
36   equipment, storing and analyzing the dive logs within a unified system.
37 - Do you use more than one operating system? _Subsurface_ is fully compatible
38   with Mac, Linux and Windows, letting you access your dive log on a range of
39   operating systems using a single application.
40 - Do you use Linux or Mac, but your dive computer has only Windows-based software
41   for downloading dive information (e.g. Mares or Scubapro)? _Subsurface_ provides a way of
42   downloading and analyzing your dive logs on other operating systems.
43 - Do you need an intuitive graphical dive planner that integrates with, and takes
44   into account, dives you’ve already logged?
45 - Do you need a way of storing or backing up your dive log on the Internet, letting
46   you view your dive log from anywhere using an Internet browser?
47 - Do you wish to access or modify your dive log using a mobile phone?
49_Subsurface_ binaries are available for Windows PCs (Win 7 or later from
50version 4.6 of _Subsurface_ onwards), Intel based Macs (OS/X) and many
51Linux distributions. _Subsurface_ can be built for
52many more hardware platforms and software environments where Qt and
53libdivecomputer are available.
55This manual explains how to use the _Subsurface_ program. To install
56the software, consult the _Downloads_ page on the
57[_Subsurface_ web site].
58Please discuss issues with this program by sending an email to[our mailing list] and report bugs at
60[our bugtracker].  For instructions on how to build the
61software and (if needed) its dependencies please consult the INSTALL file
62included with the source code.
64*Audience*: Recreational Scuba Divers, Free Divers, Tec Divers, Professional
70Using this manual
72When opened from within _Subsurface_, this manual does not have external controls for
73paging or selecting previous pages. However, two facilities are provided:
75- The _SEARCH_ function is activated by pressing control-F or command-F on
76the keyboard. A text box appears at the bottom right-hand of the window (see image below).
77For instance, typing the word "_weights_" into the search text
78box, searches throughout the user manual. To the right of the
79search text box are two arrows pointing up and down. These find
80the previous and the next occurrence of the search term.
82image::images/UserManualSearch.jpg["User manual functions",align="center"]
85- _PREVIOUS/NEXT LINK_. Move between links (underlined words that
86jump to specific sections in the user manual) by right-clicking on the text of the manual.
87This brings up a context menu to PREVIOUS links selected.
88(see image below). For instance if a link has been selected, then the option
89to _Go Back_ shows the text at the previous link selected
90(similar to the Previous Page button in a browser). Conversely the _Go Forward_ option
91jumps to the
92text seen before selecting the _Go Back_ option. The _Reload_
93option reloads the complete user manual into the window.
95image::images/UserManualLinksBack.jpg["User manual functions",align="center"]
99The user survey
101In order to develop _Subsurface_ to serve its users in the best possible way,
102it’s important to have user information. Upon launching _Subsurface_
103and using the software for a week or so, a one-box user survey pops up. It is entirely
104optional and the user controls what, if any, data are sent to the _Subsurface_ development
105team. All data the user sends is useful, and will only be
106used to steer future development and to customize the software to fit the needs of
107the _Subsurface_ users. If you complete the survey, or click the option not to
108be asked again, that should be the last communication of this type you receive.
109However, if your diving and/or subsurface habits change and you wish to fill in
110another survey, just launch _Subsurface_ with the _--survey_ option on the command line.
113Start Using the Program
116The _Subsurface_ window is usually divided into four panels with a *Main
117Menu* (File Edit Import Log View Share Help) at the top of the window (for Windows
118and Linux) or the top of the screen (for Mac and Ubuntu Unity). The four panels are:
1201. The *Dive List* on the bottom left, showing all the dives in the
122dive log. A dive can be selected and highlighted on the dive list by clicking on
123it. In most situations the up/down keys can be used to switch
124between dives. The *Dive List* is an important tool for manipulating a dive log.
1262. The *Dive Map* on the bottom right, showing the user's dive sites on a world map
127and centered on the site of the last dive selected in the *Dive List*. The map
128scale can be increased or decreased.
1303. The *Info* on the top left, giving more detailed information on the
131dive selected in the *Dive List*, including some statistics for the selected dive or for all
132highlighted dive(s).
1344. The *Dive Profile* on the top right, showing a graphical dive profile of the
135selected dive in the *Dive List*. You can zoom
136into the dive profile for a more detailed view.
138The dividers between panels can be dragged to change the size of any of
139the panels. _Subsurface_ remembers the position of the dividers, so the next
140time _Subsurface_ starts it uses the positions of the dividers from the last time the program was used.
142If a single dive is selected in the *Dive List*, the dive location, detailed information
143and profile of
144the _selected dive_ are shown in the respective panels. If
145several dives are selected, the last highlighted dive is the _selected
146dive_, but summary data of all _highlighted dives_ is shown in the *Stats* tab
147of the *Info* panel (maximum, minimum and average depths, durations, water
148temperatures and SAC; total time and number of dives selected).
152image::images/main_window_f22.jpg["The Main Window",align="center"]
154The user decides which of the four panels are displayed by selecting the
155*View* option on the main menu. This feature has several choices of display:
157*All*: show all four of the panels as in the screenshot above.
159*Divelist*: Show only the Dive List.
161*Profile*: Show only the Dive Profile of the selected dive.
163*Info*: Show only the Notes about the last selected dive and statistics for
164all highlighted dives.
166*Globe*: Show only the world map, centered on the last selected dive.
168Like other functions that can be accessed via the Main Menu, these options
169can also be triggered using keyboard shortcuts. The shortcuts
170are shown with an underline in the main menu entries, with the Alt-key pressed,
171or are denoted after the menu item.
173When the program is started for the first time, it shows no
174information at all, because it does not have any dive information available. In the
175following sections, the procedures to create a new logbook will be explained.
178Creating a new logbook
180Select _File ->  New Logbook_ from the main menu. All existing dive data are
181cleared so new information can be added. If there are unsaved data in an
182open logbook, the user is asked whether the open logbook should be
183saved before a new logbook is created.
186== Storing dive information in the logbook
187Now that a new logbook is created, it is simple to add dive data it.
188_Subsurface_ allows several ways of adding dive data to a logbook.
1901) If the user has a handwritten divelog, a spreadsheet or another form of
191 manually maintained divelog, dive data can be added to the logbook using
192 one of these approaches:
194 - Enter dive information by hand. This is useful if the diver didn’t
195 use a dive computer and dives were recorded in a written logbook. See:
196 xref:S_EnterData[Entering dive information by hand]
198 - Import dive log information that has been maintained either as a spreadsheet
199 or as a CSV file. Refer to: xref:S_Appendix_D[APPENDIX D: Exporting a spreadsheet to CSV format] and
200 to xref:S_ImportingCSVDives[Importing dives in CSV format].
2022) If a dive is recorded using a dive computer, the depth profile
203and a large amount of additional information can be accessed.
204These dives can be imported from:
206 - The dive computer itself. See: xref:S_ImportDiveComputer[Importing new dive information from a Dive Computer];
207 - Proprietary software distributed by manufacturers of dive computers. Refer
208 to: xref:S_ImportingAlienDiveLogs[Importing dive information from other digital data sources or other data formats].
209 - Spreadsheet or CSV files containing dive profiles.
210 See: xref:S_ImportingCSVDives[Importing dives in CSV format from dive computers or other dive log software]
214=== Entering dive information by hand
216This is usually the approach for dives without a dive computer. The basic record
217of information within _Subsurface_ is a dive. The most important information
218in a simple dive logbook usually includes dive type, date, time, duration,
219depth, the names of your dive buddy and the divemaster or dive guide, and
220some remarks about the dive. _Subsurface_ can store much more
221information for each dive.  To add a dive to a dive log, select _Log
222->  Add Dive_ from the Main Menu. The program then shows three panels
223on which to enter
224information for a dive: two tabs in the *Info* panel (*Notes* and
225*Equipment*), as well as the *Dive Profile* panel that displays a graphical profile
226of each dive. These panels are respectively marked [red]#A#, [red]#B# and
228in the figure below. Each of these tabs will now be explained for data entry.
230image::images/AddDive1_f22.jpg["FIGURE: Add dive",align="center"]
231When you edit a field in Notes or Equipment panels, _Subsurface_ enters *Editing Mode*,
232indicated by the message in the blue box at the top of the *Notes* panel (see the image below). This message is
233displayed in all the panels under Notes and Equipment when in *Editing Mode*.
235image::images/BlueEditBar_f22.jpg["Blue edit bar",align="center"]
237The _Apply changes_ button should only be selected after all the parts of a dive have been entered.
238When entering dives by hand, the _Info_, _Equipment_ and _Profile_ tabs should be completed
239before applying the information. By selecting the _Apply changes_ button, a local copy of the information
240for this specific dive is saved in memory but NOT written to disk.
241The _Apply changes_ button should ONLY be selected after all parts
242of a dive have been entered. When closing Subsurface, the program will
243ask again, this time whether the complete dive log should be saved on disk or not.
246==== Creating a Dive Profile
248The *Dive Profile* (a graphical representation of the depth of the dive as a
249function of time) is shown in the panel on the top right hand of the
250_Subsurface_ window. When a dive is manually added to a logbook, _Subsurface_
251presents a default dive profile that needs to be modified to best represent the
252dive described:
254image::images/DiveProfile1_f20.jpg["FIGURE: Initial dive profile",align="center"]
256_Modifying the dive profile_: When the cursor is moved around the dive profile,
257its position is shown by two right-angled red lines as seen below.
258The time and depth
259represented by the cursor are indicated at the top of the black information box
260(@ and D). The units (metric/imperial) on the axes are determined by the
261*Preference* settings. The dive profile itself comprises several
262line segments demarcated by waypoints (white dots on the profile, as shown
263above). The default dive depth is 15 m.
264If the dive depth was 20 m then you need to drag the appropriate waypoints
265downward to 20 m. To add a waypoint, double-click on
266any line segment. To move an additional waypoint, drag it.
267To remove a waypoint, right-click on it and choose "Remove this point" from the
268context menu. Drag the waypoints to represent an
270time duration for the dive. Below is a dive profile for a dive
271to 20 m for 30 min, followed by a 5 minute safety stop at 5 m.
273image::images/DiveProfile2_f20.jpg["FIGURE: Edited dive profile",align="center"]
275_Specifying the gas composition:_ The gas composition used is indicated
276along the line segments of the dive profile. This defaults to the first gas
277mixture specified in the *Equipment* tab, which was air in the case of the
278profile above. The gas mixtures of segments of the dive profile can
279be changed by right-clicking on the particular
280waypoint and selecting the appropriate gas from the context menu. Changing
281the gas for a waypoint affects the gas shown in the segment _to the right_ of
283waypoint. Note that only the gases defined in the *Equipment* tab appear in the
284context menu (see image below).
286image::images/DiveProfile3_f20.jpg["FIGURE: Gas composition context menu",align="center"]
288With the profile now defined, more details must be added to have
289a fuller record of the dive. To do this,
290the *Notes* and the *Equipment* tabs on the top left hand of the
291_Subsurface_ window should be used. Click on
292xref:S_Notes_dc[*this link*] for instructions on how to use these tabs.
294=== Importing new dive information from a Dive Computer
296==== Connecting and importing data from a dive computer.
298The use of dive computers allows the collection of a large amount of
299information about
300each dive, e.g. a detailed record of depth, duration, rates of ascent/descent
301and of gas partial pressures. _Subsurface_ can capture this information,
302using dive details from a wide range of dive computers. The latest list of supported
303dive computers can be found at:
305Supported dive computers].
309Several dive computers consume more power when they are in
310PC-Communication mode. **This could drain the dive computer's battery**. We
311recommend the user checks to be sure the dive computer is charged when
312connected to the USB port of a PC. For example, several Suunto and Mares dive
313computers do not recharge through the USB connection. Users should refer to
314the dive computer's manual
315if they are unsure whether the dive computer recharges its batteries
316while connected to the USB port.
318To import dive information from a dive computer to a computer with
320the two pieces of equipment must communicate with one another.
322involves setting up the communications port (or mount point) of the computer
323with _Subsurface_ that communicates with the dive computer. To set up
324this communication, users need to find the appropriate information to
326_Subsurface_ where and how to import the dive information.
327xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Appendix A]
328provides the technical information to help the user achieve this for different
330systems and
331xref:_appendix_b_dive_computer_specific_information_for_importing_dive_information[Appendix B]
332has dive computer specific information.
334After this, the dive computer can be hooked up to the user's PC using these steps:
3361. The interface cable should be connected to a free USB port (or the Infra-red
337        or Bluetooth connection set up as described later in this manual)
3392. The dive computer should be placed into PC Communication mode.
340        (Refer to the manual of the specific dive computer)
3423. In _Subsurface_, from the Main Menu, select _Import ->  Import
343   From Dive Computer_.
344   Dialogue *A* in the figure below appears:
347image::images/DC_import_f20.jpg["FIGURE: Download dialogue 1",align="center"]
349Dive computers tend to keep a certain number of dives in memory, even
350though these dives have already been imported to _Subsurface_. For that reason, if
351the dive computer allows this,
352_Subsurface_ only imports dives that have not been downloaded before. This makes
353the download process faster on most dive computers and also saves battery power
354of the dive computer (at least for those not charging while connected via USB).
356 - The dialogue has two drop-down lists, *Vendor* and *Dive Computer*. On the
357   *vendor* drop-down list select the make of the computer, e.g.
358   Suunto, Oceanic,
359   Uwatec, Mares. On the *Dive Computer* drop-down list, the model name of
360   the dive computer must be selected, e.g. D4 (Suunto), Veo200 (Oceanic), or Puck
361   (Mares).
363 - The *Device or Mount Point* drop-down list contains the USB or Bluetooth port
364   name that _Subsurface_ needs in order to communicate with the dive computer.
365   The appropriate port name must be selected. Consult
366   xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Appendix A]
367   and
368   xref:_appendix_b_dive_computer_specific_information_for_importing_dive_information[Appendix B]
369   for technical details on how to find the appropriate port information for a
370   specific dive
371   computer and, in some cases, how to do the correct settings to the operating
372   system of the computer on which _Subsurface_ is running.
374 - If all the dives on the dive computer need to be downloaded, check the
375   checkbox _Force download of all dives_. Normally, _Subsurface_ only downloads
376   dives after the date-time of the last dive in the *Dive List* panel. If one
377   or more of your dives in _Subsurface_ has been accidentally deleted or if there
378   are older dives that still need to be downloaded from the dive computer, this
379   box needs to be checked. Some dive computers (e.g. Mares Puck) do not provide
380   a contents list to _Subsurface_ before the download in order to select only new dives.
381   Consequently, for these dive computers, all dives are downloaded
382   irrespective of the status of this check box.
384 - If the checkbox _Always prefer downloaded dives_
385   has been checked and, during download, dives with identical date-times exist on
386   the dive computer and on the _Subsurface_
387   *Dive List* panel, the dive in the _Subsurface_ divelog will be overwritten
388   by the dive record from the computer.
390 - The checkbox marked _Download into new trip_ ensures that, after upload, the downloaded dives
391   are grouped together as a new trip(s) in the *Dive List*.
393 - Do *not* check the checkboxes labelled _Save libdivecomputer logfile_ and
394   _Save libdivecomputer dumpfile_. These are only used as diagnostic tools
395   when there are problems with downloads(see below).
396 - Then select the _Download_ button.
397   With communication established, you can see how the data are
398   retrieved from the dive computer.
399   Depending on the make of the dive computer and/or number of recorded dives, this
400   could take some time. Be patient. The _Download_ dialogue
401   shows a
402   progress bar at the bottom of the dialogue. Remember for some dive computers
403   progress information could be inaccurate since _Subsurface_ doesn’t know how much
404   downloadable data there are until the download is complete.
405   After the dives have been downloaded, they appear in a tabular format on the right-hand
406   side of the dialogue (see image *B*, above). Each dive comprises a row in the table, showing the date, duration
407   and depth. Next to each dive is a checkbox: check all the dives that need to
408   be transferred to the *Dive List*. In the case of the image above, the last six dives are
409   checked and will be transferred to the *Dive List*. Then
410   click the _OK_ button at the bottom of the dialogue. All the imported dives appear
411   in the *Dive List*, sorted by date and time. Disconnect and
412   switch off the dive
413   computer to conserve its battery power.
415 - If there is a problem in communicating with the dive computer, an error
416   message is shown, similar to this text: "Unable to open /dev/ttyUSB0 Mares
417   (Puck Pro)". Refer to the text in the box below.
424Check the following:
426 - Is the dive computer still in PC-communication or
427   Upload mode?
429 - Is the dive computer’s battery fully charged? If not then charge or replace it.
431 - Is the connecting cable faulty? Does the cable work using other
432   software? Has it worked before, or is this the first time the cable is being used? Are the contacts
433   on the dive computer and the cable clean?
435 - Consult
436   xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Appendix A]
437   to be sure the correct Mount Point
438   was specified (see above).
440 - On Unix-like operating systems, does the user have write permission to the
441   USB port? If not, consult
442   xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Appendix A]
444If the _Subsurface_ computer does not recognize the USB adaptor by
445showing an appropriate device name next to the Mount Point, then there is a
446possibility the cable or USB adaptor is faulty. A faulty cable is the most
447common cause of communication failure between a dive computer and _Subsurface_.
448It’s also possible _Subsurface_ cannot interpret
449the data. Perform a download for diagnostic purposes with the following
450two boxes checked in the download dialogue discussed above:
452        Save libdivecomputer logfile
453        Save libdivecomputer dumpfile
455*Important*: These check boxes are only used when problems are encountered
456during the download process. Under normal circumstances they should not be checked.
457When checking these boxes, the user is prompted to select a folder where the information will be saved. The default folder is the one in which the
459dive log is kept.
461*Important:* _After downloading with the above checkboxes
462checked, no dives are added to the
463*Dive List* but two files are created in the folder selected above_:
465        subsurface.log
466        subsurface.bin
468These files should be send to the _Subsurface_ mail list:
469_subsurface@subsurface-divelog.org_ with a
470request for the files to be analyzed. Provide the dive computer
471make and model
472as well as contextual information about the dives recorded on the dive computer.
476==== Connecting _Subsurface_ to a Bluetooth-enabled dive computer
479Bluetooth is becoming a more common way of communication between dive computers
480and _Subsurface_, for or instance, the Shearwater Petrel
481Mk2 and the OSTC Mk3. _Subsurface_ provides a largely operating system independent
482Bluetooth interface. Setting up _Subsurface_ for Bluetooth communication requires
483four steps:
485- Ensure Bluetooth is activated on the host computer running _Subsurface_.
486- Ensure _Subsurface_ sees the Bluetooth adapter on the host computer.
487- Ensure the Bluetooth-enabled dive computer is Bluetooth-discoverable and in PC upload mode.
488- Ensure _Subsurface_ is paired with the Bluetooth-enabled dive computer.
490Select the Download dialogue by selecting
491_Import -> Import from dive computer_ from the *Main Menu*. After checking the
492box labelled _"Choose Bluetooth download mode"_, the dialogue below appears.
494===== On Linux or MacOS:
496image::images/DC_import_Bluetooth.jpg["FIGURE: Download Bluetooth",align="center"]
498On the _Linux_ or _MacOS_ platforms the name
499of the _Subsurface_ computer and its Bluetooth address are shown on the right hand side,
500On the left hand side, if the
501computer has connected more than one local Bluetooth devices you can use
502the list box to indicate which one needs to connect to _Subsurface_.
503The power state (on/off) of the Bluetooth adapter is shown below
504the address and can be changed by checking the _Turn on/off_ box.
505If the Bluetooth address is not shown, then _Subsurface_ does not see the local
506Bluetooth device. Ensure the Bluetooth driver is installed correctly on the
507_Subsurface_ computer and check if it can be used by other Bluetooth utilities like
508_bluetoothctl_ or _bluemoon_. This completes the first two steps above.
509Ensure the Bluetooth-enabled dive computer is in PC-upload mode and it
510is discoverable by other Bluetooth devices. Consult the manual of the dive
511computer for more information. Now the third item in the list above has been finished.
512Select the _Scan_ button towards the bottom left of the dialogue above. After
513searching, the dive computer should be listed
514(perhaps as one of a number of Bluetooth devices) in the main list box on the
515lefthand side of the dialogue (see image above). If this does not work, select
516the _Clear_ button, then scan again for Bluetooth devices using the _Scan_
517button. After taking these actions _Subsurface_ should see the dive computer.
518The label of the discovered dive computer contains the name of the device, its
519address and its pairing status. If the device is not paired and has a red
520background color, a context menu can be opened by selecting the item with a
522Select the the _Pair_ option and wait for the task to complete. If this dive computer
523is being paired to Subsurface for the first time, it’s possible Subsurface will
524request a Pass Code or PIN number. The most commonly-used Pass Code is 0000,
525and this works for the Shearwater Petrel. If necessary, consult the user manual of the
526dive computer being used.
531Currently _Subsurface_ does not support Bluetooth pairing with dive
532computers that require a custom PIN code. In order to pair the devices, use other
533OS utilities as suggested below.
535One way to achieve this is to use +bluetoothctl+:
537        $ bluetoothctl
538        [bluetooth]# agent KeyboardOnly
539        Agent registered
540        [bluetooth]# default-agent
541        Default agent request successful
542        [bluetooth]# pair 00:80:25:49:6C:E3
543        Attempting to pair with 00:80:25:49:6C:E3
544        [CHG] Device 00:80:25:49:6C:E3 Connected: yes
545        Request PIN code
546        [agent] Enter PIN code: 0000
549After the devices are paired, press the _Save_ button of the dialogue.
550This closes the Bluetooth dialogue. Now select _Download_ in the _Download from
551dive computer_ dialogue which should still be open. The downloaded dives are
552shown on the righthand side of the download dialogue.
554===== On Windows:
555image::images/DC_import_Bluetooth_Windows.png["FIGURE: Download Bluetooth on Windows",align="center"]
557On _Windows_ platforms the _Local Bluetooth device details section_ on the right is not displayed as
558is the case on the Linux/Mac systems.
559To start a scan (by pressing the _Scan_ button)
560check that the Bluetooth device on the _Subsurface_ computer is turned on by selecting
561the dive computer from the list of available Bluetooth devices (see image above). If the dive computer
562is being accessed by Subsurface for the first time, it’s possible Subsurface will
563request a Pass Code or PIN number. Supply the Pass Code recommended in the user manual of the dive computer.
564A Pass Code or PIN of 0000 is often the default.
566The pairing step is checked and done automatically during
567the download process. If the devices have never been paired the system will ask
568permission and put a message on the right side of the screen: _Add a
569device, Tap to set up your DC device_. Always allow this pairing. After a
570discovered item is selected, select the _Save_ button.
571Finally select the _Download_ button on the _Download_ dialogue and wait for the process to complete.
575Currently _Subsurface_ works only with local Bluetooth
576adapters which use Microsoft Bluetooth Stack. If the local device uses
577_Widcomm_,  _Stonestreet One Bluetopia Bluetooth_ or _BlueSoleil_ drivers it
578will not work. However, Bluetooth hardware/dongles from these manufacturers
579(e.g. iSonic) that support the Microsoft Bluetooth Stack do work.
581A log message on the bottom left of the _Remote Bluetooth device selection_
582shows details about the current status of the Bluetooth agent. To
583select another dive computer for download using the "Remote Bluetooth selection dialogue"
584press the three-dots button from the _"Choose Bluetooth download mode"_ option.
589*IN CASE OF PROBLEMS*:  If the Bluetooth adapter from the _Subsurface_ computer
590gets stuck and the _Download_ process fails repeatedly,
591 _unpair_ the devices and then repeat the above steps. If this is not successful,
592 xref:S_HowFindBluetoothDeviceName[_Appendix A_] contains
593information for manually setting up and inspecting the Bluetooth connection
594with _Subsurface_.
597==== Changing the name of a dive computer
599It may be necessary to distinguish between different dive computers used to
600upload dive logs to _Subsurface_. For instance if a buddy’s dive computer is the
601same make and model as your own and dive logs are uploaded from both dive computers
602to the same _Subsurface_ computer, then
603you might like to call one "Alice's Suunto D4" and the other
604"Bob's Suunto D4". Alternatively, consider a technical diver who dives with two or more
605dive computers of the same model, the logs of both (or all) being uploaded.
606In this case it might be prudent to call one of them
607"Suunto D4 (1)" and another "Suunto D4 (2)". This is easily done in _Subsurface_.
608On the *Main Menu*, select _Log ->  Edit device names_. A dialog box opens, showing the
609current Model, ID and Nickname of the dive computers used for upload. Edit the Nickname
610field for the appropriate dive computer. After saving the Nickname, the dive logs
611show the nickname for that particular device instead of the model name,
612allowing easy identification of devices.
615==== Uploading data for a specific dive from more than one dive computer
617Some divers use more than one dive computer at the same time, e.g. during technical diving.
618If you import the dive profiles from these different dive computers into _Subsurface_, the
619profiles can be viewed independently. During upload the data from the dive computers are automatically
620merged into a single dive. The different profiles are presented on the _Profile_ panel with
621the name of each dive computer indicated at the bottom left.
622*While the dive is highlighted in the _Dive List_*, switch between the profiles of the
623different dive computers by using either the left/right arrow keyboard keys or
624by selecting _View -> Previous DC_ or _View -> Next DC_. The data in the _Notes_ panel
625are not affected by the specific dive computer that is selected.
628==== Updating the dive information imported from the dive computer.
630With the uploaded dives in the *Dive List*, the information from the dive
631computer is not complete and more details must be added to have
632a full record of the dives. To do this,
633the *Notes* and the *Equipment* tabs on the top left hand of the
634_Subsurface_ window should be used.
637===== Notes
639To have a more complete dive record, the user needs to add
640additional information by hand. The procedure
641below is virtually identical for hand-entered dives and for dives downloaded from a dive computer.
643In some cases,
644you must provide the date and time of the dive, for example when entering a dive by hand or when a
645dive computer doesn’t provide the date and time of the dive.
646(Usually the date and time of the dive, gas mixture and water temperature are
647shown as obtained from the dive computer)
648If the contents of the *Notes tab* is changed or edited in any way, the message in a blue box at
649the top of the panel shows the dive is being edited. If you
650click on the *Notes* tab, the following fields are
651visible (left hand image, below):
653image::images/AddDive3_f22.jpg["FIGURE: The Notes tab",align="center"]
655The right hand image, above, shows a *Notes tab* filled with dive information.
656The *Date* and *Time* fields reflects the date and time of the dive. By clicking
657the date, a calendar is displayed for selecting
658the correct date. Press ESC to close the calendar.
659The time values (hour and minutes) can also be
660edited directly by clicking on each of them in the text box and by over-typing the
661information displayed.
663*Air/water temperatures*: Air and water temperatures during the dive are shown
664in text boxes to the right of the Start time. Many dive computers supply water
665temperature information and this box may have information.
666If air temperature isn’t provided by the dive computer, the first temperature reading
667might be used for the air temperature. Generally this is close to the real air temperature.
668If editing is required, only a value is required, the units of temperature will be
669automatically supplied by
670_Subsurface_ (following the _Preferences_, metric or imperial units will
671be used).
677Dive locations are managed as a *separate* part of the dive log.
678The dive information in the *Notes* and *Equipment* tabs can therefore NOT be edited at the same
679time as the dive site information. Save all the other dive information (e.g.
680divemaster, buddy, protective gear, notes about the dive) by selecting _Apply changes_ on the
681*Notes* tab BEFORE editing the dive site information. Then supply a dive site name in the
682textbox labelled _Location_ on the *Notes* tab.
684Type in the name of the dive site, e.g. "Tihany, Lake Balaton, Hungary".
685If several dives are
686made at the same location, the site information for the first dive is re-used.
687Existing dive locations
688can be edited by selecting (on the *Dive List* panel) a dive done at that site
689and by opening the location information. Click the globe button on the
690right of the location name (see image image *A* below).
691When typing the name of a dive site,
692a dropdown list appears showing all sites with similar names. If the dive
693site has been used before, click on the already-existing name.
694The dive site names in the dropdown list contain either a globe symbol (indicating
695existing dive sites in the _Subsurface_ database)
696or a *+* symbol (indicating dive site names that appear consistent with the
697current dive site name but which haven’t been added to the dive site database).
698If the present
699dive site has not been used before, a message appears as follows (image *A* below):
701image::images/Locations1_f22.jpg["FIGURE:Location description panel",align="center"]
703Click the globe button and a panel appears to enter the coordinates and
704other information about the site (image *B*, above). The most important
705items are the coordinates of the site. There are three ways to specify coordinates:
707a. Use the world map in the bottom right hand part
708   of the _Subsurface_ window. The map displays an orange bar indicating "No location
709   data - Move the map and double-click to set the dive location". Doubleclick
710   at the appropriate place, and the orange bar disappears and the coordinates are
711   stored.
713b. Use eiher the Subsurface-Mobile App or the _Subsurface_ Companion App on an
714   Android or iPhone device with GPS and if the dive site coordinates
715   were stored using one of these apps.
716   xref:S_Companion[Click here for more information]
717c. Enter coordiantes by hand if they are known, using one of
718   four formats with latitude followed by longitude:
720        ISO 6709 Annex D format e.g. 30°13'28.9"N 30°49'1.5"E
721        Degrees and decimal minutes, e.g. N30° 13.49760' , E30° 49.30788'
722        Degrees minutes seconds, e.g. N30° 13' 29.8" , E30° 49' 1.5"
723        Decimal degrees, e.g. 30.22496 , 30.821798
725Southern hemisphere latitudes are given with a *S*, e.g. S30°, or with a
726negative value, e.g. -30.22496. Similarly western longitudes are given with a
727*W*, e.g. W07°, or with a negative value, e.g. -7.34323. Some keyboards
728don't have the degree sign (°). It can be replaced by a *d* like this: N30d W20d.
729If both a dive site name and coordinates have been provided, save the
730dive site information by selecting the button _Apply changes_ at the top of
731the panel.
733*Important*: GPS coordinates of a dive site are linked to the location
734name - so *saving* a dive site with only coordinates and no name
735causes problems. (Subsurface will think all of these
736dives have the same location and try to keep their GPS coordinates the
739*Dive site name lookup:* If you typed coordinates into the appropriate
740text box, you can do an automated name lookup based on the coordinates.
741This is done when _Subsurface_ uses the Internet to find the name of the dive site
742based on the coordinates that were typed. If a name has been found, it is
743automatically inserted into the tags box. The list box
744(Titled _Dive sites on same coordinates_") at the bottom
745of the dive site panel contains the names of other dives sites used at the
746current location. For instance if the dive site is "Blue Hole" and there are several
747sites named "Blue Hole", all of them are listed.
749Enter any other contextual information about the dive site (Description and Notes),
750then select _Apply Changes_ to save the geolocation for this dive site.
751The dive site information can later be edited by clicking the globe icon to the right of the
752dive site name in the *Notes tab*.
754*Dive mode*: This is a dropdown box allowing you to choose the type of dive
755performed. The options are OC (Open Circuit SCUBA, the default setting, for most recreational dives),
756Freedive (dive without SCUBA equipment), CCR (Closed-circuit
757rebreather) and pSCR (Passive semi-closed rebreather).
759*Divemaster*: The name of the divemaster or dive guide should be
760entered in this field
761which offers auto selection based on the list of divemasters in
762the current logbook.
764*Buddy*: In this field, enter the name(s) of the buddy or buddies
765(separated with commas) who were on the
766dive. Auto selection based on the list of buddies in the current logbook is
769*Suit*: Here the type of dive suit used can be entered.
770Auto selection of the suit description is available.
771Some dry-suit users may choose to use this field to record what combination of
772suit and thermal under suit was used.
774*Rating*: Provide a subjective overall rating of the dive on a
7755-point scale by clicking the appropriate star on the rating scale.
777*Visibility*: Provide a rating of visibility during the
778dive on a 5-point scale by clicking the appropriate star.
780*Tags*: Tags that describe the type of dive done can be entered
781here (separated by commas). Examples of common tags are boat, drift, training,
782cave, etc.
783_Subsurface_ has many built-in tags. By starting to type a tag, _Subsurface_ lists
784the tags that correspond to the typing. For instance, by typing
785+cav+, the tags *cave* and *cavern* are shown to choose from.
787*Notes*: Any additional information for the dive can be entered here.
789The _Apply changes_ and _Discard changes_ buttons are used to save all the information for tabs
790in the *Info* panel and in the *Dive Profile* panel. Use them
791when *ALL* other information has been added. The image xref:S_Notes_dc[at the beginning of this section]
792shows an example of a *Notes tab* after completing the dive information.
794===== Equipment
796The Equipment tab allow entering information about the type of
797cylinder and gas used, as well as the weights used for the dive. The
798message in the blue box at the top of the panel:
800image::images/BlueEditBar_f22.jpg["FIGURE: Blue edit bar",align="center"]
802shows the equipment is being edited. This is a highly interactive part of
803_Subsurface_ and the information on
804cylinders and gases (entered here) determines the behavior of the *Dive profile*
805(top right-hand panel).
808*Cylinders*: The cylinder information is entered through a dialogue that looks
809like this:
811image::images/DC_gas-dialogue1_f20.jpg["FIGURE: Initial cylinder dialogue",align="center"]
813For hand-entered dives, this information needs to be typed in. For dive computers,
814_Subsurface_ often gets the gas used from the dive computer and
815automatically inserts the gas composition(% oxygen or % helium) in the table. The + button
816at the top right allows adding more cylinders for this dive. The dark
817dustbin icon on the left allows you to delete information for a cylinder.
818Note that it is not possible to delete a cylinder if it is used during the
819dive. A cylinder might be implicitly used in the dive, even without a gas change event.
820Start by selecting a cylinder type on the left-hand side of the
821table.  To select a cylinder, the _Type_ box should be clicked. This
822brings up a list button that can be used to display a dropdown list of
825image::images/DC_gas-dialogue2_f20.jpg["FIGURE: The cylinder drop-down list button",align="center"]
827The drop-down list can then be used to select the cylinder type that was used
828for this dive, or just start typing in the box which shows the available
829options for the entered characters. The
830*Size* of the cylinder as well as its working pressure (_Work.press_) will
831automatically be shown in the dialogue.
833Next, indicate the starting pressure and the ending pressure of the
834specified gas during the dive. The unit of pressure (metric/imperial)
835corresponds to the settings chosen in the _Preferences_.
837Finally, provide the gas mixture used. If air was used, the
838value of 21%  can be entered into the oxygen box or this field can be left blank. If nitrox or
839trimix were used, their percentages of oxygen and/or helium should be entered.
840Any inappropriate fields should be left empty. After typing the
841information for the cylinder, save the data
842either by pressing _ENTER_ on the keyboard or by clicking outside the cell
844the cursor. Information for any additional cylinders can be added by using the + button
845at the top right hand. Here is an example of a complete description
846for a dive using two cylinders (air and EAN50):
848image::images/CylinderDataEntry3_f20.jpg["FIGURE: a completed cylinder dive information table",align="center"]
850*Weights*: Information about the weight system used can be entered
851using a dialogue similar to that of the cylinder information. If you click
852the + button on the top right of the weights dialogue, the table looks like
855image::images/WeightsDataEntry1_f20.jpg["FIGURE:The Weights dialogue",align="center"]
857By clicking on the _Type_ field, a drop-down list becomes accessible through a
860image::images/WeightsDataEntry2_f20.jpg["FIGURE:Weights type drop-down list button",align="center"]
861This can be used to select the type of weight system
862used during the dive. You may start typing in the box
863to specify a different weighting mechanism that will be saved by _Subsurface_.
864In the *Weight*
865field, type in the amount of weight used during the dive. After
866specifying the weight
867system, save the data by pressing _ENTER_ on the keyboard or by clicking outside the
868cell with the cursor.
869It’s possible to enter information for more than one weight system by adding
870an additional system
871using the + button on the top right hand. Weight systems can be deleted using
872the dust bin icon on the left hand. Here is an example of information for a dive
873with two types of weights: integrated as well as a weight belt:
875image::images/WeightsDataEntry3_f20.jpg["FIGURE: A completed weights information table",align="center"]
877==== Editing several selected dives simultaneously
879_METHOD 1_: After downloading dives from
880a dive computer, the dive profiles of each is shown in the *Dive profile* tab, as well
881as a few items of information
882in the *Notes* tab (e.g. water temperature) and in the *Equipment* tab (e.g. gas pressures
883and gas composition). Other fields remain empty.
884It may be useful to simultaneously edit some of the
885fields in the *Notes* and *Equipment* tabs.  For instance, it’s possible
886that a diver performed several dives during a single day, using identical equipment at the same
887dive site, or with the same divemaster and/or buddy or tags. Instead
888of completing the information for each
889dive separately, select all the dives for that day in the *Dive List* and
890insert the same information in the *Notes* and *Equipment* fields that need
891identical information. This is done by editing the dive notes or the equipment for any one
892of the selected dives.
894Simultaneous editing only works with fields that do not already contain information.
895This means if some fields have been edited for a particular dive among the selected dives,
896these are not changed while
897editing the dives simultaneously. Technically, the rule for editing several dives simultaneously is:
898if the data field being edited contains _exactly the same information_ for all the dives that have been
899selected, the new, edited information is substituted for all the selected dives. Otherwise only the
900edited dive is
901changed, even though several dives have been selected in the *Dive List*. This speeds
902up the completion of the dive log after several similar dives.
905_METHOD 2_:There is a different way of achieving the same goal. Select a dive with all the appropriate information
906typed into the *Notes* and *Equipment* tabs. Then, from the main menu, select _Log ->  Copy dive components_.
907A box is presented with a selection of check boxes for most of the fields in the *Notes* and *Equipment* tabs.
908Select the fields to be copied from the currently selected dive, then select _OK_. Now, in the *Dive List*,
909select the dives
910into which this information is to be pasted. Then, from the main menu, select _Log ->  Paste dive components_.
911All the selected dives now contain the data initially selected in the original source dive log.
914==== Adding Bookmarks to a dive
916Many divers wish to annotate dives with text that indicate particular events,
917e.g. "Saw dolphins", or "Released surface buoy". This is easily
920 - Right-click at the appropriate point on the dive profile.
921   This brings up the dive profile context menu. Select _Add bookmark_. A red flag is
922   placed on the dive profile at that point (see *A* below).
924 - Right-click on the red flag. This brings up the context menu (see *B* below). Select _Edit name_.
926 - A text box is shown. Type the explanatory text for the bookmark (see *C* below). Select _OK_.
927   This saves the text associated with the bookmark.
929 - Hovering the mouse over the red bookmark, the appropriate text is shown at
930   the bottom of the information box (see *D* below).
932image::images/Bookmarks.jpg["FIGURE: Bookmark dialog",align="center"]
935==== Saving the updated dive information
937The information entered in the *Notes* tab and the *Equipment* tab can be
938saved by using the
939two buttons on the top right hand of the *Notes* tab. If the _Apply changes_ button
940is clicked,
941the dive data are saved in the memory image of the dive. If the _Discard changes_
942button is clicked, the newly entered dive data are
943erased from the computer memory, although the dive profile is
944retained. When the user exits _Subsurface_ there is a final prompt to confirm
945the new data should now be saved permanently on the computer disk.
947=== Importing dive information from other digital data sources or other data formats
951Many divers log their dives using the proprietary software provided by the
952manufacturers of their dive computers.  _Subsurface_ can import dive logs from a range of
953other dive log software. While import from some software is supported natively,
954others require
955export of the the dive log to an intermediate format that can then be imported
956into _Subsurface_.
957Currently, _Subsurface_ supports importing CSV log files from several sources.
958Dive log import from APD LogViewer, XP5, Sensus and Seabear files are
959preconfigured, but because the import is flexible, users can configure their own
961Manually kept log files (e.g. a spreadsheet) can also be imported by
962configuring the CSV import.
963_Subsurface_ can also import UDDF and UDCF files used by some dive log
964software and some dive computers, like the Heinrichs & Weikamp DR5. Finally,
965for some dive log software like Mares Dive Organizer we currently recommend
966importing the logbook first into a web service like _divelogs.de_ and then import
967from there with
968_Subsurface_. supports a few additional logbook formats that
969_Subsurface_ currently cannot handle.
971If the format of other software is supported natively on Subsurface, select
972either _Import ->  Import log files_ or _File ->  Open log file_. Notice that
973the import adds the imported data to the current *Dive list*, and the open style
974starts a new dive list. _Subsurface_ supports the data formats
975of many dive computers, including Suunto, Shearwater and some CCR equipment. When importing dives, _Subsurface_
976tries to detect multiple records for
977the same dive and merges the information as best as it can. If
978there are no time zone issues (or other reasons that would cause the
979beginning time of the dives to be significantly different) _Subsurface_
980will not create duplicate entries. Below is more specific information
981to import data to _Subsurface_.
983==== Using the universal import dialogue
986Importing dives from other software is done through a universal interface
987activated by selecting _Import_ from the Main Menu, then clicking on
988_Import Log Files_. This brings up dialogue *A*, below.
990image::images/Import1_f20.jpg["FIGURE: Import dialogue: step 1",align="center"]
992Towards the bottom right is a dropdown selector with a default label
993of _Dive Log Files_ which accesses different types of direct imports
994available, as in dialogue *B*, above. Currently these are:
996 - XML-formatted dive logs (DivingLog 5.0, MacDive and several other dive log systems)
997 - Cochran dive logs
998 - UDDF-formatted dive logs (e.g. Kenozooid)
999 - UDCF-formatted dive logs
1000 - Poseidon MkVI CCR logs
1001 - APD Inspiration/Evolution CCR logs
1002 - LiquiVision logs
1003 - logs
1004 - OSTC Tools logs
1005 - JDiveLog
1006 - Suunto Dive Manager (DM3, DM4, DM5)
1007 - DL7 files used by Diver's Alert network (DAN)
1008 - Underwater technologies AV1 dive logs
1009 - Divesoft dive logs
1010 - Poseidon MK VI eCCR dive logs
1011 - CSV (text-based and spreadsheet-based) dive logs, including APD CCR logs
1013Selecting the appropriate format and then the specific log file in the large window
1014containing the file list on the right of the dialogue, opens
1015the imported dive log in the _Subsurface_ *Dive List*. Some other formats not
1016accessible through the Import dialogue are also supported, as explained below.
1018==== Importing from  OSTCTools
1020_OSTC Tools_ is a Microsoft-based suite of dive download and dive management tools for the OSTC
1021family of dive computers. _OSTC Tools_ downloads dive data from the dive computer and stores it
1022as a binary file with file extension _.dive_ . Subsurface can directly import these files when using
1023the universal import dialogue. From the dropdown list at the bottom right select
1024_OSTCTools Files (.dive .DIVE)_. This makes the _OSTC Tools_ dive logs visible in the file list
1025panel. Select one or more dive, then click the _Open_ button. The OSTC dives are shown in the
1026*Dive List* panel.
1028All H&W devices supported by OSTCTools can be imported to _Subsurface_. This includes
1029OSTC, OSTC Mk2, OSTC 2N/2C, OSTC3, OSTC Sport, and probably although untested, Frog, OSTC2 and
1030OSTC CR.
1032Please remember that OSTCTools is *not* true diving log software, but rather a useful set of tools
1033for analysis and management of OSTC devices. Only raw dive computer data will be
1034imported to _Subsurface_; the rest of the
1035data (buddies, equipment, notes, etc) need to be completed manually.
1038==== Importing from Mares Dive Organizer V2.1
1040Since Mares uses proprietary Windows software not compatible with
1041multi-platform applications, these dive logs cannot be
1042directly imported into
1043_Subsurface_. Mares dive logs need to be imported using a three-step process,
1044using _www.divelogs.de_ as a gateway to extract the dive log information.
10461. Export the dive log data from Mares Dive Organizer to your
1047   desktop, using
1048   a _.sdf_ file name extension. Refer to xref:Mares_Export[Appendix C] for more
1049   information.
10502. Data should then be imported into _www.divelogs.de_. First, create a user
1051   account in
1052   _www.divelogs.de_ and Log into that web site, then
1053   select _Import Logbook ->  Dive Organizer from the menu on the left hand side.
1054   The instructions must be carefully followed to transfer the dive information
1055   (in _.sdf_ format) from the Dive Organizer database to _www.divelogs.de_.
10563. Finally,  import the dives
1057   from _divelogs.de_ to _Subsurface_, using the instructions below.
1061==== Importing Scubapro _SmartTrak_ divelogs
1063_SmartTrak_ stores the raw data from a Uwatec/Scubapro dive computer along with a plethora
1064of other data manually added by the user, ranging from dive points to buddies data or DAN survey
1065info. However, this is Microsoft Windows-based propietary software by Uwatec (today Scubapro)
1066using Microsoft Access databases, preventing the integration the importer into the _Subsurface_
1067core application.
1069A stand alone tool for Linux has been developed to import the _.slg_ files
1070generated by SmartTrak to Subsurface's _.xml_ format. It can be built together
1071with _Subsurface_ for Linux systems. Two dependencies need to be installed in
1072your system before building: _libglib2.0_ and _libmdb2_.
1074Feel free to contact the _Subsurface_ development team on[our mailing list]
1075for assistance in importing _SmartTrak_ dive logs.
1077Assuming the above dependencies
1078have been installed and the _Subsurface_ source tree is in the directory _~/src/subsurface_, then:
1080===== Building _smtk2ssrf_
1082- Move to the source tree directory.
1083- Run  " $ ccmake build " and set SMARTTRAK_IMPORT option to *on* (off by
1084  default).
1085- Generate with [c] and save and exit with [g].
1086- Build as you prefer, using the _build.sh_ script (recomended) or moving to build
1087  directory and running _make_.
1088- After a successful build, there will be an executable named _smtk2ssrf_ in the
1089  _subsurface/build_ directory.
1090  Copy or move it to a directory in your $PATH, e.g. _~/bin_.
1092===== Running
1094_smtk2ssrf_ accepts 0, 2 or more parameters. If it is launched without
1095parameters in a graphical user interface, a simple window
1096opens for choosing the _.slg_ file(s) to import and a destination file to store the
1097_Subsurface_-formatted data into (see image below).
1099image::images/smtk2ssrf.jpg["FIGURE:Download from SmartTrak",align="center"]
1103Existing data in the destination file will be
1104erased, so *DO NOT* use a regular subsurface divelog file as a destination:
1105rather, specify a *new* filename as a destination.
1107If launched from a command line with two or more parameters, the format is as follows:
1109        $ smrtk2ssrf /input/file_1.slg /input/file_2.slg /output/file3.xml
1111where _input_ is the directory containing the .slg file(s) and _output_ is the
1112directory where the _Subsurface_-formatted output is written to.
1113Files _file_1.slg_ and _file_2.slg_ in the _input_ directory are imported and stored
1114in _file3.xml_ in the _output_ directory. Check any warning and error messages
1115in the console or in the graphical window: some may be
1116relevant as support for Galileo family of dive computers is still a work in
1119===== Merging the imported dives with the existing divelog
1121Open the new file (generated in the previous steps) using _Subsurface_ and check the dives and data.
1122If everything is fine, close the _.xml_ file and open your regular divelog.
1123Then from the *Main Menu* select _Import -> Import log file_ and choose the
1124_.xml_ file containing the imported dives: these will show in the *Dive List*, time
1125ordered, along with the existing dives.
1126The new dives, although time ordered, will keep the numbering system from
1127_SmartTrak_, so a renumbering action is needed. See the section on xref:S_Renumber[Renumbering
1128the dives] for instructions on this topic.
1131==== Importing dives from **
1133Importing dive information from _divelogs.de_ is simple, using a single
1134dialogue box. The _Import ->  Import from Divelogs.de_ option should be selected
1135from the Main Menu. This
1136brings up a dialogue box (see image *A* below). Enter a
1137user-ID and password for _divelogs.de_  and then
1139the _Download_ button. Download from _divelogs.de_ starts immediately,
1140displaying a progress bar in the dialogue box. At the end of the download, the
1141success status is shown (see image *B*, below). The
1142_Apply_ button should then be selected, after which the imported dives appear in the
1143_Subsurface_ *Dive List* panel.
1145image::images/Divelogs1.jpg["FIGURE:Download from",align="center"]
1148==== Importing data in CSV format
1150A comma-separated file (.csv) can be used to import dive information either as dive profiles
1151(as in the case of the APD Inspiration and Evolution closed circuit rebreathers) or as dive
1152metadata (in case the user keeps dive data in a spreadsheet). The _CSV_ format is a universal
1153simplified format that allows easy information exchange between different computers or
1154software packages. For an introduction to CSV-formatted files see xref:S_CSV_Intro[A Diver's
1155Introduction To CSV Files]. _Subsurface_ dive logs can also be exported in _CSV_ format to
1156other software that reads this format. See xref:S_Appendix_D[APPENDIX D: Exporting a spreadsheet
1157to CSV format] for information that may be helpful for importing spreadsheet-based data
1158into _Subsurface_.
1161===== Importing dives in CSV format from dive computers or other dive log software
1163_CSV_ files can be viewed using an ordinary text editor. A _CSV_ file is normally organized into
1164a single line that provides the headers (or _field names_ or _column headings_) of the data
1165columns, followed by the data, one record per line.
1167There are two types of _CSV_ dive logs that can be imported into _Subsurface_:
11691. _CSV dive details_: This dive log format contains similar information to that of a
1170   typical written dive log, e.g. dive date and time, dive depth, dive duration, names of
1171   buddy and divemaster and information about cylinder pressures before and
1172   after the dive, as well as comments about the dive. All the data for a single
1173   dive go on a single line of text, following the order of the column headings.
11752. _CSV dive profile_: This dive log format includes much more information about a single
1176   dive. For instance there may be information at 30-second intervals, indicating depth, water
1177   temperature, and cylinder pressure at that moment in time. Each line contains
1178   the information for a single instant in time during the dive, 30 seconds after that
1179   of the previous instant. Many lines
1180   are required to complete the depth profile information for a single dive. This is a common
1181   export format used by closed-circuit rebreather (CCR) dive equipment and many software
1182   packages that handle dive computer data and/or dive logs.
1184Before being able to import the _CSV_ data to _Subsurface_ *you need to know a few
1185things about the data being imported*:
1187a. Which character separates the different columns within a single line of
1188   data? This field separator should be either a comma (,) a semicolon (;) or a TAB character.
1189   This can be determined by opening the file with a text editor. If it is
1190   comma-delimited or semicolon-delimited, the comma or semicolon
1191   characters between the values are clearly visible. If these are not evident and
1192   the numbers are aligned in columns,
1193   the file is probably TAB-delimited (i.e. it uses a TAB as a field separator).
1195b. Which data columns need to be imported into _Subsurface_? Is it a _CSV dive details_
1196   file or a _CSV dive profile_ file? Open the file using a text editor and note
1197   the titles of the columns to be imported and their column positions.
1199c. Is the numeric information (e.g. dive depth) in metric or in imperial units?
1201With this information, importing the data into _Subsurface_ is
1202straightforward. Select
1203_Import ->  Import Log Files_ from the main menu. In the resulting file
1204selection menu, select _CSV files_ (towards the bottom right). This shows all .CSV files in the selected
1205directory. Select the file that needs to be imported. A configuration panel
1206appears as depicted below:
1208image::images/csv_import1_f20.jpg["FIGURE: CSV download dialogue 1",align="center"]
1210At the top left, there is a dropdown list containing pre- configured
1211settings for common dive computers and software packages.
1212 If the _CSV_ file being imported originated from any of
1213these pre-configured items, select it. Otherwise use the _Manual Import_
1214option. The configuration panel also has dropdown lists for the specification of the appropriate
1215field separator (Tab, comma or semicolon), the date format used in the _CSV_ file,
1216the time units (seconds, minutes or minutes:seconds), as well as the unit system
1217(metric or imperial). Selecting the appropriate options among these is critical for
1218successful data import.
1220Complete this by ensuring that all the data columns have the appropriate
1221column headings. The top blue row of the data table contains the column
1222headings found in the _CSV_ data file. The blue row of balloons immediately above these
1223contains the names understood by _Subsurface_. These balloons can be moved using a drag-and-drop action. For
1224instance, _Subsurface_ expects the column heading for Dive number (" # ") to be "Dive # ". If
1225the column heading that _Subsurface_ expects is not in the blue row, drag the
1226appropriate balloon from the upper area and drop it in the appropriate blue
1227cell at the top of the table. For example, to indicate the correct column for "Dive #", drag
1228the ballooned item labelled "Dive # " and drop it in the blue
1229cell immediately above the white cell containing " # ", depicted in
1230the image below.
1232image::images/csv_import2_f20.jpg["FIGURE: CSV download dialogue 2",align="center"]
1234Continue in this way to ensure all the column headings in the blue row of
1235cells correspond to the headings listed in the top part of the dialogue.
1236When finished, select the _OK_ button on the bottom right of the dialogue.
1237The data from the _CSV_ file are imported and shown in the *Dive List* panel.
1241*A Diver's Introduction to _CSV_ Files*
1245_CSV_ is an abbreviation for a data file format: _Comma-Separated Values_. It is a
1246file format that allows you to view or edit information using a text editor like
1247Notepad (Windows), gedit (Linux) or TextWrangler (OS/X). There are two main advantages of
1248the _CSV_ format.  First, the data are easily editable as text without any proprietary software.
1249Second, all information is human-readable, not obscured by any custom or
1250proprietary attributes that proprietary software inserts into files.
1251Because of its simplicity the _CSV_ format is used
1252as an interchange format between many software packages, e.g. between
1253spreadsheet, statistical, graphics, database and diving software. Within _Subsurface_, _CSV_ files can also
1254be used to import information from other sources like spreadsheet-based dive logs and
1255some dive computers.
1257The most important attribute of a
1258_CSV_ file is the _field separator_, the character used to separate fields within a single line. The
1259field separator is frequently a comma, a colon, a SPACE character or a TAB character. When exporting data from
1260spreadsheet software, the field separator needs to be specified in order to create the _CSV_ file. _CSV_ files are
1261normally organized into a single line that provides the headers (or _field names_) of the data columns,
1262followed by the data, one record per line. Note that each field name
1263may comprise more than one word separated by spaces; for instance _Dive site_, below. Here is an example of
1264dive information for four dives using a comma as a field separator:
1266        Dive site,Dive date,Time,Dive_duration, Dive_depth,Dive buddy
1267        Illovo Beach,2012-11-23,10:45,46:15,18.4,John Smith
1268        Key Largo,2012-11-24,09:12,34:15,20.4,Jason McDonald
1269        Wismar Baltic,2012-12-01,10:13,35:27,15.4,Dieter Albrecht
1270        Pulau Weh,2012-12-20,09:46,55:56,38.6,Karaeng Bontonompo
1272The above data are not easily read by a human. Here is the same information in TAB-delimited format:
1274        Dive site       Dive date       Time    Dive_duration   Dive_depth      Dive buddy
1275        Illovo Beach    2012-11-23      10:45   46:15   18.4    John Smith
1276        Key Largo       2012-11-24      09:12   34:15   20.4    Jason McDonald
1277        Wismar Baltic   2012-12-01      10:13   35:27   15.4    Dieter Albrecht
1278        Pulau Weh       2012-12-20      09:46   55:56   38.6    Karaeng Bontonompo
1280It is clear why many people prefer the TAB-delimited format to the comma-delimited format. The
1281disadvantage is that you cannot see
1282the TAB characters. For instance, the space between _Dive_ and _date_ in the top line may be
1283a SPACE character or a TAB character (in this case it is a SPACE character: the tabs are before and
1284after _Dive date_). If the field names in the first line are long, the alignment with data in the other lines
1285cannot be maintained. Here is a highly simplified and shortened TAB-delimited example of a _CSV_ dive log
1286from an APD closed-circuit rebreather (CCR) dive computer:
1288        Dive Time (s)   Depth (m)       pO₂ - Setpoint (Bar)    pO₂ - C1 Cell 1 (Bar)   Ambient temp. (Celsius)
1289        0       0.0     0.70    0.81    13.1
1290        0       1.2     0.70    0.71    13.1
1291        0       0.0     0.70    0.71    13.1
1292        0       1.2     0.70    0.71    13.2
1293        0       1.2     0.70    0.71    13.1
1294        10      1.6     0.70    0.72    12.7
1295        20      1.6     0.70    0.71    12.6
1296        30      1.7     0.70    0.71    12.6
1297        40      1.8     0.70    0.68    12.5
1299When a _CSV_ file is selected for import, _Subsurface_ displays the column headers as well as some of the data
1300in the first few lines of the _CSV_ file, making it much easier to work with _CSV_ files.
1301_CSV_ files can be used in many contexts for importing data into a _Subsurface_ dive log.
1302Knowing a few basic things about the content of the _CSV_ file helps with a smooth import
1303of the dives into _Subsurface_.
1309But, the _CSV_ import has a couple of caveats. Avoid some special characters
1310like ampersand (&), less than (<), greater than (>) and double quotes (") as part
1311of the numbers or text within a cell. The
1312file should use UTF-8 character set, if using non-ASCII characters. Also the
1313size of the _CSV_ file might cause problems. Importing 100 dives at a time
1314(_CSV dive details_) works, but larger files might exceed
1315the limits of the parser used. When encountering problems with _CSV_ imports, first try with
1316a smaller file to make sure everything works.
1318=== Importing Dive coordinates from a mobile device with GPS.
1320A smartphone with built-in GPS facilities can be used to store the locations of dives.
1321This is performed by:
13231) Taking the mobile device along on the dive boat / liveabord while
1324automatically collecting dive site coordinate information.
13262) Uploading the coordinates from the mobile device to the _Subsurface_ Internet server.
13283) Syncronising the dives in the _Subsurface_ dive list with the coordinates stored
1329on the _Subsurface_ Internet server.
1331_Subsurface has two tools for achieving this:
1333- The _Subsurface Companion App_ (Android and iOS).
1335- The _Subsurface-mobile_ app (Android and iOS)
1337Both of these applications perform the collection of dive site coordinates and
1338the synchronisation with dives in the _Subsurface_ dive list. However, the Companion App
1339is not being further developed and has largely been replaced by the _Subsurface-mobile_
1340app. While the _Companion app_ serves exclusively to collect dive site coordinates and
1341to make these available to the _Subsurface_ desktop version, _Subsurface-mobile_ performs
1342many of the functions of the desktop version, including the management and viewing of dive
1343information. Below, we describe how to perform the above three steps using each of the two
1344mobile apps.
1346For information on using the _Subsurface Companion App_, click xref:S_Companion[_here_].
1348==== Storing and and using GPS locations using  _Subsurface-mobile_
1350===== Install _Subsurface-mobile_
1352Find _Subsurface-mobile_ on Google Play and install it on an Android device. The app
1353is free. The iOS version is currently experimental. _Subsurface-mobile_ has an extensive
1354[user manual]
1355accessible from within that app.
1357===== Create a _Subsurface-mobile_ account
1359This topic is discussed at length in the _Subsurface-mobile_ user manual. In the
1360Credentials screen of _Subsurface-mobile_ provide an e-mail address and a user
1361password that enables subsequent access. A PIN number is e-mailed from the
1362_Subsurface_ Internet server to the e-mail address that has been provided.
1363Type the PIN into the appropriate text field in the Credentials screen (see image below).
1364The _Subsurface_ Internet server notifies the user that a new user has been registered.
1366*N.B.:* To successfully create a user account, the mobile device must have Internet connectivity,
1367either through the cellular network or via wifi.
1369image::images/MobileCredentials.jpg["FIGURE: Subsurface-mobile, credentials screen",align="center"]
1372===== Configure auto-collecting of GPS coordinates
1374Activate the main menu of _Subsurface-mobile_ by selecting the "hamburger" menu button
1375at the bottom left of the _Subsurface-mobile_ screen (see image above), then select
1376_GPS_  -> _Preferences_ (see image below). The collection of GPS locations is done in the background and
1377automatically, using two settings:
1379- _Time threshold._ (minutes). The app will try to get a location every X minutes
1381- _Distance threshold._ (meters). Minimum distance between two locations.
1383*How are GPS coordinates collected?* Assuming the diver sets 5 minutes and 50
1384meters in the settings above, the app will start by recording a location at the current
1385location, followed by another one at every 5 minutes *or* every time you move 50 m
1386from previous location, whichever happens first.
1387If subsequent locations are within a radius of 50 meters from the previous one,
1388a new location is not saved. If the diver is not moving, only one location is
1389saved, at least until the _Time-threshold_ period has elapsed.
1390If the diver moves, a trace of the route is obtained by saving a location every 50 meters.
1392===== Activate the automated recording of GPS locations
1394The _Subsurface-mobile_ main menu has a checkbox at the bottom left labled
1395_Run location service_ (see image below). Checking the box starts the automated recording
1396of GPS positions.
1398image::images/MobileMenu.jpg["FIGURE: Subsurface-mobile main menu",align="center"]
1400===== After the dive, stop the automated recording of GPS locations
1402Uncheck the check box at the bottom left of the _Subsurface-mobile_ main menu.
1404===== Upload the GPS locations onto the _Subsurface_ Internet server.
1406*N.B.:* Uploading the GPS locations to the Internet can only take place if the mobile
1407device has reliable access to the Internet, either via a cellular network or
1408via a wifi connection. If the Internet is not accessible from the dive site(s),
1409then GPS uploading can only take place after the dive or after the dive trip,
1410when an Internet connection has been re-established.
1412From the _Subsurface-mobile_ main menu, select _GPS_  -> _Upload GPS data_. The
1413locations are uploaded. Check the indicator at the top of the mobile screen for
1414internet activity, indicating the transfer of information.
1416===== Apply the stored GPS locations to dives on the _Subsurface_ dive list.
1418_Subsurface_ collects the first GPS location recorded after the start of a dive
1419(obtained within _Subsurface_ from either the dive computer or from the
1420manually-entered dive information) and before the end of a dive. These
1421coordinates are shown in the _Coordinates_ field of the dive site panel
1422for each dive. Within the dive site panel, provide a name for the
1423coordinates that have been assigned to the dive, following the instructions
1424under the heading above xref:S_locations[_Location_ management].
1426The[user manual for _Subsurface-mobile_] (accessible from within that app)
1427contains detailed instructions for
1428performing the collection of GPS data and for managing, uploading and
1429synchronising this information.
1433==== Importing GPS coordinates with the _Subsurface Companion App_ for mobile phones
1435Using the *Subsurface Companion App* on an _Android device_   or
1436xref:S_iphone[_iPhone_] with GPS, the coordinates
1437for the diving
1438location can be automatically passed to the _Subsurface_ dive log. The Companion App
1439stores dive locations on a dedicated Internet server. _Subsurface_ can collect
1440the locations from the server.
1441To do this:
1443===== Create a Companion App account
1445- Register on the[_Subsurface companion web page_].
1446  A confirmation email with instructions and a personal *DIVERID* will be sent,
1447  a long number enabling access to the file server and Companion App capabilities.
1449- Download the app from
1450[Google Play Store]
1451  or from
1454===== Using the Subsurface companion app on an Android smartphone
1456On first use the app has three options:
1458* _Create a new account._  Equivalent to registering in the _Subsurface_ companion
1459  page using an Internet browser. You can request a *DIVERID* using this option,
1460  but it’s supplied via email and followed up by interaction with the
1461[_Subsurface companion web page_] to
1462  activate the account.
1464* _Retrieve an account._  If you forget your *DIVERID* you will receive an email
1465  to recover the ID string.
1467* _Use an existing account._ You are prompted for your *DIVERID*. The app saves
1468  this *DIVERID* and doesn’t ask for it again unless you use the _Disconnect_ menu
1469  option (see below).
1473In the _Subsurface_ main program, the *DIVERID* should also be entered on the
1474Default Preferences
1475panel, by selecting _File ->  Preferences ->  Defaults_ from the main menu
1476in _Subsurface_ itself.
1477This helps synchronization between _Subsurface_ and the Companion App.
1479*Creating new dive locations*
1481Now you are ready to get a dive position and
1482send it to the server. The Android
1483display looks like the left hand image (*A*) below, but without any dives.
1485Touch the + icon at the top right to add a new dive site. A menu
1486with 3 options shows:
1488* Current: A prompt for a place name is shown (or a request to activate the GPS if it is turned
1489  off), after which the current location is saved.
1491* Use Map: This option allows you to fix a position by searching a world map. A
1492  world map is shown (see *B* below). Specify the desired position
1493  with a _long press_ on the touch
1494  sensitive screen (if the marked location is wrong, simply choose a new location)
1495  and select the check symbol in the upper right. A dialog is shown allowing you to enter the
1496  name of the dive location and the date and time of the dive (see *C* below). In order to import this
1497  dive location in _Subsurface_, set the time to agree with the time of
1498  that dive on the dive computer.
1500image::images/Companion_5.jpg["FIGURE: Companion App, add location using map",align="center"]
1503* Import local GPX file: The Android device searches for .gpx files and located
1504  archives will be shown. The selected .gpx file is opened and its
1505  locations shown. Now select the appropriate locations, then select the
1506  tab in the upper right, afterAndroid device.
1508*Dive lists of dive locations*
1510The main screen shows a list of dive locations, each with a name, date and
1511time (see *A* below). Some locations may have an arrow-up icon over the selection box to the left
1512showing they need to be uploaded to the server. You
1513can select individual dive locations from the list. A selected location has a
1514check mark in the selection box on the left. Group operations (like  _Delete_ or _Send_)
1515are performed on several selected locations.
1517Dive locations in this list can be viewed in two ways: a list of locations or a
1518map showing them. The display mode (List or Map) is changed by
1519selecting _Dives_ at the top left of the screen (see *A* below) and then selecting
1520the display mode. The display mode can be changed either from the list
1521of locations or from the map (see *B* below). Upon selecting a location (on the list
1522or on the map), an editing
1523panel opens (see *C* below) where the dive description or other details may be changed.
1525image::images/Companion_4.jpg["FIGURE: Companion App, add location using map",align="center"]
1528Upon selecting a dive (*not* selecting the check box), the
1529name given to it, date/time and GPS coordinates are shown with two options at the top
1530of the screen:
1532- Edit (pencil):  Change the text name or other characteristics of the dive location.
1534- Maps:  Display a map showing the dive location.
1535After editing and saving a dive location (see *C* above),
1536upload it to the web
1537service, as explained below.
1539*Uploading dive locations*
1541There are several ways to send locations to the server.
1542The easiest is simply
1543selecting the locations (See *A* below) and then touching the right arrow at the
1544top right of the screen.
1548Be careful! The trash icon on the right means exactly what it should;
1549it deletes the selected dive location(s).
1551image::images/Companion_1.jpg["FIGURE: Screen shots (A-B) of companion app",align="center"]
1554After a dive trip using the Companion App, all dive locations are ready to be
1555downloaded to a _Subsurface_ dive log (see below).
1558*Settings on the Companion App*
1560Selecting the _Settings_ menu option results in the right hand image above (*B*).
1562_Server and account_
1564- _Web-service URL._ This is predefined (
1566- _User ID._ The DIVERID obtained by registering as described above. The easiest way to
1567  get it is to copy and paste from the confirmation email or just type it in.
1571- _Synchronize on startup_. If selected, dive locations in the Android device and those
1572  on the web service synchronize each time the app is started.
1574- _Upload new dives._ If selected, each time the user adds a dive location it is
1575  automatically sent to the server.
1577_Background service_
1579Instead of entering an unique dive location, you can leave the service running
1580in the background, allowing a continuous collection of GPS locations.
1582The settings below define the behavior of the service:
1584- _Min duration._ In minutes. The app will try to get a location every X minutes
1585  until stopped by the user.
1587- _Min distance._ In meters. Minimum distance between two locations.
1589- _Name template._ The name the app will use when saving the locations.
1593_How does the background service work?_ Assuming the diver sets 5 minutes and 50
1594meters in the settings above, the app will start by recording a location at the current
1595location, followed by another one at every 5 minutes *or* every time one moves 50 m
1596from previous location.
1597If subsequent locations are within a radius of 50 meters from the previous one,
1598a new location is not saved. If the diver is not moving, only one location is saved.
1599If the diver is moving, a trace of the route is obtained by saving a
1600location every 50 meters.
1604- _Mailing List._ The mail box for _Subsurface_. Users can send an email to the
1605Subsurface mailing list.
1607- _Subsurface website._ A link to the URL of Subsurface web
1609- _Version._ Displays the current version of the Companion App.
1613Search the saved dive locations by name or by date and time.
1615_Start service_
1617Starts the _background service_ following the previously defined settings.
1621This is admittedly a badly named option that disconnects the app from the server.
1622It resets the user ID in the app, showing the first screen where an account
1623can be created, retrieve the ID for an existing account or use the users own
1624ID. The _Disconnect_ option
1625is useful if the Android device was used to download the dive locations
1626of another registered diver.
1628_Send all locations_
1630This option sends all locations stored in the Android device to the server.
1633===== Using the Subsurface companion app on an _iPhone_ to record dive locations
1635The iPhone interface is quite simple. Type the user ID (obtained
1636during registration) into the space reserved for it, then select "Dive in"
1637(see left part of the image below) and start collecting dive location information.
1639image::images/iphone.jpg["FIGURE: Using iPhone companion application",align="center",width=640]
1641Dives can be added automatically or manually. In manual mode, a dive location or waypoint is added to the GPS input stream. In automatic
1642mode, a continuous path of GPS locations is created from which,
1643after import, Subsurface can select the appropriate GPS
1644locations based on the times of dives. The default mode for the
1645_iphone_ is automatic. When adding a dive, the
1646location service is started automatically and a red bar appears at the bottom
1647of the screen. After the dive, click on the red
1648bar to end the location service. While the location
1649service is running you can only add dives manually.
1651You can edit the site name afterwards by selecting the dive
1652from the dive list and clicking on the site name. There are no other
1653editable fields. The dive list is automatically uploaded from the iPhone
1654to the web service. There is no option to
1655trigger upload manually.
1658*Downloading dive locations to the _Subsurface_ divelog*
1660Download dive(s) from a dive computer or enter them manually into
1661_Subsurface_ before obtaining the GPS coordinates from the server. The download
1662dialog can be reached via _Ctrl+G_ or from the _Subsurface_ Main Menu _Import
1663-> Import GPS data from Subsurface Service_, resulting in the image on the
1664left (*A*), below. On first use the DIVERID text box is blank. Provide a
1665DIVERID, then select the _Download_ button to start the download process, after
1666which the screen on the right (*B*) below appears:
1668image::images/DownloadGPS.jpg["FIGURE: Downloading Companion app GPS data",align="center"]
1670Note that the _Apply_ button is now active: selecting it updates the locations
1671of the newly entered or uploaded dives in _Subsurface_, i.e. it applies the
1672coordinates and names entered on the app to all the new dives that match the
1673date-times of the uploaded GPS localities. The names of dive
1674locations entered within _Subsurface_ (i.e. before downloading the GPS coordinates) have
1675precedence over downloaded dive locations.
1677Since _Subsurface_ matches GPS locations from the mobile device and dive information from the
1678dive computer based on date-time data, automatic assignment of GPS data to dives depends
1679on agreeing date-time information between the two devices. Although _Subsurface_ has
1680a wide range tolerance, it may not be able to identify the appropriate dive if there is a
1681large difference between the time in the dive computer and that of the Android device.
1682This results in no updates.
1684Similar date-times may not always be possible and there may be many reasons for this (e.g. time zones).
1685_Subsurface_ may also be unable to decide which is the correct position for a dive (e.g. on repetitive
1686dives while running _background service_ there may be several locations that would be
1687included in the time range that fit not only the first dive, but one or more subsequent dives as well).
1688A workaround to manually edit the date-time of a dive in the _Subsurface_
1689Dive List *before* downloading the GPS data and then to change the date-time back again *after*
1690downloading GPS data.
1696- _Background service_ may fill the location list with
1697  unnecessary locations that don’t correspond to the exact dive point but do correspond to the boat's route.
1698   Right now, these locations are difficult to delete from the server. In some situations it
1699  is better to clean up the list on the mobile device before sending the dive points to the web
1700  server by simply deleting the inappropriate locations. This might be necessary, for
1701  instance, to keep the location list clear to see dives in the web service map display (see above).
1702- It may also be useful to give informative names to the locations sent to the web server, or at least
1703  to use an informative name in the _Name Template_ setting while running the _background service_,
1704  especially on a dive trip with many dives and dive locations.
1707=== Adding photographs to dives
1709Many (if not most) divers take photographs
1710during a dive. _Subsurface_ allows the storage and display of photographs for each dive. Photos are
1711superimposed on the dive profile at the times during the dive when they were taken. They can also be viewed
1712from the dive profile.
1714==== Loading photos and synchronizing between dive computer and camera
1716Left-lick on a dive or on a group of dives on the dive list, bringing up the xref:S_DiveListContextMenu[Dive list context Menu]. Right-click the appropriate
1717option to import images either from
1718file or from the Internet. The system file browser appears. Select the folder and
1719photographs that need to be loaded into _Subsurface_ and click the _Open_ button.
1721image::images/LoadImage2_f20.jpg["FIGURE: Load images option",align="center"]
1723If photos are imported from the Internet, provide a URL pointing to a single photograph.
1724If the URL points to a directory, no images are imported: photos from the Internet
1725need to be imported one at a time. If photos are loaded from the Internet, _Subsurface_
1726assumes there is an Internet connection each time this photo is viewed within
1729Having selected the local folder ot Internet image to be imported, the time synchronization dialog appears (see image below). The time
1730synchronization is not perfect between the dive computer used during a dive
1731and the camera used during that same dive. These two devices
1732often differ by several minutes. _Subsurface_ attempts to synchronize these two devices
1733so that the exact times of photographs can be used to position photographs on
1734the dive profile.
1736_Subsurface_ synchronizes camera with dive computer in three ways:
1738- *Pro-actively*: Before the dive, ensure synchronization of the dive computer time settings with
1739  the time settings of the camera by changing the date-time settings on one or both of these devices.
1740- *Manually*: Writing down the exact camera time at the start of a dive allows using the
1741  difference in time between the two devices. As long as the device
1742  settings for time has not been changed in either device, the times of
1743  both devices after the dive or even at the end of the day allows manually setting the time
1744  difference in the _Time shift_ dialog (see image below). Towards the top of the dialog is a time
1745  setting tool immediately under the heading _Shift times of image(s) by_, in the image below.
1746  If the camera time is 7 minutes later than that of the dive computer, set the time setting
1747  tool to a value of 00:07 and select the _Earlier_ radio button.
1748  This is appropriate, since the photos need to be shifted
1749  7 minutes earlier (camera is 7 minutes ahead of dive computer). Ignore any "AM" or "PM" suffix
1750  in that tool. Click the _OK_ button and synchronization is done.
1752image::images/LoadImage3b_f23.jpg["FIGURE: Synchronization dialog",align="center"]
1755- *By photograph*: There is a very slick way of achieving synchronization, requiring a
1756  photograph of the face of the dive computer showing the time. _Subsurface_ gets
1757  the exact time the photograph was taken, using the metadata the camera stores within
1758  each photo and compares this with the time visible on the photo. To do this, use the
1759  bottom half of the _Time shift_ dialog. In this case the top part of the dialog is ignored. Click on
1760  the horizontal bar called _Select image of dive computer showing time_. This brings up
1761  a file browser for selecting the photograph of the dive computer time. Select the
1762  photograph using the file browser and click on _OK_. This photograph of the dive computer
1763  appears in the bottom panel of the _Shift times_ dialog. Now _Subsurface_ knows exactly
1764  when the photograph was taken. Now set the date-time dialog to the left of the photo
1765  so it reflects the date and time of the dive computer in the photo. When the
1766  date-time tool has been set, _Subsurface_ knows exactly what the time difference between
1767  camera and dive computer is, and it can synchronize the devices. The image below shows
1768  a photograph of the face of the dive computer and with the date-time tool set to the
1769  date-time.
1771image::images/LoadImage3c_f23.jpg["FIGURE: Synchronization dialog",align="center"]
1773If the timestamp of a photograph is more than 30 minutes before or after the dive, it is not placed on
1774the dive profile (see the red warning in the image above). However, If the appropriate checkbox is selected (see image above) these images can still be placed on the _Photos_ tab of the *Notes* panel so that all photos associated with a dive are visible, including photos taken before or after the dive.
1776==== Viewing the photos
1778After the images have been loaded, they appear in two places:
1780 - the _Photos_ tab of the *Notes* panel (left part of image below).
1781 - as tiny icons (stubs) on the dive profile at the appropriate positions reflecting the time
1782   each photograph was taken.
1783   To view the photos on the dive profile, activate the _show-photos_ button in the tool bar
1784   to the left of the dive profile:
1786image::images/icons/ShowPhotos_f20.png["FIGURE:Show photos toolbar button",align="left"]
1788This results in a profile display as in the image below:
1790image::images/LoadImage4_f20.jpg["FIGURE: Photos on dive profile",align="center"]
1792Hover the mouse over any of the photo stubs. A thumbnail photo
1793is shown of the appropriate photo. See the image below:
1795image::images/LoadImage5_f20.jpg["FIGURE:Thumbnail photo on dive profile",align="center"]
1797Clicking on the thumbnail brings up a full size
1798photo overlaid on the _Subsurface_ window, allowing a good view of
1799the photographs (see the image below). *Note* that the thumbnail
1800has a small dustbin icon in the bottom right hand corner (see image above). Selecting
1801the dustbin removes the image from the dive. Be careful
1802when clicking on a thumbnail. Images
1803can also be deleted using the _Photos_ tab (see text below).
1805image::images/LoadImage6_f20.jpg["FIGURE: Full-screen photo on dive profile",align="center"]
1807==== The _Photos_ tab
1809Photographs associated with a dive are shown as thumbnails in the _Photos_ tab of the _Notes_
1810panel. Photos taken in rapid succession during a dive (therefore sometimes with large
1811overlap on the dive profile) can easily be accessed in the _Photos_ tab. This tab serves as
1812a tool for individually accessing the photos of a dive, while the stubs on the dive profile
1813show when during a dive a photo was taken. Single-click a thumbnail in
1814the _Photos_ panel to select a photo. Double-click a thumbnail to view the full-sized image, overlaying the _Subsurface_ window. Deleted a photo from the _Photos_ panel by selecting
1815it (single-click) and then by pressing the _Del_ key on the keyboard. This removes the photo BOTH
1816from the _Photos_ tab as well as the dive profile.
1818==== Photos on an external hard disk
1819Most underwater photographers store photos on an external drive. If such a drive can be mapped by the operating system
1820(almost always the case) the photos can be directly accessed by _Subsurface_. This eases the interaction
1821between _Subsurface_ and an external repository of photos. When associating a dive profile with photos from an
1822external drive, the normal procedure of selection and synchronization (see text above) is used.
1823After the external drive has been disconnected, _Subsurface_ cannot access these photos any more.
1824If the display of photos is activated (using the toolbox icon to the left of the _Dive Profile_), the
1825program shows a small white dot where each photo should be on the dive profile.
1826In addition the _Photos_ tab shows only the file names of the photos.
1827If the external drive with the photos is re-connected, the photos can be seen in the normal way.
1829==== Finding out which dives have associated photos.
1830Inspecting each individual dive in order to determine whether there are associated photos can be time consuming. There is a
1831rapid way of seeing which dives have associated photos and which not: activate the _Photos_ checkbox in the dropdown
1832list obtained by right-clicking on the header bar of the *Divelist*. In the *Divelist*, all dives with associated photographs
1833have an icon indicating whether the photographs were taken during the dive, just before/after the dive or both during and before/after the dive. More information is provided in the section dealing with <<S_Divelist_columns, photo icons on the *Divelist*>>.
1836==== Moving photographs among directories, hard disks or computers
1838After a photograph has been loaded into _Subsurface_ and associated with a specific dive,
1839_Subsurface_ saves the directory path where the photo lies as well as the file name of the photo,
1840in order to find it when the dive is opened again.
1841If the photo or the whole photo collection is moved to another drive or to a different
1842 machine, the path to the photo changes. Now, _Subsurface_ looks for the photos at their original location before they were moved,
1843 cannot find them and cannot display them. Because, after moving photos, large numbers of photos
1844 may need to be deleted and re-imported from the new location, _Subsurface_ has a mechanism to ease this inconvenience: automatic updates using fingerprints.
1846When a photo is loaded into _Subsurface_, a fingerprint for the image is calculated and stored with the
1847 other reference information for that photo. After moving a photo collection (that has already been loaded
1848 into _Subsurface_) to a different directory, disk or computer, _Subsurface_ can:
1850- look through a particular directory (and all its subdirectories recursively) where photos have been moved to,
1851- calculate fingerprints for all photos in this directory, and
1853- if there is a match between a calculated fingerprint and the one calculated when a photo was
1854originally loaded into _Subsurface_ (even if the original file name has changed), automatically update the directory information so that _Subsurface_ can find the photo in the new moved directory.
1856This is done by selecting from the Main Menu: _File ->      Find moved images_. This brings up a window within
1857 which the NEW directory of the photos needs to be specified. Select the appropriate directory and click
1858 the _Scan_ button towards the bottom right of the panel. The process may require several minutes to
1859 complete, after which _Subsurface_ will show the appropriate photographs when a particular dive is opened.
1864*Upgrading legacy photo collections without fingerprints*
1868_Subsurface_ automatically calculates fingerprints for all images that it can access.
1869When manipulating images, ensure that all the images associated with the dive log can be accessed by _Subsurface_.
1871_Subsurface_ automatically checks and, if necessary, updates the fingerprints associated with a single dive if:
1873- The images associated with that dive are visible as thumbnails on the *Dive Profile*.
1875- If you edit anything in the *Notes* panel and save the edits by selecting _Apply changes_.
1879=== Logging special types of dives
1881This section gives examples of the versatility of _Subsurface_ as a dive logging tool.
1885==== Multicylinder dives
1887_Subsurface_ easily handles dives involving more than one cylinder. Multi-cylinder diving usually happens
1888(a) if a diver doesn’t have enough gas for the complete dive in a single cylinder; (b) if a diver
1889needs more than one gas mixture because of the depth or the decompression needs of the dive. For this reason
1890multi-cylinder dives are often used by technical divers who dive deep or long. As far
1891as _Subsurface_ is concerned, there are only two types of information that need to be provided:
1893- *Describe the cylinders used during the dive* This is performed in the *Equipment tab* of
1894  the *Info* panel, as xref:cylinder_definitions[described above]. Enter the cylinders one by one,
1895  specifying its size and pressure, as well as the gas composition within it.
1897- *Record the times at which the switch from one cylinder to another was done:* This is information
1898  tracked by some dive computers (provided the diver indicated these changes to the dive computer
1899  by pressing specific buttons). If the dive computer does not provide the information, the diver has to
1900  record these changes using a different method, e.g. writing it on a slate or by creating a bookmark on the dive
1901  computer.
1903- *Record the cylinder changes on the dive profile*: If the latter option
1904  was followed, the diver needs to indicate the gas change event by right-clicking at the appropriate point
1905  in time on the *Dive Profile* panel and indicating the cylinder to which the change was made. After
1906  right-clicking, follow the context menu to "Add gas change" and select the appropriate cylinder from
1907  those defined during the first step, above (see image below). If the
1908  *tank bar* button in the toolbar has been activated, the cylinder switches are also indicated in the
1909  tank bar (image below).
1911When this is complete, _Subsurface_ indicates the appropriate use of cylinders in the dive profile.
1912Below is a two-cylinder dive, starting off with EAN28, then changing cylinders to EAN50 after 26 minutes
1913for decompression.
1915image::images/multicylinder_dive.jpg["FIGURE: Multicylinder profile",align="center"]
1917==== Sidemount dives
1919Sidemount diving is just another form of multi-cylinder diving, often with both or all cylinders having
1920the same gas mixture. Although it’s a popular configuration for cave divers, sidemount
1921diving can be done by recreational divers who’ve completed the appropriate training. Sidemount
1922dive logging involves three steps, exactly as with multi-cylinder dives above:
1924- *During the dive, record cylinder switch events*. Since sidemount diving normally involves two
1925  cylinders with air or with the same gas mixture, _Subsurface_ distinguishes between these different
1926  cylinders. In contrast, many dive computers that allow gas switching only distinguish between different
1927  _gases_ used, not among different _cylinders_ used. This means when sidemount dives are downloaded
1928  from these dive computers, the switching event between cylinders with the same gas is not downloaded. This may mean
1929  that a diver may have to keep a written log of cylinder switch times using a slate, or (if the dive computer
1930  has the capability) marking each cylinder switch with a bookmark that can be retrieved later. Returning
1931  from a dive with the times of cylinder changes is the only tedious part of logging sidemount dives.
1932- *Within _Subsurface_ describe the cylinders used during the dive*. The diver needs to provide the
1933  specifications of the different cylinders, using the *Equipment* tab of the *Info Panel* (see
1934  image below where two 12 litre cylinders were used).
1935- *Indicate cylinder change events on the _Subsurface_ dive profile*. Once the dive log has been imported
1936  from a dive computer into _Subsurface_, the cylinder switch events need to be shown on the dive profile.
1937  Cylinder changes are recorded by right-clicking at the appropriate point on the dive profile, then
1938  selecting _Add gas change_. A list of the appropriate cylinders is shown with the
1939  currently used cylinder greyed out. In the image below Tank 1 is greyed out, leaving only Tank 2
1940  to be selected. Select the appropriate cylinder. The cylinder change is then shown on the dive
1941  profile with a cylinder symbol. If the *Tank Bar* is activated using the toolbar to the left of the
1942  profile, then the cylinder change is also shown on the Tank Bar (see image below). After all
1943  the cylinder change events have been recorded on the dive profile, the correct cylinder pressures
1944  for both cylinders are shown on the dive profile, as in the image below.
1946image::images/sidemount1.jpg["FIGURE: Sidemount profile",align="center"]
1949==== Semi-closed circuit rebreather (SCR) dives
1953Passive semi-closed rebreathers (pSCR) are a technical advance in diving equipment that
1954recirculates the breathing gas a diver uses, while removing carbon dioxide from
1955the exhaled gas. While a small amount (typically a tenth) of the exhaled breathing gas is released into the water,
1956a small amount of fresh gas is released from the back gas cylinder (typically containing nitrox).
1957A diver using a single cylinder of breathing gas can therefore dive for much longer periods than
1958using a recreational open-circuit configuration. With pSCR equipment, a very small amount of breathing
1959gas is released every time the diver inhales. With active SCR (aSCR) equipment, in contrast, a small amount of
1960breathing gas is released continuously from the back cylinder.
1962To log pSCR dives, no special procedures are required. Use the normal steps outlined above:
1964- Select pSCR in the _Dive Mode_ dropdown list on the *Info* panel.
1966- pSCR diving often involves gas changes, requiring an additional cylinder.
1967  Define all the appropriate cylinders as described above
1968  and indicate the cylinder/gas changes as described above in the section on xref:S_MulticylinderDives[multicylinder dives].
1970If a pSCR _Dive Mode_ has been selected, the dive ceiling for that is adjusted for the oxygen
1971drop across the mouthpiece, which often requires longer decompression periods. Below is a dive profile
1972of a pSCR dive using EAN36 on the back cylinder and oxygen for decompression. Note that this dive lasted
1973over two hours.
1975image::images/pSCR_profile.jpg["FIGURE: pSCR profile",align="center"]
1980==== Closed circuit rebreather (CCR) dives
1984Closed system rebreathers use advanced technology to recirculate
1985gas that has been breathed. They also do two things to maintain a
1986breathable oxygen concentration:
1987a) remove carbon dioxide from the exhaled gas
1988b) regulate the oxygen concentration to remain within safe diving limits.
1989The CCR interface of _Subsurface_ is currently experimental
1990and under active development. Subsurface currently supports Poseidon MkVI
1991and APD Discovery/Evolution dive computers. In contrast to a conventional recreational
1992dive computer, a CCR system computer does not allow the download of a log
1993containing multiple dives. Rather, each dive is stored independently. This
1994means that _Subsurface_ cannot download a dive log directly from a CCR
1995dive computer, but that it imports individual CCR dive profiles in the same way it
1996imports dive log data from other digital databases: one dive at a time.
1998===== Import a CCR dive
2000See the section dealing with xref:S_ImportingAlienDiveLogs[Importing dive information from other
2001digital sources]. CCR dive data are currently obtained from the proprietary software
2002provided when purchasing CCR dice equipment. See <<_appendix_b_dive_computer_specific_information_for_importing_dive_information,Appendix B>>
2003for more complete information. Use that software to download the dive data into
2004a known directory. From the main menu of _Subsurface_, select _Import ->  Import
2005log files_ to bring up the xref:Unified_import[universal import dialogue]. As
2006explained in that section, the bottom right
2007hand of the import dialogue contains a dropdown list (labled _Filter:_) of appropriate devices
2008that currently include (Poseidon) MkVI or APD log viewer files. Import for other
2009CCR equipment is under active development. Having selected the appropriate CCR format and
2010the directory where the original dive logs have been stored from the CCR dive
2011computer, select a particular dive log file (in the case of the MkVI
2012it is a file with a .txt extension). After selecting the appropriate dive log,
2013click the _Open_ button at the bottom right hand of the universal import dialogue.
2014The selected dive is imported to the _Subsurface_ dive list.
2016===== Displayed information for a CCR dive
2018_Partial pressures of gases_: The graph of oxygen partial pressure shows the
2019information from the oxygen sensors of the CCR equipment. In contrast to recreational
2020equipment (where pO~2~ values are calculated based on gas composition and dive depth),
2021CCR equipment provide actual measurements of pO~2~, derived from oxygen sensors.
2022In this case the graph for oxygen partial pressure
2023should be fairly flat, reflecting the setpoint settings during the dive. The mean
2024pO~2~ is NOT the mean oxygen partial pressure as given by the CCR equipment, but
2025a value calculated by _Subsurface_ as follows:
2027- For TWO O~2~ sensors the mean value of the two sensors are given.
2029- For THREE-sensor systems (e.g. APD), the mean value is also used. However
2030  differences of more than 0,1 bar in the simultaneous readings of different sensors are
2031  treated as false. If one of the three sensors provides false data, it is ignored.
2033- If no sensor data are available, the pO~2~ value is assumed to be equal to the setpoint.
2035The mean pO~2~ of the sensors is indicated with a green line,
2037The oxygen setpoint values as well as the readings from the individual
2038oxygen sensors can be shown. The display of additional CCR information is turned on by
2039checking the appropriate boxes in the _Preferences_ panel (accessible by
2040selecting xref:S_CCR_options[_File ->  Preferences ->  Graph_]). This part of
2041the _Preferences_ panel is shown in the image below, representing two checkboxes that modify
2042the display of pO~2~ when the appropriate toolbar button on the Dive Profile
2043has been checked.
2045image::images/CCR_preferences_f20.jpg["FIGURE: CCR preferences panel",align="center"]
2047Checking any of these boxes allows the display of additional oxygen-related
2048information whenever the pO~2~ toolbar button on the _Profile_ panel is activated.
2049The first checkbox allows the display of setpoint information. This is a red line
2050superimposed on the green oxygen partial pressure graph and allows a comparison of the
2051mean measured oxygen partial pressure and the setpoint values, as shown below.
2053image::images/CCR_setpoint_f20.jpg["FIGURE: CCR setpoint and po2 graph",align="center"]
2055The second checkbox allows the display of the data from each individual oxygen sensor
2056of the CCR equipment. The data for each sensor is colour-coded as follows:
2058- Sensor 1: grey
2059- Sensor 2: blue
2060- Sensor 3: brown
2062The mean oxygen pO~2~ is indicated by the green line. This allows the direct comparison
2063of data from each of the oxygen sensors, useful for detecting abnormally low or erratic
2064readings from a particular sensor.
2066image::images/CCR_sensor_data_f20.jpg["FIGURE: CCR sensor data graph",align="center"]
2068The setpoint data can be overlaid on the oxygen sensor data by activating both of the above
2069check boxes. Partial pressures for nitrogen (and helium, if applicable) are shown in the
2070usual way as for open circuit dives.
2072_Events_: Several events are logged, e.g. switching the mouthpiece to open circuit.
2073These events are indicated by yellow triangles and, if you hover over a triangle,
2074a description of that event is given as the bottom line in the xref:S_InfoBox[Information Box].
2076_Cylinder pressures_: Some CCR dive computers like the Poseidon MkVI record the
2077pressures of the oxygen and diluent cylinders. The pressures of these two cylinders
2078are shown as green lines overlapping the depth profile. In addition, start and
2079end pressures for both oxygen and diluent cylinders are shown in the _Equipment Tab_.
2080Below is a dive profile for a CCR dive, including an overlay
2081of setpoint and oxygen sensor data, as well as the cylinder pressure data. In this
2082case there is agreement from the readings of the two oxygen sensors.
2084image::images/CCR_dive_profile_f22.jpg["FIGURE: CCR dive profile",align="center"]
2086_Equipment-specific information_: Equipment-specific information gathered by
2087_Subsurface_ is shown in the xref:S_ExtraDataTab[Extra data tab]. This may include setup information
2088or metadata about the dive.
2090The deco ceiling calculated by Subsurface is not very accurate because the precise pressure of nitrogen
2091in the loop can usually not be determined from the dive log imported from the CCR equipment. Many CCR dive
2092computers, however, report an internally-calculated deco ceiling that is reported in the dive log,
2093reflecting a more accurate assessment. The display of this ceiling is activated
2094by clicking the appropriate button to the left of the dive profile:
2096image::images/icons/cceiling.jpg["DC ceiling icon"]
2098The default color of the computer-generated deco ceiling is white. This can be set to red
2099by checking the appropriate check box after selecting _File  ->  Preferences  ->  Graph_.
2100Below is a dive profile indicating the dive computer-generated deco ceiling:
2102image::images/CCR_dive_ceilingF22.jpg["FIGURE: CCR computer-generated deco ceiling",align="center"]
2104More equipment-specific information for downloading CCR dive logs for
2105Poseidon MkVI and APD equipment can be found in xref:_appendix_b_dive_computer_specific_information_for_importing_dive_information[Appendix B].
2107== Obtaining more information about dives entered into the logbook
2109=== The *Info* tab (for individual dives)
2111The Info tab gives some summary information about a particular dive that
2112has been selected in the *Dive List*. Useful information here includes the
2113surface interval before the dive, the maximum and mean depths of the dive, the
2114gas volume consumed, the surface air consumption (SAC) and the number of oxygen
2115toxicity units (OTU) incurred.
2119Gas consumption and SAC calculations:
2120_Subsurface_ calculates SAC and Gas consumption taking in account gas
2121incompressibility, particularly at tank pressures above 200 bar, making them more accurate.
2122Refer to xref:SAC_CALCULATION[Appendix F] for more information.
2125=== The *Extra Data* tab (usually for individual dives)
2127When using a dive computer, it often reports several data items that cannot easily be
2128presented in a standardised way because the nature of the information differs from one
2129dive computer to another. These data often comprise setup information, metadata about
2130a dive, battery levels, no fly times, or gradient factors used during the dive. When
2131possible, this information is presented in the *Extra Data* tab. Below is an
2132image showing extra data for a dive using a Poseidon rebreather.
2134image::images/ExtraDataTab_f20.jpg["FIGURE: Extra Data tab",align="center"]
2136=== The *Stats* tab (for groups of dives)
2138The Stats tab gives summary statistics for more than one dive, assuming that
2139more than one dive has been selected in the *Dive List* using the standard
2140Ctrl-click or Shift-click of the mouse. If only one
2141dive has been selected, figures for only that dive are given. This tab
2142shows the number of dives selected, the total amount of dive time in these
2144as well as the minimum, maximum and mean for the dive duration,
2145water temperature and surface air consumption (SAC). It also shows the depth of the
2146shallowest and deepest dives of those selected.
2149=== The *Dive Profile*
2151image::images/Profile2.jpg["Typical dive profile",align="center"]
2153Of all the panels in _Subsurface_, the Dive Profile contains the most detailed
2154information about each dive. The Dive Profile has a *button bar* on the left hand side,
2155allowing control of several display options. The functions of these
2156buttons are described below. The main item in the Dive
2157Profile is the graph of
2158dive depth as a function of time. In addition to
2159depth, it also shows the ascent and descent rates compared to the recommended
2160speed of going up or down in the water column. This information is given using
2161different colors:
2163|*Color*|*Descent speed (m/min)*|*Ascent speed (m/min)*
2164|Red|> 30|> 18
2165|Orange|18 - 30|9 - 18
2166|Yellow|9 - 18|4 - 9
2167|Light green|1.5 - 9|1.5 - 4
2168|Dark green|< 1.5|< 1.5
2171The profile also includes depth readings for the peaks and troughs in the graph.
2172So users should see the depth of the deepest point and other peaks. Mean depth
2173is plotted as a grey line, indicating mean dive depth up to a particular moment during the dive.
2177In some cases the dive profile does not fill the whole area of the *Dive Profile*
2178panel. Clicking the *Scale* button in the toolbar on the left of the dive profile
2179increases the size of the dive profile to fill the area of the panel.
2181*Water temperature* is shown as a blue line with temperature values
2182placed adjacent to significant changes.
2185==== The *Information Box*
2186The Information box displays a large range of information about the dive
2187profile. Normally the Information Box is located to the top left of the *Dive
2188Profile* panel. If the mouse points outside of the *Dive Profile* panel, then
2189only the top line of the Information Box is visible (see left-hand part of
2190figure (*A*) below). The Information Box can be moved around in the *Dive Profile*
2191panel by click-dragging it with the mouse so that it is not obstructing
2192important detail. The position of the Information Box is saved and used again
2193during subsequent dive analyses.
2195image::images/InfoBox2.jpg["Figure: Information Box",align="center"]
2197When the mouse points inside the *Dive Profile* panel, the information box  expands and
2198shows many data items. In this situation, the data reflect the time point along
2199the dive profile shown by the mouse cursor (see right-hand part of figure (*B*) above
2200where the Information Box reflects the situation at the position of the cursor
2201[arrow] in that image). Moving the cursor horizontally lets the Information Box show information for any point
2202along the dive profile. It gives extensive statistics about depth, gas
2203and ceiling characteristics of the particular dive. These include: Time period
2204into the dive (indicated by a @), depth, cylinder pressure (P), temperature,
2205ascent/descent rate, surface air consumption (SAC), oxygen partial pressure,
2206maximum operating depth, equivalent air depth (EAD), equivalent narcotic depth
2207(END), equivalent air density depth (EADD), decompression requirements at that
2208instant in time (Deco), time to surface (TTS), the calculated ceiling, as well
2209as of the statistics in the Information Box, shown as four
2210buttons on the left of the profile panel. These are:
2214Show the *Maximum Operating Depth (MOD)* of the dive, given the
2215gas mixture used. MOD is dependent on the oxygen concentration in the breathing gas.
2216For air (21% oxygen) it is around 57 m if a maximum pO~2~ of 1.4 is specified in the *Preferences* section
2217(select _File -> Preferences -> Graph_ and edit the text box _pO~2~ in calculating MOD_.
2218When diving below the MOD there is a markedly increased risk of exposure to the dangers of oxygen toxicity.
2222Show either the *No-deco Limit (NDL)* or the
2223*Total Time to Surface (TTS)*. NDL is the time duration that a diver can continue with a
2224dive, given the present depth, that does not require decompression (that is, before an
2225ascent ceiling appears). Once a diver has exceeded the NDL and decompression is required (that
2226is, there is an ascent ceiling above the diver) then TTS gives the number of minutes
2227required before the diver can surface. TTS includes ascent time as well as decompression
2228time. TTS is calculated assuming an ascent surface air consumption (SAC) for
2229the gas currently used. Even if the profile contains several gas
2230switches, TTS at a specific moment during the dive is calculated using the current gas.
2231TTS longer than 2 hours is not accurately calculated and Subsurface only indicates _TTS > 2h_.
2235Show the *Surface Air Consumption (SAC)*, an indication of the surface-normalized respiration
2236rate of a diver. The value of SAC is less than the real
2237respiration rate because a diver at 10m uses breathing gas at a rate roughly double that of
2238the equivalent rate at the surface. SAC gives an indication of breathing gas consumption rate
2239independent of the depth of the dive, so the respiratory rates of different dives
2240can be compared. The units for SAC is liters/min or cubic ft/min.
2244Show the *Equivalent Air Depth (EAD)* for
2245nitrox dives as well as the *Equivalent
2246Narcotic Depth (END)* for trimix dives. These are
2247important to divers breathing gases other than air. Their
2248values are dependent on the composition of the breathing gas. The EAD
2249is the depth of a hypothetical air dive that has the same partial
2250pressure of nitrogen as the current depth of the nitrox dive at
2251hand. A nitrox dive leads to the same decompression obligation as an
2252air dive to the depth equalling the EAD. The END is the depth of a
2253hypothetical air dive that has the same sum of partial pressures of
2254the narcotic gases nitrogen and oxygen as the current trimix dive. A
2255trimix diver can expect the same narcotic effect as a diver breathing
2256air diving at a depth equalling the END.
2258Figure (*B*) above shows an information box with a nearly complete set of data.
2262===== The Gas Pressure Bar Graph
2264On the left of the *Information Box* is a vertical bar graph showing the
2265pressures of the nitrogen (and other inert gases, e.g. helium, if applicable) that the diver
2266was inhaling _at a particular instant during the dive_, shown by the position
2267of the cursor on the *Dive Profile*. The drawing on the left below indicates the
2268meaning of the different parts of the Gas Pressure Bar Graph.
2270image::images/GasPressureBarGraph.jpg["FIGURE:Gas Pressure bar Graph",align="center"]
2272- The light green area indicates the gas pressure, with the top margin of the light green
2273  area showing the total gas pressure of ALL gases inhaled by the diver and measured from the bottom
2274  of the graph to the top of the light green area. This pressure has a _relative_ value in the graph
2275  and does not indicate absolute pressure.
2277- The horizontal black line underneath the light green margin indicates the equilibrium pressure
2278  of the INERT gases inhaled by the diver, usually nitrogen. In
2279  the case of trimix, it is the pressures of nitrogen and helium combined. In this example,
2280  the user is diving with EAN32, so the equilibrium inert gas pressure is 68% of the distance from the
2281  bottom of the graph to the total gas pressure value.
2283- The dark green area at the bottom of the graph represents the pressures of inert gas in each
2284  of the 16 tissue compartments, following the Bühlmann algorithm, with fast tissues on the
2285  left hand side.
2287- The top black horizontal line indicates the inert gas pressure limit determined by the gradient
2288  factor that applies to the depth of
2289  the diver at the particular point on the *Dive Profile*. The gradient factor shown is an
2290  interpolation between the GFLow and GFHigh values specified in the _Graph_ tab of the *Preferences
2291  Panel* of _Subsurface_.
2293- The bottom margin of the red area in the graph indicates the Bühlman-derived M-value. That is the
2294  pressure value of inert gases at which bubble formation is expected to be severe, resulting
2295  in a significant risk of decompression sickness.
2297These five values are shown on the left in the image above. The way the Gas Pressure Bar Graph changes
2298during a dive can be seen on the right hand side of the above figure for a diver using EAN32.
2300- Graph *A* indicates the start of a dive with the diver at the surface. The pressures in all
2301  the tissue compartments are still at the surface equilibrium pressure because no diving has taken place.
2303- Graph *B* indicates the situation after a descent to 30 meters. Few of the tissue compartments have had
2304  time to respond to the descent, so their gas pressures are far below the equilibrium gas pressure.
2306- Graph *C* represents the pressures after 30 minutes at 30 m. The fast compartments have attained
2307  equilibrium (i.e. they have reached the height of the black line indicating the equilibrium pressure). The
2308  slower compartments (towards the right) have not reached equilibrium and are in the process of slowly
2309  increasing in pressure.
2311- Graph *D* shows the pressures after ascent to a depth of 4.5 meters. Since during ascent the total
2312  inhaled gas pressure has decreased strongly from 4 bar to 1.45 bar, the pressures in the different tissue
2313  compartments now exceed that of the total gas pressure and approach the gradient factor value (i.e.
2314  the top black horizontal line). Further ascent will result in exceeding the gradient
2315  factor value (GFHigh), endangering the diver.
2317- Graph *E* indicates the situation after remaining at 4.5 meters for 10 minutes. The fast compartments
2318  have decreased in pressure. As expected, the pressures in the slow compartments have not changed much.
2319  The pressures in the fast compartments do not approach the GFHigh value any more and the diver is safer
2320  than in the situation indicated in graph *D*.
2322==== Computer-reported events during dive
2323Many dive computers record events during a dive. For instance,
2324most dive computers report alarms relating to high partial pressures of oxygen,
2325to rapid ascents or the exceeding of no-deco limits (NDL).
2326On the other hand, other events are classified as warnings and, for instance, occur when
2327the remaining gas in a cylinder falls below a predetermined limit, a deep stop needs to be performed or
2328the need to change gas during multicylinder dives. Some dive computers also report notifications,
2329e.g. when a safety stop is initiated or terminated or when a predetermined amount of OTUs have been incurred.
2330The alarms, warnings and notifications differs from one dive computer to another: some dive computers do not
2331report any of the above events, while others provide an extensive log of events. The reporting of events
2332is therefore a function of the dive computer used. In addition, _Subsurface_ does not always
2333have the ability to detect all the events reported by a specific dive computer.
2335Events are indicated by symbols on the dive profile. Notifications are shown as a white, round symbol with a letter _i_;
2336warnings are indicated by a yellow triangle and alarms by a red triangle. By moving the cursor over a symbol,
2337the explanation is given in the bottom-most line of the _Information Box_ (see image below, where the cursor is positioned
2338over the alarm that was reported).
2340image::images/profile_symbols.jpg["FIGURE: Profile notification symbols",align="center"]
2342Some dive computers report _bookmarks_ that the diver has set during the dive. These are indicated as
2343a small red flag on the profile and are discussed more fully in the section on
2344<<S_Bookmarks,_inserting bookmarks_>>.
2346==== The Profile Toolbar
2348The dive profile can include graphs of the *partial pressures*
2349of O~2~, N~2~, and He during the dive (see figure above) as well as a calculated and dive computer
2350reported deco ceilings (only visible for deep, long, or repetitive dives).
2351Partial pressures of oxygen are indicated in green, nitrogen in black,
2352and helium in dark red. These
2353partial pressure graphs are shown below the profile data.
2357Show the partial pressure of *oxygen* during the
2358dive. This is shown below the dive depth and water temperature graphs.
2362Show the partial pressure of *nitrogen* during the dive.
2366Display of the partial pressure of *helium* during the dive.
2367This is only important to divers using Trimix, Helitrox or similar breathing gasses.
2369The *air consumption* graph displays the tank pressure and its change during the
2370dive. The air consumption takes depth into account so that even when manually
2371entering the start and end pressures the graph, is not a straight line.
2372Like the depth graph, the slope of the tank pressure provides information
2373about the
2374momentary SAC rate (Surface Air Consumption) when using an air integrated dive computer.
2375Here the color
2376coding is not relative to some absolute values but relative to the mean
2377normalized air consumption during the dive. So areas in red or orange
2379times of increased normalized air consumption while dark green reflects times
2380when the diver was using less gas than average.
2384Clicking on the heart rate button allows display of heart rate information
2385during the dive if the dive computer was attached to a heart rate sensor.
2387It is possible to *zoom* into the profile graph. This is done either by using
2388the scroll wheel / scroll gesture of the mouse or trackpad. By default
2389_Subsurface_ always shows a profile area large enough for at least 30 minutes
2390and 30m (100ft) – this way short or shallow dives are easily recognizable;
2391something free divers won’t care about.
2393image::images/MeasuringBar.png["FIGURE: Measuring Bar",align="center"]
2397Measurements of *depth or time differences* can be achieved by using the
2398*ruler button* on the left of the dive profile panel.
2399The measurement is done by dragging the red dots to the two points
2400on the dive profile that you wish to measure. Information is then given
2401in the horizontal white area underneath the
2402two red dots.
2406Photographs that have been added to a dive can be shown on the profile
2407by selecting
2408the *Show-photo* button. The position of a photo on the profile
2409shows the exact time when this photo was taken. If this button is not active,
2410the photos are hidden.
2413The profile can also include the dive computer reported *ceiling* (more
2414precisely, the deepest deco stop that the dive computer calculated for each
2415particular moment in time) as a red overlay on  the dive profile. Ascent ceilings
2416occur when a direct ascent to the surface increases
2417the risk of a diver suffering from decompression sickness (DCS) and it is necessary
2418to either ascend
2419slower or to perform decompression stop(s) before ascending to the surface. Not
2420all dive computers record this information and make it available for download;
2421for example none of the Suunto dive computers make these data
2422available to divelog software. _Subsurface_ also calculates ceilings independently,
2423shown as a green overlay on the dive profile.
2424Because of the differences in algorithms used
2425and amount of data available (and other factors taken into consideration at the time
2426of the calculation) it’s unlikely that ceilings from dive computers and from _Subsurface_
2427are the same, even if the same algorithm and _gradient factors_ (see below) are used.
2428It’s also quite common that _Subsurface_ calculates a ceiling for
2429non-decompression dives when the dive computer stayed in non-deco mode during
2430the whole dive (represented by the [green]#dark green# section in the profile
2431at the beginning of this section). This is because _Subsurface’s_
2432calculations describe the deco obligation at each moment during a dive,
2433while dive computers usually take the upcoming ascent into account. During the
2434ascent some excess nitrogen (and possibly helium) are already breathed off so
2435even though the diver technically encountered a ceiling at depth, the dive still does
2436not require a specific deco stop. This feature lets dive computers offer
2437longer non-stop bottom times.
2441If the dive computer itself calculates a ceiling and makes it available to
2442_Subsurface_ during upload of dives, this can be
2443shown as a red area by checking *Dive computer reported ceiling* button on the Profile Panel.
2447If the *Calculated ceiling* button on the Profile Panel is clicked, then a ceiling,
2448calculated by _Subsurface_, is shown in green if it exists for
2449a particular dive (*A* in figure below). This setting can be modified in two ways:
2453If, in addition, the *show all tissues* button on the Profile Panel is clicked, the ceiling is shown for the tissue
2454compartments following the Bühlmann model (*B* in figure below).
2459If, in addition, the *3m increments* button on the Profile Panel is clicked, then the ceiling is indicated in 3 m increments
2460(*C* in figure below).
2462image::images/Ceilings2.jpg["Figure: Ceiling with 3m resolution",align="center"]
2464Gradient Factor settings strongly affect the calculated ceilings and their depths. For more information about Gradient factors, see the section on xref:GradientFactors_Ref[Gradient Factor Preference settings]. The currently used gradient factors (e.g. GF 35/75) are shown above the depth profile if the appropriate toolbar buttons are activated. N.B.: The indicated gradient factors are NOT the gradient factors in use by the dive computer, but those used by Subsurface to calculate deco obligations during the dive. For more information external to this manual see:
2466 ***[Understanding M-values by Erik Baker, _Immersed_ Vol. 3, No. 3.]
2468 *** link:[Gradient factors for dummies, by Kevin Watts]
2475By selecting this icon, the different cylinders used during a dive can be represented as a colored bar at the bottom
2476of the *Dive Profile*. In general oxygen is represented by a green bar, nitrogen a yellow bar and helium a
2477red bar. The image below shows a dive which first uses a trimix cylinder (red and green), followed by a switch to a nitrox cylinder
2478(yellow and green) after 23 minutes. Cylinders with air are shown as a light blue bar.
2480image::images/ShowCylinders_f20.jpg["Figure: Cylinder use graph",align="center"]
2487Display the tissue heat-map. The heat map summarises, for the duration of the dive, the inert gas tissue pressures
2488for each of the 16 tissue compartments of the Bühlmann model. Blue colours mean low gas pressures in a tissue compartment
2489and thus on-gassing, green to red means excess gas in the tissue and thus off-gassing. Fast to slow tissues are indicated from
2490top to bottom. The figure below explains in greater detail how the heat map can be interpreted.
2492image::images/Heatmap.jpg["Figure: Inert gas tissue pressure heat-map",align="center"]
2494Image *A* on the left shows the xref:S_gas_pressure_graph[Gas Pressure Graph] in the
2495*Information box*, representing a snapshot of inert gas pressures at a particular point in time
2496during the dive. The inert gas pressures of 16 tissue compartments are shown as dark green vertical
2497bars with the quick tissue compartments on the left and the slow tissue compartments
2498on the right. Refer to the section on the xref:S_gas_pressure_graph[Gas Pressure Graph]
2499for more details on the different elements of this graph.
2501Image *B* shows a gradient of unique colours, spanning the whole range of inert gas pressures.
2502It is possible to map the height of each of the dark green vertical bars of *A* to a
2503colour in *B*. For instance, the fastest (leftmost) dark green verical bar in *A* has
2504a height corresponding to the medium green part of *B*. The height of this bar can therefore be summarised
2505using a medium green colour. Similarly, the highest dark green bar in *A* is as high
2506as the yellow part of *B*. The 14 remaining tissue pressure bars in *A* can also be
2507translated to colours. The colours represent three ranges of tissue inert gas pressure:
2509 -  The bottom range in *B* (marked _On-gassing_) includes colours from light blue to black, representing tissue gas pressures
2510    below the equilibrium pressure of inert gas (bottom horizontal line in *A*). The measurement
2511    unit is the % of inert gas pressure, relative to the equilibrium inert gas pressure. In this range
2512    on-gassing of inert gas takes place because the inert gas pressure in the tissue compartment is lower than
2513    in the surrounding environment. Black areas in the heat map indicate that a tissue compartment has reached
2514    the equilibrium inert gas pressure, i.e. the inert gas pressure in the tissue compartment equals that
2515    of the water in which the diver is. The equilibrium pressure changes according to depth.
2517 -  The central range in *B* includes the colours from black to light green, when the inert gas pressure of a tissue
2518    compartment is higher than the equilibrium pressure but less than the ambient pressure.
2519    In this zone decompression is not very efficient
2520    because the gradient of inert gas pressure from tissue to the environment is relatively small
2521    and indicated by dark green areas of the heat map.
2523 -  The top range in *B* (marked _Off-gassing_) includes colours from light green to red and white, repesenting tissue gas
2524    pressures above that of the total ambient pressure (top of light green area of *A*). The measurement
2525    unit is the % of inert gas pressure above ambient pressure, relative to the Bühlmann M-value gradient (bottom of red area
2526    in *A*). These tissue pressures are normally reached while ascending to a shallower depth.
2527    Below a value of 100%, this range indicates efficient off-gassing of inert gas from the tissue compartment into the
2528    environment. Usually, efficient off-gassing is indicated by light green, yellow or orange colours.
2529    Above 100% (red to white in *B*) the M-value gradient is exceeded and the probability of decompression sickness
2530    increases markedly.
2532Image *C* shows the colour mapping of each of the vertical bars in *A*, the fast
2533tissues (on the left in *A*) depicted at the top
2534and the slow tissue compartments at the bottom of *C*. The highest vertical bar in *A*
2535(vertical bar 3rd from the left) is presented as the yellow rectangle 3rd from the top
2536in *C*. The 16 vertical bars in *A* are now presented as a vertical
2537column of 16 coloured rectangles, representing a snapshot of tissue compartment gas pressures
2538at a particular instant during the dive.
2540Image *D* is a compilation of similar colour mappings of 16 tissue compartments
2541during a 10-minute period of a dive, the colours representing the
2542inert gas loading of a tissue compartment at a point in time during the dive. Faster tissues
2543are shown at the top and slower tissues at the bottom, with time
2544forming the horizontal axis of the graph. The column of rectangles in *C* can be found
2545on the horizontal axis between 9 and 10 minutes.
2547The colours of the heat map are not affected by the gradient factor settings.
2548This is because the heat map indicates tissue pressures relative to the Bühlmann M-value gradient, and
2549not relative to any specific gradient factor. For more information external to this manual see:
2551[Understanding M-values by Erik Baker, _Immersed_ Vol. 3, No. 3.]
2553Since the colours of the heat map are not affected by the gradient factor(s), the heat map is also
2554applicable when using the VPM-B decompression model.
2556The image below compares the profiles and heat maps for two planned decompression dives to 60m:
2557the first using the Bühlmann decompression model, the second using the VPM-B decompression model.
2558Both profiles have the same total decompression time, but the VPM-B model requires deeper stops early in the acent phase.
2560In both profiles, the inert gas pressures in the faster tissues rise much more rapidly than the slower tissues during
2561the descent and bottom phase, with the colors transitioning from light blue through blue and purple to black.
2562Similarly, the inert gas pressure in the fast tissues reduces more rapidly than the slow tissues at each decompression stop,
2563with colors transitioning from red, orange and yellow to green and black.
2565The comparison of the two profiles and heatmaps shows that by including deep stops, the oversaturation gradient in the
2566faster tissues early in ascent phase is reduced.
2567However, on-gassing of slower tissues continues during the deep stops, which leads to greater oversaturation gradient
2568in slower tissues at the end of the dive.
2570image::images/tissueHeatmap.jpg["Figure: Inert gas tissue pressure heat-map",align="center"]
2573==== The Dive Profile context menu
2575The context menu for the Dive Profile is accessed by right-clicking while the
2576mouse cursor is over the Dive Profile panel. The menu allows creating
2577Bookmarks, Gas Change Event markers, or manual CCR set-point changes
2578other than the ones that might have been
2579imported from a Dive Computer. Markers are placed against the depth profile line,
2580with the time of the event determined by the mouse cursor when the right
2581mouse button was clicked to bring up the menu. Gas Change events
2582involve a selection of which gas is being switched TO. The list of choices is based on
2583the available gases defined in the *Equipment* Tab. Setpoint change
2584events open a dialog letting you choose the next setpoint value. As
2585in the planner, a setpoint value of zero shows the diver is
2586breathing from an open circuit system while any non-zero value
2587shows the use of a closed circuit rebreather (CCR).
2588By right-clicking while over
2589an existing marker a menu appears, adding options to allow deletion of the
2590marker, or to allow all markers of that type to be hidden. Hidden events can be
2591restored to view by selecting Unhide all events from the context menu.
2593== Organizing the logbook (Manipulating groups of dives)
2596=== The Dive List context menu
2598Several actions on either a single dive, or a group of dives, can be performed using the Dive List
2599Context Menu.  It is found by selecting either a single dive or a group of dives and then right-clicking.
2601image::images/ContextMenu.jpg["Figure: Context Menu",align="center"]
2603The context menu is used in many functions described below.
2606==== Customizing the columns showed in the *Dive List* panel
2608image::images/DiveListOptions.jpg["Example: Dive list info options",align="center"]
2610The default information in the *Dive List* includes, for each dive, Dive_number, Date, Rating, Dive_depth,
2611Dive_duration and Dive_location. This information can be controlled and changed by right-clicking on the
2612header bar of the *Dive List*, bringing up a list of columns
2613that can be shown in the dive list (see above). Check an items to be included in the *Dive List*.
2614The list is immediately updated. Preferences for information
2615shown in the *Dive List* are saved and used when _Subsurface_ is re-opened.
2619By selecting the _Photos_ checkbox in the dropdown list, an icon is shown indicating whether any photos
2620are associated with a particular dive. There are three icons:
2624This dive has photographs taken during the dive, typically using an underwater camera.
2628This dive has photographs taken immediately before or immediately after the dive. This is useful for
2629finding photos of dive teams or boats just before/after the dive, whales or other surface animals seen
2630just before or after the dive, or of landscapes as seen from the boat.
2634This dive has photographs taken both during the dive and immdiately before or after the dive.
2637=== Renumbering the dives
2639Dives are normally numbered incrementally from non-recent dives (low sequence
2640numbers) to recent dives (higher sequence numbers).  Numbering
2641of dives is not always consistent. For instance, when non-recent dives are
2642added, correct numbering does not automatically follow on because
2643of the dives that are more recent in date/time than the newly-added dive with
2644an older date/time. This requires renumbering the dives.
2645Do this by selecting (from the Main Menu) _Log -> Renumber_. Provide
2646the lowest sequence number to be used.
2647This results in new sequence numbers (based on date/time)
2648for all the dives in the *Dive List* panel.
2650Renumber a few selected dives in the dive list by selecting only the dives that
2651need renumbering. Right-click on the selected list and use the Dive List Context Menu
2652to perform the renumbering. A popup window appears letting the user specify
2653the starting number for the process.
2656=== Grouping dives into trips and manipulating trips
2658For regular divers, the dive list can rapidly become very long. _Subsurface_
2659can group dives into _trips_. It does this by grouping dives that have
2660date/times not separated by more than two days and creating
2661a single heading for each diving trip represented in the dive log. Below is an
2662ungrouped dive list (*A*, on the left) as well as the corresponding grouped dive
2663list of five dive trips (*B*, on the right):
2665image::images/Group2.jpg["Figure: Grouping dives",align="center"]
2667Grouping into trips allows a rapid way of accessing individual dives without
2668having to scan a long lists of dives. To group the dives in a dive list,
2669(from the Main Menu) select _Log ->  Auto group_. The *Dive List* panel
2670now shows only the titles for the trips.
2672==== Editing the title and associated information for a particular trip
2674Normally, in the dive list, minimal information is included in the trip title.
2675More information about a trip can be added by selecting its trip title bar from
2676the *Dive List*. This shows a *Trip Notes* tab in the *Notes* panel. Here
2677you can add or edit information about the date/time, the trip location and any
2678other general comments about the trip as a whole (e.g. the dive
2679company that was used, the general weather and surface conditions during the trip, etc.).
2680After entering this
2681information, select *Save* from the buttons at the top right
2682of the *Trip Notes*
2683tab. The trip title in the *Dive List* panel should now reflect the
2684edited information.
2686==== Viewing the dives during a particular trip
2688Once the dives have been grouped into trips, you can expand one or more
2689trips by clicking the expansion button [+/-] on the left of each trip title. This expands
2690the selected trip, revealing individual dives during the trip.
2692==== Collapsing or expanding dive information for different trips
2694After selecting a particular trip in the dive list, the
2695context menu allows several options to expand or collapse dives
2696within trips. This includes expanding all trips and collapsing all trips.
2698==== Merging dives from more than one trip into a single trip
2700After selecting a trip title, the context menu allows the merging
2701of trips by either merging the selected trip with the trip below or with the
2702trip above. (Merge trip with trip below; Merge trip with trip above)
2704==== Splitting a single trip into more than one trip
2705If a trip includes ten dives, you can split this trip into two trips (trip 1:
2706top 4 dives; trip 2: bottom 6 dives) by selecting and right-clicking the top
2707four dives. The resulting context menu lets the user create a new trip by
2708choosing the option *Create new trip above*. The top four dives are then
2710into a separate trip. The figures below show the selection and context menu
2711on the left (A) and
2712the completed action on the right (B):
2714image::images/SplitDive3a.jpg["FIGURE: Split a trip into 2 trips",align="center"]
2716=== Manipulating single dives
2718==== Delete a dive from the dive log
2720Dives can be permanently deleted from the dive log by selecting and
2721right-clicking them to bring up the context menu, then selecting *Delete
2722dive(s)*. Typically this would apply to a case where a user wishes to delete
2724calibration dives of the dive computer or dives of extremely short duration.
2726==== Unlink a dive from a trip
2728You can unlink dives from the trip to which they belong. To do this,
2729select and right-click
2730the relevant dives to bring up the context menu. Then select the option *Remove dive(s)
2731from trip*. The dive(s) now appear immediately above or below the trip to
2732which they belonged, depending on the date and time of the unlinked dive.
2734==== Add a dive to the trip immediately above
2736Selected dives can be moved from the trip to which they belong and placed within
2737a separate trip. To do this, select and right-click
2738the dive(s) to bring up the context menu, and then select *Create new trip above*.
2740==== Shift the start time of dive(s)
2741Sometimes it’s necessary to adjust the start time of a dive. This may apply to
2742situations where dives are done in different time zones or when the dive
2743computer has a wrong time. To do this, select and right-click
2744the dive(s) to be
2745adjusted. This brings up the context menu on which the *Shift times*
2746option should be selected. You must then specify the
2748(in hours and minutes) by which the dives should be adjusted and click on the
2749option of whether the time adjustment should be earlier or later.
2751==== Merge dives into a single dive
2753Sometimes a dive is briefly interrupted, for example, if a diver returns to the surface
2754for a few minutes, resulting in two or more dives being recorded by the dive
2755computer and appearing as different dives in the *Dive List* panel.
2756Merge these dives onto a single dive by selecting the appropriate dives,
2757right-clicking them to bring up the context menu and then selecting *Merge selected
2758dives*. It may be necessary to edit the dive information in the *Notes*
2759panel to reflect events or conditions that apply to the merged dive. The figure
2760below shows the depth profile of two dives that were merged:
2762image::images/MergedDive.png["Example: Merged dive",align="center"]
2764==== Split selected dives
2766On some occasions, a diver reaches the surface and immediately dives again. However,
2767it may happen that the dive computer does not register a new dive, but continues
2768the previous dive due to the brief surface interval. In this case it is possible to
2769split a dive so that the two dives are shown as independent dives on the *Dive List*.
2770If this operation is performed, _Subsurface_ scans the selected dive(s) and splits the
2771dive at points during the dive where the depth is less than a metre.
2773==== Load image(s) from file(s)
2774This topic is discussed in the section: xref:S_LoadImage[Adding photographs to dives].
2776==== Load image from web
2777This topic is discussed in the section: xref:S_LoadImage[Adding photographs to dives].
2779==== Undo dive manipulations
2781Important actions on dives or trips, described above, can be undone or redone.
2782This includes: _delete dives_, _merge dives_, _split selected dives_, _renumber dives_ and _shift dive times_.
2783To do this after performing any of these actions, from the *Main Menu* select
2784_Edit_. This brings up the possibility to _Undo_ or _Redo_ an action.
2788=== Filtering the dive list
2790The dives in the *Dive List* panel can be filtered, selecting only some
2791of the dives based on their attributes, e.g. dive tags, dive site, divemaster, buddy or protective
2792clothing. For instance, filtering lets you list the deep dives at a particular
2793dive site, or otherwise the cave dives with a particular buddy.
2795To open the filter, select _Log ->  Filter divelist_ from the main menu. This opens the
2796_Filter Panel_ at the top of the _Subsurface_ window. Three icons are located at the top
2797right hand of the filter panel (see image below). The _Filter Panel_ can be reset
2798(i.e. all current filters cleared) by selecting the *yellow angled arrow*. The _Filter Panel_ may also be
2799minimized by selecting the *green up-arrow*. When minimized, only these three icons are shown.
2800The panel can be maximized by clicking the same icon that minimized it. The filter may also be
2801reset and closed by selecting the *red button* with the white cross.
2803image::images/Filterpanel.jpg["Figure: Filter panel",align="center"]
2805Four filter criteria may be used to filter the dive list: dive tags, person (buddy / divemaster), dive site
2806and dive suit.  Each of these is represented by a check list with check boxes. Above
2807each check list is a second-level filter tool, allowing the listing of only some
2808attributes within that check list. For instance, typing "_ca_" in the filter
2809text box above the tags check list, results in the list being reduced
2810to "_cave_" and "_cavern_". Filtering the check list helps to rapidly find
2811search terms for filtering the dive list.
2813To activate filtering of the dive list, check at least one check box in one of
2814the four check lists. The dive list is then shortened to include
2815only the dives that pertain to the criteria specified in the check lists.
2816The four check lists work as a filter with _AND_ operators. Subsurface
2817filters therefore  for _cave_ as a tag AND _Joe Smith_ as a buddy. But the
2818filters within a category are inclusive - filtering for _cave_ and _boat_
2819shows those dives that have either one OR both of these tags.
2822== Exporting the dive log or parts of the dive log
2824There are two ways to export dive information from Subsurface:
2826- Export dive information to _Facebook_
2828- xref:S_Export_other[Export dive information to other destinations or formats]
2831=== Exporting dive information to _Facebook_
2833Export of dives to _Facebook_ is handled differently from other types of export because
2834a connection to _Facebook_ is required, needing a _Facebook_ userID and password.
2835From the *Main Menu*, select _Share on -> Connect to -> Facebook_ (image *A* below)
2836A _Facebook_ login screen appears (image *B* below). Provide a _Facebook_ userID and password.
2837From the _Subsurface_ window it’s easy to determine whether _Subsurface_ has a valid connection to _Facebook_:
2838from the *Main Menu*, select _Share on_ (image *A*, below). Normally, the _Facebook_ option is greyed out. But
2839if there is a connection to _Facebook_, this option is active (i.e. in black color and can be selected).
2841Once logged into to _Facebook_ , a panel is shown with a message:
2842"_To disconnect Subsurface from your Facebook account, use the 'Share on' menu entry_."
2843Close this message panel.
2845image::images/facebook1.jpg["Figure: Facebook login",align="center"]
2847Having established a login to _Facebook_, transferring a dive profile to a _Facebook_ timeline is easy.
2848In the _Subsurface_ *Dive Profile* panel, highlight the dive to be transferred.
2849Then, from the *Main Menu*, select _Share on -> Facebook_. A dialogue box
2850is shown, determining the amount of additional information to be transferred
2851with the dive profile (image *A*, below). To transfer a dive profile to _Facebook_, the name of a
2852_Facebook_ album is needed. The checkboxes on the left hand side determine how much
2853additional information is added to the dive profile, shown in the text box
2854on the right hand side of the panel (image *A*, below). Customise the message that will be posted
2855with the dive profile by editing any of the information. After specifying additional information
2856and verifying the text, select the _OK_ button that triggers the transfer to _Facebook_. After the transfer
2857is done, an acknowledgement dialogue appears, indicating it was successful.
2859Both the album created and the post to your timeline are marked as
2860private. In order for friends to be able to see the post,
2861log into _Facebook_ using a browser or Facebook app and change its permissions.
2863image::images/facebook2.jpg["Figure: Facebook data submission",align="center"]
2865If required, then close the _Facebook_ connection by selecting, from the *Main Menu*,
2866_Share on ->  Disconnect from -> Facebook_ (image *B* above).
2869=== Export dive information to other destinations or formats
2870For non-_Facebook exports_, the export function can be found by selecting _File ->  Export_, which brings up
2871the Export dialog. This dialog always gives two options: save ALL dives, or save only
2872the dives selected in *Dive List* panel of _Subsurface_. Click the appropriate
2873radio button (see images below).
2875image::images/Export_f20.jpg["Figure: Export dialog",align="center"]
2877A dive log or part of it can be saved in several formats:
2879* _Subsurface XML_ format. This is the native format used by _Subsurface_.
2881* Universal Dive Data Format (_UDDF_). Refer to _http://uddf.org_ for more information.
2882  UDDF is a generic format that enables communication among many dive computers
2883  and computer programs.
2885* _Divelogs.de_, an Internet-based dive log repository. In order to upload to _Divelogs.de_,
2886  you need a user-ID as well as a password for _Divelogs.de_. Log into _http://en.divelogs.de_
2887  and subscribe to this service to upload dive log data from _Subsurface_.
2889* _DiveShare_ is also a dive log repository on the Internet focusing on recreational
2890  dives. To upload dives, you need a user ID, so registration with
2891  _http://scubadiveshare.com_ is required.
2893* _CSV dive details_, that includes the most critical information of the dive
2894  profile. Included information of a dive is: dive number, date, time, buddy,
2895  duration, depth, temperature and pressure: in short, most of the information
2896  that recreational divers enter into handwritten log books.
2898* _CSV dive profile_, that includes a large amount of detail for each dive, including
2899  the depth profile, temperature and pressure information of each dive.
2901* _HTML_ format, in which the dive(s) are stored in HTML files, readable
2902  with an Internet browser. Most modern web browsers are supported, but JavaScript
2903  must be enabled. The HTML export cannot be changed or edited.
2904  It contains most of the information recorded in the dive log. However, it does not show the
2905  calculated values in the *Dive Profile* panel, e.g. dive ceiling, calculated cylinder pressure, gas
2906  pressures and MOD. The HTML export contains a search
2907  option to search the dive log. HTML export is specified on the second tab of the
2908  Export dialog (image *B* above). A typical use of this option is to export all your
2909  dives to a smartphone or a tablet where it would serve as a  portable record
2910  of dives, useful for dive companies wishing to verify the dive history of a diver,
2911  and doing away with the need to carry an original logbook
2912  when doing dives with dive companies.
2914* _Worldmap_ format, an HTML file with a world map upon which each dive and
2915  some information about it are indicated. This map is not editable. If you select any
2916  of the dive sites on the map, a summary of the dive is available in text, as shown
2917  in the image below.
2919image::images/mapview_f20.jpg["Figure: HTML Map export view",align="center"]
2921* _TeX_ format, a file for printing using the TeX typesetting
2922  software. Choose a filename with a '.tex' extension. You will also
2923  need a template file, that can be obtained from
2924  link:[] in the same
2925  directory as the '.tex' file. The file can then be processed with
2926  plain TeX (not LaTeX), for example by running 'pdftex filename.tex'
2927  on the command line.
2929image::images/texexample.png["Figure: Export to TeX", align="center"]
2932* _Image depths_, which creates a text file that contains the file names of all
2933  photos or images attached
2934  to any of the selected dives in the _Dive List_, together with the depth underwater where
2935  of each of those photos was taken.
2937* _General Settings_, under the HTML tab, provides the following options:
2939** Subsurface Numbers: if this option is checked, the dive(s) are exported with the
2940   numbers associated with them in Subsurface, Otherwise the dive(s) will be numbered
2941   starting from 1.
2942** Export Yearly Statistics: if this option is checked, a yearly statistics table will
2943   be attached to the HTML exports.
2944** Export List only: a list of dives only (date, time, depth, duration) will be exported
2945   and the detailed dive information, e.g. dive profile, will not be available.
2947* Under _Style Options_ some style-related options are available like font
2948  size and theme.
2950Export to other formats can be done through third party facilities, for
2951instance _www.divelogs.de_.
2954== Keeping a _Subsurface_ dive log in the Cloud
2956For each diver, dive log information is highly important. Not only is it a record
2957of diving activities for your pleasure, but it’s important information required
2958for admission to training courses or sometimes even diving sites. The
2959security of the dive log is critical. To have a dive log that is
2960resistant to failure of a home computer hard drive, loss or theft of equipment, the
2961Cloud is an obvious solution. This also has the added benefit that you can access your dive
2962log from anywhere in the world. For this reason, facilities such as _divelogs.de_ and _Diving Log_ offer to store
2963dive log information on the Internet.
2965_Subsurface_ includes access to a transparently integrated cloud storage
2966back end that is available to all Subsurface users. Storing and retrieving a dive log
2967from the cloud is no more difficult than accessing the dives on the local hard disk.
2968The only requirement is that you should first register as a user on the cloud.
2969To use _Subsurface cloud storage_ , follow these steps:
2971=== Create a cloud storage account
2973** Open the *Network Preferences* by selecting _File_ -> _Preferences_ -> _Network_.
2974** In the section headed _Subsurface cloud storage_, enter an email address that
2975   _Subsurface_ can use for user registration.
2976** Enter a novel password that _Subsurface_ will use to store the
2977  dive log in the cloud.
2978** Click _Apply_ to send the above email address and password to the
2979  (remote) cloud server. The server responds by sending a verification PIN to
2980  the above email address (This is the *only* occasion that _Subsurface_ uses the
2981  email address provided above). The *Network Preferences* dialog now has a new PIN text
2982   box, not visible previously.
2983** Enter the PIN in the corresponding text box in the *Network Preferences* dialog
2984(this field is only visible while the server is waiting for email
2985address confirmation)
2986** Click _Apply_ again. The _Subsurface cloud storage_ account
2987will be marked as verified and the _Subsurface cloud storage_ service is initialised for use.
2989=== Using _Subsurface cloud storage_
2991** Once the cloud storage has been initialized, two new items appear in the
2992   _File_ menu of the main menu system: _Open cloud storage_ and _Save to cloud storage_.
2993These options let you load and save data to the _Subsurface
2994cloud storage_ server.
2995** In the _Defaults Preferences_ tab, you can select to use the _Subsurface cloud
2996storage_ data as the default data file by checking the box marked _Cloud storage default file_.
2997 This means the data from
2998the _Subsurface cloud storage_ is loaded when _Subsurface_ starts and saved there when _Subsurface_ closes.
3000** _Subsurface_ keeps a local copy of the data and the cloud facility remains fully
3001functional even if used while disconnected to the Internet. _Subsurface_ simply synchronizes the
3002data with the cloud server the next time the program is used while the computer is
3003connected to the Internet.
3006=== Web access to _Subsurface cloud storage_
3008One of the nice side benefits of using _Subsurface cloud storage_ is that
3009you can also access your dive data from any web browser. Simply open
3011log in with the same email and password, and you can see an HTML export of
3012the last dive data that was synced to _Subsurface cloud storage_. The dive information
3013shown is only the contents of the recorded dive logs, NOT the calculated values
3014shown in the *Profile* panel,
3015including some cylinder pressures, deco ceilings and O~2~/He/N~2~ partial pressures.
3017=== Other cloud services
3019If you prefer not to use the integrated cloud storage of dive logs (and
3020don't need the web access), it’s simple to store
3021dive logs in the cloud using several of the existing facilities on the
3023For instance
3025offers a free application that allows
3026files on the Dropbox servers to be seen as a local folder on a desktop computer.
3028image::images/Cloud.jpg["FIGURE: Dropbox folder",align="center"]
3030The _Dropbox_ program creates a copy of the _Dropbox_ Internet Cloud content on your
3031desktop computer. When the computer is connected to the Internet, the Internet
3032content is automatically updated. Therefore both the _Open_ and _Save_ of dive logs are done
3033using the local copy of the dive log in the local _Dropbox_ folder, so there's no need
3034for a direct internet connection. If the local copy is modified, e.g. by adding a dive,
3035the remote copy in the _Dropbox_ server in the Cloud will be automatically updated whenever
3036Internet access is available.
3038In this way a dive log in
3039your _Dropbox_ folder can be accessed seamlessly from the Internet and can
3040be accessed anywhere with Internet access. Currently there are no costs
3041involved for this service. Dropbox (Windows, Mac
3042and Linux) can be installed by accessing the
3043[_Install Page on the Dropbox website_]
3044. Alternatively you can use _Dropbox_ as a way back up your dive log. To
3045Store a dive log on _Dropbox_, select _File ->  Save as_ from the _Subsurface_ main menu,
3046navigate to the _Dropbox_ folder and select the _Save_ button. To access the dive log
3047in _Dropbox_, select _File ->  Open Logbook_ from the _Subsurface_
3048main menu and navigate to the dive log file in the _Dropbox_ folder and select the
3049_Open_ button.
3051Several paid services exist on the Internet (e.g. Google, Amazon) where the same
3052process could be used for the Cloud-based storage of dive logs.
3055== Several _Subsurface_ users on one desktop computer
3056A frequent need is for two or more persons to use _Subsurface_ on the same desktop computer. For instance
3057members of a household may use the same computer or one family member may perform dive uploads for other
3058family members/friends. There are two approaches for doing this.
3060*A)* If the different users of a desktop computer do not log onto the desktop/laptop under different user names
3061  then the simplest way is for each person to use her/his own divelog file within Subsurface. In this case John
3062  would work with the _Subsurface_ file _johns-divelog_ and Joan would use _joans-divelog_. Select
3063  the appropriate dive log by selecting, from the *Main Menu*, _File -> Open logbook_ and then select your own
3064  dive log file from the list of files lower down in the menu. However, a problem arises if the users
3065  prefer different settings for _Subsurface_. For instance, one diver may prefer to see the dive ceiling in the
3066  *Profile Panel* and photos icons in the *Dive List*, while the other may not have these preferences. In addition,
3067  the cloud connection is normally unique for each _Subsurface_ installation and if more than one user wishes to save
3068  dive data on the cloud, it is inconvenient to open the *Preferences* and change the user-ID data every time
3069  the cloud is accessed. To solve these problems, launch _Subsurface_ with a _--user=<user name>_ command-line option.
3070  John can then activate _Subsurface_ with this command-line instruction:
3072        subsurface --user=John
3074while Joan can launch _Subsurface_ using:
3076        subsurface --user=Joan
3078In this case, each user's preferences, settings and cloud access information are stored separately, allowing
3079  each diver to interact with _Subsurface_ in her/his preferred way and with individual cloud access. The above
3080  process can be made user-friendly by creating a link/shortcut with a desktop icon that executes the above
3081  command-line instruction. Use of the _--user=_ option therefore enables each user to create, maintain and
3082  backup a separate dive log within a personalised user interface. This way, when each diver launches _Subsurface_,
3083  it opens with the correct dive log as well as the appropriate display and backup preferences, and each diver
3084  can access their own divelog on a mobile device using[_Subsurface-Mobile_].
3086*B)* On the other hand, if the users log onto the same computer using different userIDs and passwords (i.e. users each
3087have a separate user space), _Subsurface_ is available independently to each user and every diver automatically has a separate
3088user profile and settings, including unique cloud and _Subsurface-Mobile_ access.
3091== Printing a dive log
3093_Subsurface_ provides a simple and flexible way to print a whole dive log or only a few selected dives.
3094  Pre-installed templates or a custom written template can be used to choose where the data are fitted into the page.
3096Some decisions need to be made before printing:
3098- Should the whole dive log be printed or only part of it? If only part
3099  is required, select the required dives from the *Dive List* panel.
3100- If the dive profiles are printed, what gas partial pressure information should be shown? Select
3101  the appropriate toggle-buttons on the button bar to the left of the *Dive Profile* panel.
3103If _File ->  Print_ is selected from the Main menu, the dialogue below (image *A*) appears. Three
3104specifications are needed to get the desired information and page layout:
3106image::images/Print1_f22.jpg["FIGURE: Print dialogue",align="center"]
31081. Under _Print type_ select one of two options:
3110- _Dive list print_: Print dives from the *Dive List* panel with profiles and other information.
3111- _Statistics print_: Print yearly statistics of the dives.
31132. Under _Print options_ select:
3115- Printing only the dives selected from the dive list before
3116  activating the print dialogue by checking the box _Print only selected dives_. If this
3117  check box is *not* checked ALL dives in
3118  the *Dive List* panel are printed.
3119- Printing in color, done by checking the box with _Print in color_. If this check box
3120  is not checked, printing is in black and white.
31223. Under _Template_ select a template to be used as the page layout. There are several choices.
3123(see image *B*, above).
3125- _Table_: This prints a summary table of all dives selected (see below).
3127image::images/Print_summarylist_f22.jpg["FIGURE: Print summary table",align="center"]
3129- _Flow layout_: Print the text associated with each dive without printing the dive profiles
3130     of each dive (see below):
3132image::images/Print_flow_layout_f22.jpg["FIGURE: Print flow layout",align="center"]
3134- _One Dive_: Print one dive per page, also showing the dive profile (see below)
3136image::images/print2_f22.jpg["FIGURE: Print one dive / page",align="center"]
3139- _Two Dives_: Print two dives per page, also showing the dive profiles.
3140- _Six Dives_: Print six dives per page, also showing the dive profiles.
3142You can _Preview_ the printed page by selecting the _Preview_ button on the
3143dialogue (see image *A* at the start of this section). After preview, you can change
3144the options in the print dialogue, so the layout fits personal taste.
3146Next, select the _Print_ button (see image *A* at the start of this section). This activates the regular print
3147dialogue used by the operating system,
3148letting you choose a printer and set its properties (see image below):
3150image::images/Print_print_f22.jpg["FIGURE: Print dialog",align="center"]
3152Set the print resolution of the printer to an appropriate value by changing
3153the printer _Properties_. Finally, select the _Print_ button to print the dives.
3154Below is a (rather small) example of the output for one particular page.
3156image::images/Printpreview.jpg["FIGURE: Print preview page",align="center"]
3158=== Writing a custom print template (advanced)
3160Writing a custom template is an effective way to produce highly customized printouts. Subsurface uses HTML templates
3161to render printing. You can create a template, export a new template, import an existing template and delete an existing template by using
3162the appropriate buttons under the _Template_ dropdown list in the print dialogue. See <<S_APPENDIX_E,APPENDIX E>> for information on how
3163to write or modify a template.
3166== Configuring a dive computer
3168_Subsurface_ lets you configure a dive computer. Currently the Heinrichs-Weikamp (OSTC 2, OSTC 3) and
3169Suunto Vyper (Stinger, Mosquito, D3, Vyper, Vytec,
3170Cobra, Gekko and Zoop) family of dive computers are supported. A large number of settings of these dive computers
3171can be read and changed to different values. To begin, be sure the appropriate hardware driver
3172is installed for the dive computer (also required for downloading dives) and the device name of the dive computer is known.
3173See <<_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer,APPENDIX A>> for information on how to do this.
3175Once the dive computer is connected to the _Subsurface_ computer, select _File ->  Configure dive
3176computer_ from the _Main Menu_. Select the appropriate device name (or mount point) in the
3177dropdown list at the
3178top of the configuration panel and select the appropriate dive
3179computer model from the panel on the left-hand (see image below).
3181image::images/Configure_dc_f20.jpg["FIGURE: Configure dive computer",align="center"]
3183Using the appropriate buttons on the configuration panel, the following actions can be done:
3185 - *Retrieve available details*. This loads the existing configuration from the dive computer
3186   to _Subsurface_, showing it in the configuration panel.
3187 - *Save changes to device*. This changes the configuration of the
3188   dive computer to correspond to the information shown in the configuration panel.
3189 - *Backup*. This saves the configuration data to a file. _Subsurface_ asks for
3190   a file location and file name for the saved information.
3191 - *Restore backup*. This loads the information from a backup file and displays it
3192   in the configuration panel.
3193 - *Update firmware*. If new firmware is available for the dive computer, this is
3194   loaded into the dive computer.
3198== Setting user _Preferences_ for _Subsurface_
3200There are several user-definable settings within _Subsurface_, found by selecting
3201_File ->  Preferences_, mostly affecting the way in which _Subsurface_
3202shows dive information to the user. The settings are in
3203six panels: _Defaults_, _Units_, _Graph_, _Language_, _Network_, and _Georeference_,
3204all of which operate on the same principles: specified settings can be applied to the display of
3205the dive log by selecting _Apply_. At this stage, any new settings only apply to the present
3206session and are not saved. In order to apply
3207new settings permanently, select the _Save_ button. If you do not wish to
3208apply the new preferences, select _Cancel_.
3210=== Defaults
3212There are several headings in the *Defaults* panel:
3214image::images/Pref1_f23.jpg["FIGURE: Preferences defaults page",align="center"]
3216  ** *Lists and tables*: Specify the font type and font size of the
3217     *Dive Table* panel: decreasing the font size allows one to see more dives on a screen.
3219  ** *Dives*: For the _Default Dive Log File_ specify the directory and
3220     file name of your
3221     electronic dive log book. This is a file with filename extension of either _.xml_ or _.ssrf_. When
3222     launched, _Subsurface_ will automatically load the specified dive log book. There are three options:
3223     - _No default file_: When checked, _Subsurface_ does not automatically load a dive log at startup.
3224     - _Local default file_: When checked, _Subsurface_ automatically loads a dive log from the local hard disk.
3225     - _Cloud storage default file_: When checked, _Subsurface automatically loads the dive log from the cloud
3226       device that was initialized using the *Preferences* _Network_ tab (see below).
3228  ** *Display invalid*:  Dives can be marked as invalid (when a user wishes to hide
3229     dives that he/she doesn't consider valid dives, e.g. pool dives, but still want to
3230     keep them in the dive log). This controls whether those dives are displayed in
3231     the dive list.
3233  ** *Default cylinder*: From the dropdown list, select the default cylinder to be used in
3234     the *Equipment* tab of the *Notes* panel.
3236  ** *Animations*: Some actions in showing the dive profile are performed using
3237     animations. For instance, the axis values for depth and time change from dive to
3238     dive. When viewing a different dive, these changes in axis characteristics do not
3239     happen instantaneously, but are animated. The _Speed_ of animations can be controlled
3240     by setting this slider
3241     with faster animation speed to the left, and a 0 value representing no animation
3242     at all.
3244  ** *Clear all settings*: As indicated in the button below this heading, all settings are
3245     cleared and set to default values.
3247=== Units
3248image::images/Pref2_f23.jpg["FIGURE: Preferences Units page",align="center"]
3250Choose between metric and imperial units of depth, pressure,
3251volume, temperature and mass. By selecting the Metric or Imperial radio button
3252at the top, you can specify that all units are in the chosen measurement system.
3253Alternatively, if you select the *Personalize* radio button, units can be selected
3254independently, with some in the metric system and others in imperial.
3257of the above settings, dive time measurements can be either in seconds or minutes.
3258Choose the appropriate option. GPS coordinates can be represented either as
3259traditional coordinates (degrees, minutes, seconds) or as decimal degrees
3260Choose the appropriate option.
3262=== Graph
3263This panel has three sections:
3266image::images/Pref4_f23.jpg["FIGURE: Preferences Graph page",align="center"]
3269* *Gas pressure display setup*. Even though nitrogen and helium pressures are also included here, these items mainly pertain to oxygen management:
3270** _Thresholds_: _Subsurface_ can display graphs of the nitrogen, oxygen and the helium
3271   partial pressures during
3272   the dive, activated using the toolbar on the left of the *Dive Profile*
3273   panel. For each of these graphs, specify a threshold value. If any of the graphs go
3274   above the specified threshold, the graph is
3275   highlighted in red, indicating the particular partial pressure threshold has been exceeded.
3276   The pO~2~ threshold is probably the most important one and a value of 1.6 is commonly used.
3277** _pO~2~ in calculating MOD_ is used for calculating the maximum operative depth for a particular
3278   nitrox or trimix gas mixture. A value of 1.4 is commonly used.
3280** CCR Options: These options determine oxygen management for CCR dives:
3282*** _Dive planner default setpoint_: Specify the O~2~ setpoint for a
3283    CCR dive plan. This determines the pO~2~  maintained
3284    during a particular dive. Setpoint changes during the dive can be added via the
3285    profile context menu.
3287*** _CCR: Show setpoints when viewing pO2:_ With this checkbox activated, the pO~2~
3288    graph on the dive profile has an overlay in red which indicates the CCR setpoint
3289    values. See the section on xref:S_CCR_dives[Closed Circuit Rebreather dives].
3291*** _CCR: Show individual O~2~ sensor values when viewing pO~2~:_ Show the pO~2~
3292    values associated with each of the individual oxygen sensors of a CCR system.
3293    See the section on xref:S_CCR_dives[Closed Circuit Rebreather dives].
3295* *Ceiling display setup*. These settings mostly deal with nitrogen and helium management
3296   by determining how the decompression ceiling (ascent ceiling) is calculated and displayed:
3298** _Draw dive computer reported ceiling red_: This checkbox does exactly what it says. By default
3299   the computer reported ceiling is shown in white.
3300   Not all dive computers report ceiling values. If the dive computer does report it, it may differ
3301   from the ceilings calculated by _Subsurface_ because of the different algorithms and
3302   gradient factors, as well as the dynamic way a
3303   dive computer calculates ceilings during a dive.
3305** _Algorithm for calculating ceiling_. Choose between the Bühlmann Z1H-L16
3306   decompression model and the VPM-B model:
3307*** _VPM-B_: Provide a conservatism level for calculating the VPM-B ceiling. Values between 0
3308    (least conservative) and 4 (most conservative) are valid.
3312*** Bühlmann: Set the _gradient factors_ (GFlow and GFHigh) for calculcating the deco ceiling following
3313   the ZH-L16 algorithm. GF_Low is the gradient factor at depth and GF_High is used at the surface.
3314   At intermediate depths gradient factors between GF_Low and GF_High are used.
3315   Gradient factors add conservatism to nitrogen and helium exposure during a dive, in a
3316   similar way that many dive computers have a conservatism setting. The lower
3317   the value of a gradient factor, the more conservative the calculations are with
3318   respect to inert gas loading and the deeper the ceilings are. Gradient
3319   factors of 20/60 are considered conservative and values of 70/90 are considered
3320   harsh.
3321   In addition decide whether to check the _GFLow at max depth_ box. If checked, GF_Low is used for the
3322   deepest dive depth and linearly increased up to the GF_High value at the surface. If unchecked,
3323   GF_Low is used between the deepest dive depth and the first deco stop, after which the
3324   gradient factor linearly increases up to the GF_High value at the surface. For more information see:
3326 ***[Understanding M-values by Erik Baker, _Immersed_ Vol. 3, No. 3.]
3328 *** link:[Gradient factors for dummies, by Kevin Watts]
3330 **  _pSCR options_. These preferences determine how passive semi-closed circuit (pSCR) dives
3331    are planned and how the pSCR deco ceiling is calculated:
3333 *** _Metabolic rate:_ this is the
3334    volume of oxygen used by a diver during a minute. Set this value for pSCR dive planning
3335    and decompression calculations.
3337 *** _pSCR ratio:_ The dilution ratio (or dump ratio) is the ratio of gas released to the
3338    environment to that of the gas recirculated to the diver. A 1:10 ratio is commonly used.
3340* *Misc*
3342** _Show unused cylinders in Equipment Tab_: This checkbox allows display of information about unused cylinders when viewing the
3343*Equipment Tab*. If this box is not checked, and if any cylinders entered using the *Equipment Tab* are not used (e.g. there
3344was no gas switch to such a cylinder), then these cylinders are omitted from that list.
3345**  _Show mean depth_: If this box is checked, the *Dive Profile* panel contains a grey line that shows
3346    the mean depth of the dive, up to any time instant during the dive. Normally this is a u-shaped line indicating the deepest mean depth just before
3347   ascent.
3350=== Language
3351Choose a language that _Subsurface_ will use.
3353image::images/Pref3_f23.jpg["FIGURE: Preferences Language page",align="center"]
3355Check the _System Default_ language i.e. the language of the underlying operating system
3356if this is appropriate. This is the default setting in _Subsurface_.
3357To change it, uncheck this checkbox and pick a language / country
3358combination from the list of locations. The _Filter_ text box
3359to list similar languages. For instance there are several system variants of English
3360or French. *This particular preference requires a restart of _Subsurface_ to take
3363In this section also specify appropriate date an time formats for showing dive details.
3365=== Network
3366This panel facilitates communication between _Subsurface_ and data sources on the Internet.
3367This is important, for instance, when _Subsurface_ needs to communicate with web
3368services such as Cloud storage or the <<S_Companion,_Subsurface
3369Companion app_>>. These Internet requirements are determined by your type of
3370connection to the Internet and by the Internet Service Provider (ISP) used.
3371Your ISP should provide the appropriate information.
3373image::images/Pref5_f23.jpg["FIGURE: Preferences Network page",align="center"]
3375This dialogue has three sections:
3377** _Proxy type_:
3378If a proxy server is used for Internet access, the type of proxy needs to be selected from the dropdown list,
3379after which the IP address of the host and the appropriate port number should
3380be provided. If the proxy server uses authentication, the appropriate userID and
3381password are required so that _Subsurface_ can automatically pass
3382through the proxy server to access the Internet. This information is usually obtained
3383from your ISP.
3385** _Subsurface cloud storage_: To store your dive log in the cloud, a valid email address
3386   and password are required. This lets _Subsurface_ email security information
3387   regarding cloud storage to you, and to set up cloud storage appropriately.
3388   Two additional options are given:
3389   - _Sync to cloud in the background_: This option allows saving of dive information to the cloud storage
3390   while you do other things within _Subsurface_.
3391   - _Save password locally_: This allows local storage of the cloud storage password. Note that this
3392   information is saved in raw text form, not encoded in any way.
3394** _Subsurface web service_: When you subscribe to the <<S_Companion,Subsurface web service>>, a very
3395     long and hard-to-remember userID is issued. This is the place to save that userID. By
3396     checking the option _Save User ID locally?_, you ensure a local copy of that userID is saved.
3398=== Georeference
3400_Subsurface_ provides a geo-lookup service (that is, given the coordinates of a dive site) derived from
3401a click on the *Dive Map panel* at the bottom right of the _Subsurface_ window, or from a GPS instrument or
3402from the _Subsurface_ Companion app). A search on the Internet is done to find
3403the name of the closest known location. This function only works if _Subsurface_ has an
3404Internet connection. The preference of the dive site name can be configured, e.g. _Country/State/City_
3405or _City/State/Country_ (see image below).
3407image::images/Pref7_f23.jpg["FIGURE: Georeference panel",align="center"]
3410== The _Subsurface_ dive planner
3411Dive planning is an advanced feature of _Subsurface_, accessed by selecting
3412_Log ->  Plan Dive_ from the main menu. It allows calculation of
3413inert gas load during a dive by using the Bühlmann ZH-L16 algorithm with the addition
3414of gradient factors as implemented by Erik Baker.
3420The _Subsurface_ dive planner IS CURRENTLY EXPERIMENTAL
3421and assumes the user is already familiar with the _Subsurface_
3422user interface. It is explicitly used under the following conditions:
3424- The user is conversant with dive planning and has the necessary training to perform
3425  dive planning.
3426- The user plans dives within his/her certification limits.
3427- Dive planning makes large assumptions about the characteristics of the _average person_
3428  and cannot compensate for individual physiology or health or personal history or
3429  life style characteristics.
3430- The safety of a dive plan depends heavily on the way in which the planner is used.
3431- The user is familiar with the user interface of _Subsurface_.
3432- A user who is not absolutely sure about any of the above requirements should not use
3433  this feature.
3436=== The _Subsurface_ dive planner screen
3438Like the _Subsurface_ dive log, the planner screen is divided into several sections (see image below). The *setup*
3439parameters for a dive are entered into the sections on the left hand side of the screen.
3440They are: Available Gases, Rates, Planning, Gas Options and Notes.
3442At the top right hand is a green *design panel* on which the profile of the dive can be
3443manipulated directly by dragging and clicking as explained below. This feature makes the
3444_Subsurface_ dive planner unique in ease of use.
3446At the bottom right is a text panel with a heading of _Dive Plan Details_. This is where the details of
3447the dive plan are provided in a way that can easily be copied to other software. This is also where
3448any warning messages about the dive plan are printed.
3450image::images/PlannerWindow1_f20.jpg["FIGURE: Dive planner startup window",align="center"]
3453=== Open circuit dives
3455-  Towards the center bottom of the planner (circled in blue in the image above) is a dropbox with three options. Select the appropriate one of these:
3456 ** Open Circuit (the default)
3457 ** CCR
3458 ** pSCR
3460- Choose the Open Circuit option.
3461- In the top left-hand area of the planning screen, be sure the constant dive parameters are
3462  appropriate. These are: Start date and time of the intended dive, Atmospheric Pressure and Altitude
3463  above sea level of the dive site. The atmospheric pressure can also be entered as an altitude
3464  in meters, assuming a sea-level atmospheric pressure of 1.013 bar.
3466- In the table labelled _Available Gases_, add the information of the cylinders to be used
3467  as well as the gas composition within that cylinder. This is done in a similar way as for
3468  <<cylinder_definitions,providing cylinder data for dive logs>>. Choose the cylinder type by
3469  double clicking the cylinder type and using the dropdown list, then specify the work
3470  pressure of this cylinder. By leaving the oxygen concentration (O2%) field empty,
3471  the cylinder is assumed to contain air. Otherwise enter the oxygen and/or helium
3472  concentration in the boxes provided in this dialogue. Add additional cylinders by using the
3473  "+" icon to the top right-hand of the dialogue.
3475- The _Available Gases_ table includes three gas depth fields, labelled:
3476 ** Deco switch at: the switch depth for deco gases. Unless overridden by the user, this will be
3477    automatically calculated based on the Deco pO₂ preference (default 1.6 bar)
3478 ** Bot. MOD: the gas Maximum Operating Depth (MOD) if it is used as a bottom mix. Automatically
3479    calculated based on the Bottom pO₂ preference (default 1.4 bar). Editing this field will modify the
3480    O₂% according to the depth set. Set to ''*'' to calculate the best O₂% for the dive maximum depth.
3481 ** MND: the gas Maximum Narcotic Depth (MND). Automatically calculated based on the Best Mix END
3482    preference (default 30m / 98 ft). Editing this field will modify the He% according to the depth set.
3483    Set to ''*'' to calculate the best He% for the dive maximum depth.
3485- The profile of the planned dive can be created in two ways:
3486 *  Drag the waypoints
3487    (the small white circles) on the existing dive profile to represent the dive. Additional
3488    waypoints can be created by double-clicking the existing dive profile. Waypoints can be deleted
3489    by right-clicking a particular waypoint and selecting the _delete_ item from the resulting
3490    context menu.
3491 *  The most efficient way to create a dive profile is to enter the appropriate values into the table
3492    marked _Dive planner points_. The first line of the table represents the duration and the final
3493    depth of the descent from the surface. Subsequent segments describe the bottom phase of the dive.
3494    The _CC set point_ column is only relevant for closed circuit divers.
3495    The ascent is usually not specified because this is what the planner is supposed to calculate.
3496    Add additional segments to the profile by selecting the "+" icon at the top right hand of the
3497    table. Segments entered into the _Dive planner points_ table automatically appear in the *Dive
3498    Profile* diagram.
3500==== Recreational dives
3502Recreational mode is what comes closest to planning a dive based on the non-decompression limit (NDL).
3503It computes the maximum time a diver can stay at the current depth without needing mandatory decompression
3504stops and without using more than the existing gas (minus a reserve). The planner automatically takes
3505into account the nitrogen load incurred in previous dives. But conventional dive tables are also used in a
3506way that can take into account previous dives. Why use a dive planner for recreational dives? Using
3507recreational dive tables, the maximum depth of a dive is taken into account. But few dives are
3508done at a constant depth corresponding to the maximum depth (i.e. a "square" dive profile). This means
3509dive tables overestimate the nitrogen load incurred during previous dives. The _Subsurface_
3510dive planner calculates nitrogen load according to the real dive profiles of all uploaded previous dives,
3511in a similar way as dive computers calculate nitrogen load during a dive. This means that the diver gets 'credit,'
3512in terms of nitrogen load, for not remaining at maximum depth during
3513previous dives, so a longer subsequent dive can be planned.
3514 For the planner to work it's crucial to upload all previous dives
3515onto _Subsurface_ before doing dive planning.
3516To plan a dive, the appropriate settings need to be defined.
3518- Ensure the date and time is set to that of the intended dive. This allows calculation of
3519the nitrogen load incurred during previous dives.
3521- Immediately under the heading _Planning_ are two checkboxes _Recreational_ and _Safety Stop_.
3522  Check these two boxes.
3524- Then define the cylinder size,
3525  the gas mixture (air or % oxygen) and the starting cylinder pressure in the top left-hand
3526  section of the planner under _Available gases_.
3528- The planner calculates whether the specified cylinder contains enough air/gas to complete
3529  the planned dive. In order for this to be accurate, under _Gas options_, specify an appropriate
3530  surface air consumption (SAC) rate for _Bottom SAC_. Suitable values are between 15 l/min and 30 l/min,
3531  with novice divers or difficult dives requiring SAC rates closer to 30l/min.
3533- Define the amount of gas the cylinder must have at the end of the bottom section of the
3534  dive just before ascent. A value of 50 bar is often used. The reason for this reserve gas is to provide for the possible
3535  need to bring a buddy to the surface using gas sharing. How much gas is used in
3536  sharing depends on the depth of the ascent. This can be difficult to estimate, so most agencies assume a
3537  fixed amount of gas, or actually of pressure e.g. 40 or 50 bar or 25% or 33% (rule of thirds). But _Subsurface_ can do better
3538  because it knows about the ascent and that is why we add the amount of gas during the ascent (i.e. the "deco gas“).
3539  Subsurface still uses a fixed pressure "reserve" but that's supposed to be for the additional gas used when
3540  there's a problem and your pulse rate goes up when you start to buddy breathe. This reserve amount is user configurable.
3542- Define the depth of the dive by dragging the waypoints (white dots) on the dive profile or
3543  (even better) defining the appropriate depths using the table under _Dive planner points_ as
3544  desribed under the previous heading. If
3545  this is a multilevel dive, set the appropriate dive depths to represent the dive plan by adding
3546  waypoints to the dive profile or by adding appropriate dive planner points to the _Dive Planner Points_
3547  table. _Subsurface_ will automatically extend the bottom section of the dive to the maximum
3548  duration within the no-decompression limits (NDL).
3550- The ascent speed can be changed. The default ascent speeds are those considered safe for recreational
3551  divers.
3553The dive profile in the planner shows the maximum dive time within no-deco limits using the
3554Bühlmann ZH-L16 algorithm and the gas and depth settings specified as described above. The _Subsurface_ planner
3555allows rapid assessment of dive duration as a function of dive depth, given the nitrogen load incurred during previous dives. The
3556dive plan includes estimates of the amount of air/gas used, depending on the cylinder settings specified
3557under _Available gases_. If the initial cylinder pressure is set to 0, the dive duration shown is the
3558true no-deco limit (NDL) without taking into account gas used during the dive. If the surface above the dive profile is RED
3559it means that recreational dive limits are exceeded and either the dive duration or the dive depth needs to be reduced.
3561Below is an image of a dive plan for a recreational dive at 30 meters. Although the no-deco limit (NDL) is 23
3562minutes, the duration of the dive is limited by the amount of air in the cylinder. That is shown in the
3563text box at the bottom right of the panel, requiring sufficient air for buddy-sharing during ascent.
3565image::images/rec_diveplan.jpg["FIGURE: A recreational dive plan: setup",align="center"]
3567==== Non-recreational open circuit dives, including decompression
3569Non-recreational dive planning involves exceeding the no-deco limits and/or using multiple breathing gases.
3570These dives are planned in three stages:
3572*a) Nitrogen management*: This is done by specifying the rates for descent and ascent,
3573as well as the deco model (GFLow, GFHigh or Conservatism level) under the headings _Rates_ and _Planning_
3574to the bottom left of the planning screen. Two deco models are supported the Bühlmann model and the VPM-B
3575model. Select one of the two models. When selecting the Bühlmann model, the gradient factors (GFhigh and GFlow
3576need to be specified. Initially, the GFHigh and GFLow values in the _Preferences_
3577panel of _Subsurface_ is used. If these are changed within the planner (see _Gas Options_ within
3578the planner), the new values are
3579used without changing the original values in the _Preferences_.
3580Gradient Factor settings strongly affect the calculated ceilings and their depths.
3581A very low GFLow value brings on decompression stops early during the dive.
3582 ** For more information about Gradient factors, see the section on xref:S_GradientFactors[Gradient Factor Preference settings].
3584If the VPM-B model is selected, the Conservatism_level needs to be specified on a scale of 0 (least conservative) to 4 (most conservative).
3585This model tends to give deco stops at deeper levels than the Bühlmann model and often results in slightly shorter
3586dive durations than the Bühlmann model, albeit at the cost of higher tissue compartment pressures in the slow tissues.
3587When selecting one of these models, keep in mind they are NOT exact physiological models but
3588only mathematical models that appear to work in practice.
3590For more information external to this manual see:
3592 * link:[Understanding M-values by Erik Baker, _Immersed_ Vol. 3, No. 3.]
3593 * link:[Gradient factors for dummies, by Kevin Watts]
3594 * link:[_Deco for Divers_, by Mark Powell (2008). Aquapress] Southend-on-Sea, UK. ISBN 10: 1-905492-07-3.
3595An excellent non-technical review that discusses both the Bühlmann deco model and the VPM-B model.
3597The ascent rate is critical for nitrogen off-gassing at the end of the dive and is specified
3598for several depth ranges, using the mean depth as a yardstick. The mean depth
3599of the dive plan is shown by a light grey line on the dive profile. Ascent rates
3600at deeper levels are often in the range of 8-12 m/min, while ascent rates near the surface are
3601often in the range of 4-9 m/min. The descent rate is also specified. If the option _Drop to first depth_
3602is activated, the descent phase of the planned dive will be at the maximal descent rate specified
3603in the _Rates_ section of the dive setup.
3605*b) Oxygen management*: In the *Gas Options* part of the dive specification, the maximum partial
3606pressure for oxygen needs to be specified for the
3607bottom part of the dive (_bottom po2_) as well as for the decompression part of the dive (_deco po2_).
3608Commonly used values are 1.4 bar for the bottom part of the dive and 1.6 bar for any decompression
3609stages. Normally, a partial pressure of 1.6 bar is not exceeded. PO2 settings and the depth at which switching to a gas takes place can also be edited in the
3610_Available Gases_ dialog. Normally the planner decides on switching to a new gas when, during
3611ascent, the partial pressure of the new gas has decreased to 1.6 bar.
3613*c) Gas management*: With open-circuit dives this is a primary
3614consideration. Divers need to keep within the limits of the amount of
3615gas within the dive
3616cylinder(s), allowing for an appropriate margin for a safe return to the surface, possibly
3617sharing with a buddy. Under the _Gas Options_ heading, specify the best (but conservative) estimate
3618of your surface-equivalent air consumption (SAC, also termed RMV) in
3619liters/min (for the time being, only SI units are supported). Specify the SAC during the
3620bottom part of the dive (_bottom SAC_) as well as during the decompression or safety stops of the
3621dive (_deco SAC_). Values of 15-30 l/min are common. For good gas management, a guess
3622is not sufficient and you needs to
3623monitor gas consumption on a regular basis, dependent on different dive conditions and/or equipment.
3624The planner calculates the total volume of gas used during the dive and issues a warning
3625if you exceeds the total amount of gas available. Good practice demands that divers not dive to
3626the limit of the gas supply but that an appropriate reserve is kept
3627for unforeseen circumstances.
3628For technical diving, this reserve can be up to 66% of the total available gas.
3630Now you can start the detailed time-depth planning of the dive. _Subsurface_ offers an unique
3631graphical interface for doing planning. The mechanics are
3632similar to hand-entering a dive profile in the dive log part of _Subsurface_. Upon activating the
3633planner, a default dive of depth 15 m for 20 min is offered in the blue design surface to the top
3634right hand of the screen. The white dots (waypoints) on the
3635profile can be dragged with a mouse. Create more waypoints by double-clicking on the profile
3636line and ensuring the profile reflects the intended dive. Drag the waypoints to represent
3637the depth and duration of the dive. It is NOT necessary to specify the ascent part of the dive
3638since the planner calculates this, based on the existing settings.
3639If any of the management limits (for nitrogen, oxygen or gas) are exceeded, the surface
3640above the dive profile changes from BLUE to RED.
3642Each waypoint on the dive profile creates a _Dive Planner Point_ in the table on the
3643left of the dive planner panel. Ensure the _Used Gas_ value in each row
3644of that table corresponds to one of the gas mixtures specified in the _Available Gases_ table.
3645Add new waypoints until the main features of the dive have been completed, e.g. the
3646bottom time segment and deep stops (if these are implemented). Leave the remaining
3647waypoints on the ascent to _Subsurface_. In most cases _Subsurface_
3648computes additional way points in order to fulfill decompression requirements for that
3649dive. A waypoint can be moved by selecting it and by using the arrow keys.
3650The waypoints listed in the _Dive Planner Points_ dialogue can be edited by hand in
3651order to get a precise presentation of the dive plan. In fact, it is sometimes more easy to create the
3652whole dive profile by editing the _Dive Planner Points_ dialog.
3654Show any changes in gas cylinder used by indicating gas changes as explained
3655in the section <<S_CreateProfile,hand-creating a dive profile>>. These changes should
3656reflect the cylinders and gas compositions defined in the table with _Available Gases_.
3657If two or more gases are used, automatic gas switches will be suggested during the ascent to
3658the surface. These changes can be deleted by right-clicking the gas change and
3659manually creating a gas change by right-clicking on the appropriate
3662A non-zero value in the "CC set point" column of the table of dive planner points
3663indicates a valid setpoint for oxygen partial pressure and that the segment
3664is dived using a closed circuit rebreather (CCR). If the last manually entered
3665segment is a CCR segment, the decompression phase is computed assuming the diver
3666uses a CCR with the specified set-point. If the last segment (however
3667short) is on open circuit (OC, indicated by a zero set-point) the
3668decompression is computed in OC mode and the planner only considers gas
3669changes in OC mode.
3671Below is an example of a dive plan to 45m using EAN26, followed by an ascent using EAN50
3672and using the settings as described above.
3674image::images/DivePlanner2_f20.jpg["FIGURE: Planning a dive: setup",align="center"]
3676Once the above steps have been completed, save by clicking the _Save_ button
3677towards the top middle of the planner. The saved dive plan will appear
3678in the *Dive List* panel of _Subsurface_.
3680*The dive plan details*
3682On the bottom right of the dive planner, under _Dive Plan Details_, the exact details
3683of the dive plan are provided. These details may be modified by checking any of the
3684options under the _Notes_ section of the dive planner, immediately to the left
3685of the _Dive Plan Details_. If a _Verbatim dive plan_
3686is requested, a detailed sentence-level explanation of the dive plan is given. If any
3687of the management specifications have been exceeded during the planning, a warning
3688message is printed underneath the dive plan information.
3690If the option _Display segment duration_ is checked, then the duration of each depth
3691level is indicated in the _Dive Plan Details_. This duration INCLUDES the transition
3692time to get to that level. However, if the _Display transition in deco_ option is checked,
3693the transitions are shown separately from the segment durations at a particular level.
3695=== Planning pSCR dives
3697To plan a dive using a passive semi-closed rebreather (pSCR), select _pSCR_ rather than
3698_Open circuit_ in the dropdown list.
3699The parameters of the pSCR dive can be set by selecting  _File ->   Preferences ->   Graph_
3700from the main menu, where the gas consumption calculation takes into account the pSCR dump
3701ratio (default 1:10) as well as the metabolic rate. The calculation also takes the oxygen drop
3702accross the mouthpiece of the rebreather into account. If the
3703pO~2~ drops below what is considered safe, a warning appears in the _Dive plan
3704details_. A typical pSCR configuration is with a single cylinder and one or more bail-out
3705cylinders. Therefore the setup of the _Available gases_ and the _Dive planner points_ tables
3706are very similar to that of a CCR dive plan, described below. However, no oxygen setpoints
3707are specified for pSCR dives. Below is a dive plan for a pSCR dive. The dive is comparable
3708to that of the CCR dive below, but note the longer ascent duration due to the lower oxygen
3709in the loop due to the oxygen drop across the mouthpiece of the pSCR equipment.
3711image::images/Planner_pSCR1_f20.jpg["FIGURE: Planning a pSCR dive: setup",align="center"]
3714=== Planning CCR dives
3716To plan a dive using a closed circuit rebreather, select the _CCR_ option in the dropdown
3717list, circled in blue in the image below.
3719*Available gases*: In the _Available gases_ table, enter the cylinder information for the
3720diluent cylinder and for any bail-out cylinders. Do NOT enter the information for the oxygen
3721cylinder since it is implied when the _CCR_ dropdown selection is made.
3723*Entering setpoints*: Specify a default setpoint in the Preferences tab, by selecting _File ->  Preferences ->  Graph_ from
3724the main menu. All user-entered segments in the _Dive planner points_ table
3725use the default setpoint value. Then, different setpoints can be specified for dive segments
3726in the _Dive planner points_ table. A zero setpoint
3727means the diver bails out to open circuit mode for that segment. Decompression is always calculated
3728using the setpoint of the last manually entered segment. So, to plan a bail out ascent for a
3729CCR dive, add a one-minute dive segment to the end with a setpoint value of 0. The decompression
3730algorithm does not switch deco-gases automatically while in CCR mode (i.e. when a positive setpoint is specified) but
3731this is calculated for bail out ascents.
3733The dive profile for a CCR dive may look something like the image below.
3735image::images/Planner_CCR1_f20.jpg["FIGURE: Planning a CCR dive: setup",align="center"]
3737Note that, in the _Dive plan details_, the gas consumption for a CCR segment is not calculated,
3738so gas consumptions of 0 liters are the norm.
3741=== Modifying an existing dive plan
3743Normally, when a dive plan has been saved, it is accessible from the *Dive List*, like any
3744other dive log. Within the *Dive List* there is no way to change a saved dive plan.
3745To change a dive plan, select it on the *Dive List*. Then, in the main menu,
3746select _Log ->  Re-plan dive_. This will open the selected dive plan within the dive planner,
3747allowing changes to be made and saved as usual.
3749In addition, there is the option "Save new". This keeps the original
3750planned dive and adds a (possibly modified, - earlier dives are now taken into account -) copy to the dive list. If
3751that copy is saved with the same start time as the original, the two
3752dives are considered two versions of the same dive and do not
3753influence other each during decompression calculation (see next section).
3755=== Planning for repetitive dives
3757Repetitive dives can easily be planned if the dates and start times of the
3758repetitive dive set
3759are specified appropriately in the top left-hand _Start Time_ field. _Subsurface_
3760calculates the gas loading figures and the affect of the first dive is
3761evaluated on later dives.
3763If you have just completed a long/deep dive and are planning
3764another dive, then highlight, in the *Dive List*, the dive that has just been logged
3765then activate the planner. Depending on the start time of the planned dive,
3766the planner takes into account the gas loading during the completed dive
3767and plans accordingly.
3769If only a few standard configurations are used (e.g. in GUE), then a template dive can
3770be created conforming to one of the configurations. If you want to plan a dive using
3771this configuration, highlight the template dive in the *Dive List* and activate the
3772planner: the planner takes into account the configuration in the highlighted dive.
3774=== Printing the dive plan
3776Selecting the _Print_ button in the planner allows printing of the _Dive Plan Details_
3777for wet notes. You can also cut and paste the _Dive Plan Details_ to
3778include in a text file or word processing document.
3780Dive plans have many characteristics in common with dive logs (dive profile, dive notes, etc).
3781After a dive plan has been saved, the dive details and gas calculations are saved in
3782the *Notes* tab. While a dive plan is being designed, it can be printed using
3783the _Print_ button in the dive planner. This prints the dive details and gas calculations
3784in the _Dive Plan Details_ panel of the dive planner. However, after the plan has been saved, it is
3785represented in a way very similar to a dive log and the gas calculations cannot be
3786accessed in the same way as during the planning process. The only way to print the
3787dive plan is to use the _File ->  Print_ function on the main menu in the
3788same way as for dive logs or by copy and paste to a word processor.
3791=== Saving a dive with its dive plan
3793In the section dealing with <<S_MultipleDiveComputers, dives using more than one dive computer>>
3794we discussed the way in which multiple profiles for a single dive can be viewed using the
3795left-arrow and right-arrow keyboard keys. A similar method can be used for saving a dive plan
3796with the profile of the actual dive, once this has been uploaded into _Subsurface_.
3797In order to do this:
3799- Do the dive planning and save the final plan in the _Dive List_.
3800- After diving, upload the dive data from the dive computer.
3801- Change the date and time of the _dive plan_ to coincide with that of the
3802  real-life dive from the _dive computer_.
3803- In the _Dive List_, highlight the dive plan as well as the data for the real dive
3804  and merge the two dives, making use of the Dive List Context Menu
3805  (available by righ-clicking a dive).
3807The text version of the dive plan is appended to the Notes in the _Notes Tab_. With this
3808merged dive highlighted in the _Dive List_, switch
3809between the planned profile and the real-life profile using the righ-arrow/left-arrow keyboard keys.
3811== Running _Subsurface_ from the command-line
3812_Subsurface_ can be launched from the command-line to set some specialised settings or as
3813part of an script-based automated process for manipulating a dive log. The format for launching _Subsurface_ from the
3814command-line is:
3816        subsurface [options] [logfile ...] [--import logfile ...]
3818The options include:
3820|*Command-line option*|*Description*
3821|--help|Print a summary of the command-line options
3822| -h|Print a summary of the command-line options
3823|--import logfile ...|A file name before this option is treated as an existing dive log, everything after is imported into the existing dive log
3824|--verbose|Print debug information while running _Subsurface_
3825| -v|Print debug information while running _Subsurface_
3826| -v -v| Print even more debug information while running _Subsurface_
3827|--version|Prints the current version of _Subsurface_.
3828|--survey|Opens the xref:S_UserSurvey[user survey] immediately after starting _Subsurface_
3829|--user=<username>|Choose the xref:S_user_space[configuration space] of user <username>
3830|--cloud-timeout=<duration>|Set the timeout for cloud connection (0 < duration < 60). This enables longer timeouts for slow Internet connections
3831|--win32console|Create a dedicated console if needed (Windows only). Add this option before everything else
3834== Description of the Subsurface Main Menu items
3836This section describes the functions and operation of the items in the Main Menu
3837of Subsurface. Several of the items below are links to sections of this manual
3838dealing with the appropriate operations.
3840=== File
3841- <<S_NewLogbook,_New Logbook_>> - Close the currently open dive logbook and
3842  clear all dive information.
3843- _Open logbook_ - Open the file manager to select a dive
3844  logbook to open.
3845- _Save_ - Save the dive logbook currently open.
3846- _Save as_ - Save the current logbook under a different file name.
3847- _Open cloud storage_ - Open the dive log previously saved in <<S_Cloud_storage,_Cloud storage_>>.
3848- _Save to cloud storage_ - Save the current dive log to <<S_Cloud_storage,_Cloud storage_>>.
3849- _Take cloud storage online_ - ******************************************************
3850- _Close_ -  Close the dive logbook currently open.
3851- <<S_ExportLog,_Export_>> -  Export the currently open dive logbook (or
3852  the selected dives in the logbook) to one of several formats.
3853- <<S_PrintDivelog,_Print_>> -  Print the currently open logbook.
3854- <<S_Preferences,_Preferences_>> -  Set the _Subsurface_ preferences.
3855- <<S_FindMovedImages, _Find moved images_>> - If photos taken during dives have been moved to
3856      a different disk or directory, locate them and link them to the appropriate dives.
3857- <<S_Configure,_Configure dive computer_>> - Edit the configuration of a dive computer.
3858- _Quit_ - Quit _Subsurface_.
3861=== Edit
3862- The Edit option allows one to undo or redo an action, e.g. deleting dives.
3864=== Import
3865- <<S_ImportDiveComputer,_Import from dive computer_>> - Import dive information
3866  from a dive computer.
3867- <<Unified_import,_Import Log Files_>> - Import dive information from a file in
3868  in a _Subsurface_-compatible format.
3869- <<S_Companion,_Import GPS data from Subsurface web service_>> - Load GPS
3870  coordinates from the _Subsurface_ mobile phone app.
3871- <<S_ImportingDivelogsDe,_Import from Divelogs.de_>> - Import dive information
3872  from _www.Divelogs.de_.
3874=== Log
3875- <<S_EnterData,_Add Dive_>> - Manually add a new dive to the *Dive List* panel.
3876- _Edit dive_ - Edit a dive where the profile was entered by hand and not from a dive computer.
3877- <<S_DivePlanner,_Plan Dive_>> - Plan  dives.
3878- <<S_Replan,_Edit dive in planner_>> - Edit a dive plan that has been saved into the *Dive List*.
3879- <<S_CopyComponents,_Copy dive components_>> - Copy information
3880  from several fields of a dive log onto the clipboard.
3881- _Paste dive components_ - Paste, into the selected dives in the *Dive List*,
3882  the information copied using the _Copy dive components_ option.
3883- <<S_Renumber,_Renumber_>> - Renumber the dives listed in the *Dive List*
3884  panel.
3885- <<S_Group,_Auto Group_>> - Group the dives in the *Dive List* panel into dive
3886  trips.
3887- <<S_DeviceNames,_Edit Device Names_>> - Edit the names of dive computers to coordinate your logs.
3888- <<S_Filter,_Filter divelist_>> - Select only some dives, based on specific tags or dive criteria.
3890=== View
3891- <<S_ViewPanels,_All_>> - View the four main _Subsurface_ panels
3892  all at once.
3893- <<S_ViewPanels,_Dive List_>> - View only the *Dive List* panel.
3894- <<S_ViewPanels,_Profile_>> - View only the *Dive Profile* panel.
3895- <<S_ViewPanels,_Info_>> - View only the *Notes* panel.
3896- <<S_ViewPanels,_Globe_>> - View only the *World Map* panel.
3897- _Yearly Statistics_ - Display summary statistics about dives during this and past
3898  years.
3899- _Prev DC_ - Switch to data from previous dive computer, if a single dive was logged from more than one.
3900  See the sections on <<S_MultipleDiveComputers,using multiple dive computers for the same dive>> and <<S_MergeDivePlan,
3901  Saving an uploaded dive with its dive plan>>.
3902- _Next DC_ - Switch to next dive computer.
3903- _Full Screen_ - Toggles Full Screen mode.
3905=== Share on
3906- <<S_Facebook,_Facebook_>> - Share the currently selected dive on your Facebook timeline.
3908=== Help
3909- _About Subsurface_ - Show a panel with the version number of _Subsurface_ as
3910  well as licensing information.
3911- _Check for updates_ - Find out whether a newer version of Subsurface is available
3912  on the[_Subsurface_ web site].
3913- <<S_UserSurvey,_User survey_>>  - Help to make _Subsurface_ even better by taking part in our user survey
3914  or by completing another survey if your diving habits have changed.
3915- _User manual_ - Open a window showing this user manual.
3919== APPENDIX A: Operating system specific information for importing dive information from a dive computer.
3921=== Make sure that the OS has the required drivers installed
3924The operating system of the desktop computer needs the appropriate drivers in
3925order to communicate with the dive computer, the way the dive
3926computer prefers (e.g. Bluetooth, USB, infra-red).
3928        * On Linux users need to have the correct kernel
3929          module loaded. Most distributions will do this automatically, so the
3930          user does not need to load kernel modules. However, some communication
3931          protocols require an additional driver, especially for rarely used
3932          technology such as infra-red.
3934        * On Windows, the OS should offer to download the correct
3935          driver once the user connects the dive computer to the USB port and
3936          operating system sees the equipment for the first time.
3938        * On a Mac users sometimes have to manually hunt for the correct
3939          driver. For example the correct driver for the Mares Puck
3940          devices or any other dive computer using a USB-to-serial interface
3941          based on the Silicon Labs CP2101 or similar chip can be found as
3942          _Mac_OSX_VCP_Driver.zip_ at the
3943[Silicon Labs document and software repository].
3946=== How to Find the Device Name for USB devices and set its write permission
3949When connecting a dive computer by using a USB connector, usually
3950_Subsurface_ will either propose a drop down list with the
3951correct device name (or mount point for the Uemis Zurich), or it will
3952disable the device select drop down if no device name is needed at
3953all. In the rare cases where this doesn't work, here are some
3954ways to find out what the device name is:
3956.On Windows:
3958Simply try COM1, COM2, etc. The drop down list should contain all connected COM
3961.On MacOS:
3963The drop down box should find all connected dive computers.
3965.On Linux:
3967There is a definitive way to find the port:
3969 - Disconnect the USB cable from the dive computer
3970 - Open a terminal
3971 - Type the command: 'dmesg' and press enter
3972 - Plug in the USB cable of the dive computer
3973 - Type the command: 'dmesg' and press enter
3975A message similar to this one should appear:
3977        usb 2-1.1: new full speed USB device number 14 using ehci_hcd
3978        usbcore: registered new interface driver usbserial
3979        USB Serial support registered for generic
3980        usbcore: registered new interface driver usbserial_generic
3981        usbserial: USB Serial Driver core
3982        USB Serial support registered for FTDI USB Serial Device
3983        ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected
3984        usb 2-1.1: Detected FT232BM
3985        usb 2-1.1: Number of endpoints 2
3986        usb 2-1.1: Endpoint 1 MaxPacketSize 64
3987        usb 2-1.1: Endpoint 2 MaxPacketSize 64
3988        usb 2-1.1: Setting MaxPacketSize 64
3989        usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB3
3990        usbcore: registered new interface driver ftdi_sio
3991        ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
3993The third line from the bottom shows that the FTDI USB adapter is
3994detected and connected to +ttyUSB3+. This information can now be used in
3995the import settings as +/dev/ttyUSB3+ which directs Subsurface to the correct
3996USB port.
3998Ensuring the user has write permission to the USB serial port:
4000On Unix-like operating systems the USB ports can only be accessed by users who
4001are members special group that can be e.g.
4002+dialout+ or +uucp+. This can be verified by listing the appropriate
4003device permissions e.g. by +ls -l /dev/ttyUSB0+. Note that the number in
4004the file name depends on how many USB devices you have connected, and
4005must be adjusted appropriately.
4006If you are not root, you may not be a member of
4007that group and
4008won't be able to use the USB port. Let us assume your username is 'johnB'.
4010 - As root, type: +usermod -a -G dialout johnB+  (Ubuntu users: +sudo usermod
4011-a -G dialout johnB+)
4012This makes johnB a member of the +dialout+ group.
4013 - Type: +id johnB+     This lists all the groups that johnB belongs to and
4014verifies that
4015the appropriate group membership has been created. The +dialout+ group should
4016be listed
4017among the different IDs.
4018 - Under some circumstances this change takes only effect (eg. on Ubuntu) after
4019you log out and then log in again.
4021With the appropriate device name (e.g. +dev/ttyUSB3+) and with write permission
4022to the USB
4023port, the dive computer interface can connect and you should be able to import
4028=== Manually setting up Bluetooth enabled devices
4031For dive computers communicating through Bluetooth like the Heinrichs
4032Weikamp Frog or the Shearwater Predator, Petrel and Nerd there is a
4033different procedure to get the device’s name to communicate with
4034_Subsurface_. Follow these steps:
4036 * *For the dive computer, after enabling Bluetooth, be sure it is in Upload mode.*
4038For Bluetooth pairing of the dive computer, refer to the
4039manufacturer's user guide. When using a Shearwater Predator/Petrel/Nerd, select
4040_Dive Log ->  Upload Log_ and wait for the _Wait PC_ message.
4042 * *Pair the _Subsurface_ computer with the dive computer.*
4044==== On Windows:
4046Bluetooth is most likely already enabled. For pairing with the dive computer choose
4047_Control Panel ->  Bluetooth Devices ->  Add Wireless Device_.
4048This should bring up a dialog showing your dive computer (which should be in Bluetooth mode) and
4049allowing pairing. Right click on it and choose _Properties->  COM
4050Ports_ to identify the port used for your dive computer. If there are several
4051ports listed, use the one saying "Outgoing" instead of "Incoming".
4053For downloading to _Subsurface_, the _Subsurface_ drop-down list should contain
4054this COM port already. If not, enter it manually.
4056Note: If there are issues afterwards when downloading from the dive computer using
4057other software, remove the existing pairing with the dive computer.
4059==== On MacOS:
4061Click on the Bluetooth symbol in the menu bar and select _Set up
4062Bluetooth Device..._. The dive computer should then show up in the list of devices. Select it and go
4063through the pairing process. This step should only be needed once for
4064initial setup.
4066Once the pairing is complete, the correct device is shown in the
4067'Device or Mount Point' drop-down in the _Subsurface_ *Import* dialog.
4069==== On Linux
4070Be sure Bluetooth is enabled on the _Subsurface_ computer.
4071On most common distributions this should be true out of the box and
4072pairing should be straightforward. For instance, Gnome3 shows a
4073Bluetooth icon on the right of the toolbar at the top of the screen.
4074Users have reported difficulties with some Bluetooth controllers.  If you have an onboard controller,
4075try that first.  It is simplest if you remove any USB Bluetooth dongles.  If you have a USB dongle that
4076came with your dive computer, try that before any others.
4078Setting up a connection to download dives from your Bluetooth-enabled device, such as the
4079_Shearwater Petrel_, is not yet an automated process and will generally require the command prompt.
4080It is essentially a three step process.
4082 - Enable the Bluetooth controller and pair your dive computer
4083 - Establish an RFCOMM connection
4084 - Download the dives with Subsurface
4086Ensure the dive computer is in upload mode. On the _Shearwater Petrel_, _Petrel 2_ and _Nerd_
4087cycle through the menu, select 'Dive Log', then 'Upload Log'.  The display will read 'Initializing', then
4088'Wait PC 3:00' and will countdown.  Once the connection is established, the display reads 'Wait CMD ...'
4089and the countdown continues. When downloading the dive from Subsurface, the display reads 'Sending' then
4090'Sent Dive'.
4092To establish the connection, establish root access through +sudo+ or +su+.
4093The correct permission is required to download the dives in the computer. On most Linux systems this means becoming
4094a member of the dialout group (This is identical as for many dive computers using a Linux USB port, described
4095in the previous section). On the command terminal, enter:
4097+sudo usermod -a -G dialout username+
4099Then log out and log in for the change to take effect.
4101===== Enabling the Bluetooth controller and pairing your dive computer
4103Attempt to set up the Bluetooth controller and pair your dive computer using the graphical
4104environment of the operating system. After setting the dive computer to upload mode, click the Bluetooth icon in the system tray
4105and select 'Add new device'. The dive computer should appear. If asked for a password, enter 0000.
4106Write down or copy the MAC address of your dive computer - this needed later and should be in the form  00:11:22:33:44:55.
4108If the graphical method doesn't work, pair the device from the command line. Open a terminal
4109and use +hciconfig+ to check the Bluetooth controller status
4111        $ hciconfig
4112        hci0:   Type: BR/EDR  Bus: USB
4113                BD Address: 01:23:45:67:89:AB  ACL MTU: 310:10  SCO MTU: 64:8
4114                *DOWN*
4115                RX bytes:504 acl:0 sco:0 events:22 errors:0
4116                TX bytes:92 acl:0 sco:0 commands:21 errors:0
4118This indicates a Bluetooth controller with MAC address 01:23:45:67:89:AB, connected as hci0.
4119Its status is 'DOWN', i.e. not powered.  Additional controllers will appear as hci1, etc.
4120If there is not a Bluetooth dongle plugged in upon booting the computer, hci0 is probably the onboard.
4121Now power on the controller and enable authentication:
4123        sudo hciconfig hci0 up auth+  (enter password when prompted)
4124        hciconfig
4125        hci0:  Type: BR/EDR  Bus: USB
4126                BD Address: 01:23:45:67:89:AB  ACL MTU: 310:10  SCO MTU: 64:8
4127                *UP RUNNING PSCAN AUTH*
4128                RX bytes:1026 acl:0 sco:0 events:47 errors:0
4129                TX bytes:449 acl:0 sco:0 commands:46 errors:0
4131Check that the status now includes +'UP', 'RUNNING' AND 'AUTH'+.
4133If there are multiple controllers running, it's easiest to off the unused controller(s). For example, for +hci1+:
4135        sudo hciconfig hci1 down
4137Next step is to 'trust' and 'pair' the dive computer. On distros with Bluez 5, such as Fedora 22,
4138you can use a tool called +blutootctl+, which will bring up its own command prompt.
4140        bluetoothctl
4141        [NEW] Controller 01:23:45:67:89:AB localhost.localdomain [default]
4142        [bluetooth]# agent on
4143        Agent registered
4144        [bluetooth]# default-agent
4145        Default agent request successful
4146        [bluetooth]# scan on                        <----now set your dive computer to upload mode
4147        Discovery started
4148        [CHG] Controller 01:23:45:67:89:AB Discovering: yes
4149        [NEW] Device 00:11:22:33:44:55 Petrel
4150        [bluetooth]# trust 00:11:22:33:44:55        <----you can use the tab key to autocomplete the MAC address
4151        [CHG] Device 00:11:22:33:44:55 Trusted: yes
4152        Changing 00:11:22:33:44:55 trust succeeded
4153        [bluetooth]# pair 00:11:22:33:44:55
4154        Attempting to pair with 00:11:22:33:44:55
4155        [CHG] Device 00:11:22:33:44:55 Connected: yes
4156        [CHG] Device 00:11:22:33:44:55 UUIDs: 00001101-0000-1000-8000-0089abc12345
4157        [CHG] Device 00:11:22:33:44:55 Paired: yes
4158        Pairing successful
4159        [CHG] Device 00:11:22:33:44:55 Connected: no
4161If asked for a password, enter 0000. It's ok if the last line says 'Connected: no'. The important part
4162is the line above, +Pairing successful+.
4164If the system has Bluez version 4 (e.g. Ubuntu 12.04 through to 15.04), there is probably not a
4165+bluetoothctl+, but  a script called +bluez-simple-agent+ or just +simple-agent+.
4167        hcitool -i hci0 scanning
4168        Scanning ...
4169                00:11:22:33:44:55       Petrel
4170                bluez-simple-agent hci0 00:11:22:33:44:55
4172Once ther dive computer is pired, set up the RFCOMM connection
4174===== Establishing the RFCOMM connection
4176The command to establish an RFCOMM connection is:
4178+sudo rfcomm -i <controller> connect <dev> <bdaddr> [channel]+
4180- +<controller>+ is the Bluetooth controller, +hci0+.
4181- +<dev>+ is the RFCOMM device file, +rfcomm0+
4182- +<bdaddr>+ is the dive computer's MAC address, +00:11:22:33:44:55+
4183- +[channel]+ is the dive computer's Bluetooth channel we need to connect to.
4185If you omit it, channel 1 is assumed.  Based on a limited number of user reports,
4186the appropriate channel for the dive computer is probably:
4188- _Shearwater Petrel 1_: channel 1
4189- _Shearwater Petrel 2_: channel 5
4190- _Shearwater Nerd_: channel 5
4191- _Heinrichs-Weikamp OSTC Sport_: channel 1
4193E.g. to connect a _Shearwater Petrel 2_, set the dive computer to upload mode and enter:
4195        sudo rfcomm -i hci0 connect rfcomm0 00:11:22:33:44:55 5 (enter a password, probably 0000, when prompted)
4197This gives the response:
4199        Connected /dev/rfcomm0 to 00:11:22:33:44:55 on channel 5
4200        Press CTRL-C for hangup
4202To connect a _Shearwater Petrel 1+ or + HW OSTC Sport+, set the dive computer to upload mode and enter:
4204        sudo rfcomm -i hci0 connect rfcomm0 00:11:22:33:44:55   (enter a password, probably 0000, when prompted)
4205        Connected /dev/rfcomm0 to 00:11:22:33:44:55 on channel 1
4206        Press CTRL-C for hangup
4208If the specific channel the dive computer needs is not known, or the channel in the list above doesn't
4209work, the command +sdptool records+ should help determine the appropriate channel. The output
4210below is for a _Shearwater Petrel 2_.
4212        sdptool -i hci0 records 00:11:22:33:44:55
4213        Service Name: Serial Port
4214        Service RecHandle: 0x10000
4215        Service Class ID List:
4216                "Serial Port" (0x1101)
4217                Protocol Descriptor List:
4218                "L2CAP" (0x0100)
4219                "RFCOMM" (0x0003)
4220                Channel: 5
4222For a Bluetooth dive computer not in the list above, or if the channel listed is not correct, please
4223let the Subsurface developers know on the user forum or the developer mailing list _subsurface@subsurface-divelog.org_.
4225===== Download the dives with Subsurface
4226After establishing the RFCOMM connection and while the dive computer's upload mode countdown is still running, go to_Subsurface_, select _Import->Import from dive computer_ and enter appropriate Vendor (e.g. _Shearwater_), Dive Computer (_Petrel_), Device or Mount Point (_/dev/rfcomm0_) and click _Download_.
4233== APPENDIX B: Dive Computer specific information for importing dive data.
4236=== Importing from Uemis Zurich
4240_Subsurface_ downloads the information
4241stored on the SDA (the built-in file system of the Uemis) including
4242information about dive spots and
4243equipment. Buddy information is not yet downloadable.
4244Things are very similar to a normal USB-connected dive computer
4245(the Uemis is one of those that recharge when connected to the USB port).
4246The main difference is that you don’t enter a
4247device name, but instead the location where the UEMISSDA file system is
4248mounted once connected to the dive computer. On Windows this is a drive letter (
4249often 'E:' or 'F:'), on a Mac this is
4250'/Volumes/UEMISSDA' and on Linux systems this differs depending on the
4251distribution. On Fedora it usually is
4252'/var/run/media/<your_username>/UEMISSDA'. In all cases _Subsurface_
4253should suggest the correct location in the drop down list.
4255After selecting the above device name, download the
4256dives from the Uemis Zurich. One technical issue with the Uemis Zurich
4257download implementation (this is a Uemis firmware limitation, not a
4258_Subsurface_ issue) is that you cannot download more than about 40-50
4259dives without running out of memory on the SDA. This will usually only
4260happen the very first time you download dives from the Uemis Zurich.
4261Normally when downloading at the end of a day or even after a dive
4262trip, the capacity is sufficient. If _Subsurface_ displays an error
4263that the dive computer ran out of space, the solution is straightforward.
4264Disconnect the SDA, turn it off and on again, and reconnect
4265it. You can now retry (or start a new download session) and the
4266download will continue where it stopped previously. You
4267may have to do this more than once, depending on how many dives are
4268stored on the dive computer.
4271=== Importing from Uwatec Galileo
4275The Uwatec Galileo dive computers use infra red (IrDA) communication
4276between the dive computer and Subsurface. The Uwatec hardware uses
4277a USB dongle based on the serial infra-red (SIR) protocol and the
4278MSC7780 IrDA controller manufactured by MosChip
4279and marketed by Scubapro and some electronics companies.
4280Under Linux, the kernel
4281already provides for communication using the IrDA protocol. However,
4282the user additionally needs to load a driver for the IrDA interface
4283with the dive computer. The easiest way is to load the *irda-tools*
4284package from the[Linux IrDA Project].
4285After the installation of the irda-tools, the *root user* can specify a device name
4286from the console as follows:
4287+irattach irda0+
4289After executing this command, Subsurface will recognize the Galileo
4290dive computer and download dive information.
4292Under Windows, a similar situation exists. Drivers for the MCS7780 are
4293available from some Internet web sites e.g.
4294[]. Windows-based IrDA
4295drivers for the Uwatec can also be downloaded from the ScubaPro web site, with drivers located on
4296the download page for the ScubaPro SmartTrak software.
4298For the Apple Mac, IrDA communication via the MCS7780 link is not
4299available for OSX 10.6 or higher.
4302=== Importing from Heinrichs Weikamp DR5
4306When mounted as a USB drive the Heinrichs Weikamp DR5 saves a single UDDF file
4307for every dive.
4308Mark all the dives you'd like to import or open.
4309Note: The DR5 does not seem to store gradient factors nor deco information, so
4310for _Subsurface_ it is not possible to display them. Adjust the gradient
4311factors in the _Graph Settings_ in _Subsurface_ to generate a deco overlay in the
4312_Subsurface_ *Dive Profile* panel but please note that the deco calculated by
4313_Subsurface_ will most likely differ from the one displayed on the DR5.
4317=== Importing from xDEEP BLACK
4321Each dive has to be individually saved as UDDF file using "Export UDDF" option in BLACK's logbook menu.
4322When mounted as a USB drive UDDF files are available in LOGBOOK directory.
4323Note: The xDEEP BLACK saves NDL time but does not seem to store gradient factors nor deco information, so
4324for _Subsurface_ it is not possible to display them. Adjust the gradient
4325factors in the _Graph Settings_ in _Subsurface_ to generate a deco overlay in the
4326_Subsurface_ *Dive Profile* panel but please note that the deco calculated by
4327_Subsurface_ will most likely differ from the one displayed on the xDEEP BLACK.
4330=== Importing from Shearwater Predator/Petrel/Nerd using Bluetooth
4334Specific instructions for downloading dives using Bluetooth are  given in the section above, <<S_Bluetooth,_Connecting Subsurface to a Bluetooth-enabled dive computer_>>.
4337=== Importing from Poseidon MkVI Discovery
4341Download of dive logs from the MkVI is performed using a custom communications
4342adapter and the _Poseidon PC Configuration Software_, obtained when purchasing
4343the MKVI equipment. The latter is a Windows application allowing configuration
4344of equipment and storage of dive logs. Communication between dive computer and
4345desktop computer utilizes the IrDA infra-red protocol. Only data for one dive
4346can be downloaded at a time, in three files:
4348- Setup configuration for the dive and key dive parameters (file with a .txt
4349  extension)
4350- Dive log details (file with a .csv extension)
4351- Redbook format dive log (file with .cvsr extension). This is a compressed
4352  version of the dive log using a proprietary format.
4354_Subsurface_ accesses the .txt and the .csv files to get dive log information.
4357=== Importing from APD Inspiration/Evolution CCR
4361The dive logs of an APD Inspiration or similar CCR dive computer are downloaded using
4362a communications adapter and _AP Communicator_, obtained when
4363purchasing the equipment. The dive logs can be viewed using the _AP Log Viewer_,
4364within Windows or Mac/OS. However, APD logs can be viewed and managed from within
4365_Subsurface_ (together with dives using many other types of dive computer). The
4366APD inspiration dive logs are imported into _Subsurface_ as follows:
4368- Download the dive using _AP Communicator_.
4369- Open a dive within the _AP Log Viewer_.
4370- Select the tab at the top of the screen, entitled "_Data_".
4371- With the raw dive log data show on the screen, click on "_Copy to Clipboard_".
4372- Open a text editor, e.g. Notepad (Windows) or TextWrangler (Mac).
4373- Copy the contents of the clipboard into the text editor and save the text file
4374  with a filename extension of _.apd_
4375- Within _Subsurface_, select _Import ->  Import log files_ to open the xref:Unified_import[universal import dialogue].
4376- In the dropdown list towards the bottom right of the dialogue (labeled 'Filter:'), select "APD log viewer".
4377- On the list of file names select the _.apd_ file  created. An import
4378  dialogue opens showing the default settings for the data in the
4379_.apd_ file. If changes are required,
4380  do this as for xref:S_ImportingCSVDives[CSV imports].
4382image::images/APD_CSVimportF22.jpg["Figure: APD log viewer import",align="center"]
4384- The top left hand dropdown box in the import panel lets you select the APD dive computer
4385  for which the dive log needs to be imported. The default it is DC1, _i.e._ the
4386  first of the two dive computers the APD uses. It is possible to sequentially
4387  import the data for both dive computers by first importing CD1 and then DC2.(*Hint*: The logs
4388  for the two dive computers are viewed by selecting _View  ->  Next DC_ from
4389  the Main Menu after the uploading has been completed)
4390- Click the _Ok_ button at the bottom of the import panel.
4392The APD dive log will appear within _Subsurface_. The dive computer- generated ceiling
4393provided by the Inspiration can be viewed by selecting the appropriate
4394button on the left of the *Dive Profile*. Cylinder pressure data are not logged
4395by the APD equipment but can be manually entered in the _Equipment_ Tab.
4397== APPENDIX C: Exporting Dive log information from external dive log software.
4399The import of dive log data from external dive log software is mostly performed
4401the dialogue found by selecting _Import_ from the Main Menu, then clicking on
4402_Import Log Files_. This is a single-step process, more information about which
4403can be found
4405However, in some cases, a two-step process may be required:
44071. Export the foreign dive log data to format that is accessible from
4408  _Subsurface_.
44092. Import the accessible dive log data into _Subsurface_.
4411This appendix provides some information about approaches to export dive log
4412data from foreign
4413dive log software. The procedures below mostly apply to Linux and/or Windows.
4416=== Exporting from *Suunto Divemanager (DM3, DM4 or DM5)*
4419DiveManager is a MS Windows application for Suunto dive computers.
4420Divemanager 3 (DM3) is an older version of the Suunto software. More recent
4421Suunto dive computers use Divemanager version 4 or 5 (DM4 or DM5). The
4422different versions of Divemanager use different methods and different file naming
4423conventions to export dive log data.
4425*Divemanager 3 (DM3):*
44271. Start 'Suunto Divemanager 3' and log in with the name containing the logs
44282. Do not start the import wizard to import dives from the dive computer.
44293. In the navigation tree on the left side of the program-window, select the appropriate
4430   dives.
44314. Within the list of dives, select the dives you would like to import later:
4432        * To select certain dives: hold 'ctrl' and click the dive
4433        * To select all dives:  Select the first dive, hold down shift and
4434          select the last dive
44355. With the dives marked, use the program menu _File ->  Export_
44366. The export pop-up will show. Within this pop-up, there is one field called 'Export Path'.
4437        * Click the browse button next to the field Export Path
4438                ** A file-manager like window pops up
4439                ** Navigate to the directory for storing the
4440   Divelog.SDE file
4441                ** Optionally change the name of the file for saving
4442                ** Click 'Save'
4443        * Back in the Export pop-up, press the button 'Export'
44447. The dives are now exported to the file Divelog.SDE.
4446*Divemanager 4 (DM4) and Divemanager 5 (DM5):*
4448DM4 and DM5 use identical mechanisms for exporting dive logs.
4449To export a divelog from Divemanager you need to locate the DM4/DM5 database
4450where the dives are stored. You can either look for the original
4451database or make a backup of the dives. Both methods are described here.
4453Locating the Suunto DM4 (or DM5) database:
44551. Start Suunto DM4/DM5
44562. Select 'Help ->  About'
44573. Click 'Copy' after text 'Copy log folder path to clipboard'
44584. Open Windows Explorer
44595. Paste the address to the path box at the top of the File Explorer
44606. The database is called DM4.db or DM5.db
4462Making a backup copy of the Suunto DM4/DM5 database:
44641. Start Suunto DM4/DM5
44652. Select 'File - Create backup'
44663. From the file menu select the location and name for the backup, we'll
4467   use DM4 (or DM5) in here with the default extension .bak
44684. Click 'Save'
44695. The dives are now exported to the file DM4.bak (or DM5.bak)
4472=== Exporting from Atomic Logbook
4477Atomic Logbook is a Windows software by Atomic Aquatics. It allows
4478downloading of dive information from Cobalt and Cobalt 2 dive computers.
4479The divelog is kept in a SQLite database at
4480C:\ProgramData\AtomicsAquatics\Cobalt-Logbook\Cobalt.db. This file can
4481be directly imported to Subsurface.
4484=== Exporting from Mares Dive Organiser V2.1
4489Mares Dive Organizer is a Windows application. The dive log is kept as a
4490Microsoft SQL Compact Edition database with a '.sdf' filename extension. The
4491database includes all Dive Organizer-registered divers on the particular
4492computer and all Mares dive computers used. The safest way to get a copy
4493of the dive database is to export the information to another compatible format
4494which can then be imported into _Subsurface_.
44961. Within Dive Organizer, select
4497   _Database ->  Backup_ from the main menu and back up the database to the desk
4498   top.
4499   This creates a zipped file DiveOrganizerxxxxx.dbf.
45002. Rename the file to
4501 Inside the zipped directory is a file
4502   _DiveOrganizer.sdf_.
45033. Extract the _.sdf_ file from the zipped folder to your Desktop.
45044. The password for accessing the .zip file is _mares_.
4507=== Exporting from *DivingLog 5.0 and 6.0*
4511The best way to bring your logs from DivingLog to Subsurface is to
4512convert the whole database. This is because other export formats do not
4513include all the details, and would lack, for example, gas switches and
4514information of what units are used. With database import, all this
4515information is included and readily available.
4517To transfer all files from DivingLog to Subsurface:
45191. In DivingLog open the 'File ->  Export ->  SQLite' menu
45202. Select 'Settings' button
45213. Set the 'RTF2Plaintext' to 'true'
45224. Close the Settings dialog
45235. Click 'Export' button and select the filename
4525Once this is done, open the saved database file with Subsurface and the
4526dives are automatically converted to Subsurface’s own format. Last step to do is
4527save the log file in Subsurface.
4529== APPENDIX D: Exporting a spreadsheet to CSV format
4532Many divers keep a dive log in some form of digital file, commonly a spreadsheet
4533with various fields of information. These logs can be easily imported into _Subsurface_ after the
4534spreadsheet is converted in a .CSV file.
4535This section explains the procedure to convert a diving logbook stored in a spreadsheet
4536to a .CSV file that will later be imported to _Subsurface_.
4537Creating a .CSV is straightforward, although the procedure is somewhat different
4538according to which spreadsheet program is used.
4540Organize the diving data in the spreadsheet, so the first row
4541contains the names (or titles) of each column and the information for each dive is stored in a single row.
4542_Subsurface_ supports many data items (Dive number, Date,
4543Time, Duration, Location, GPS, Max Depth, Mean Depth, Buddy, Notes, Weight and Tags).
4544Organize dive data following a few simple rules:
45461. Date: use one of the following formats: yyyy-mm-dd,, mm/dd/yyyy
45472. Duration: the format should be minutes:seconds.
45483. Unit system: only one unit system should be used (no mix of imperial and metric units)
45494. Tags and buddies: values should be separated using a comma.
45505. GPS position: use decimal degrees, e.g. 30.22496 30.821798
4551=== _LibreOffice Calc_ and _OpenOffice Calc_
4553These are open source spreadsheet applications forming parts of larger open source office suite applications. The user interaction with _LibreOffice_ and _OpenOffice_ is very similar.
4554In Libreoffice Calc the time format should be set to minutes:seconds - [mm]:ss and dates should be set to one of: yyyy-mm-dd,, mm/dd/yyyy. A typical dive log may look like this:
4556image::images/LOffice_spreadsheetdata.jpg["FIGURE: Spreadsheet data",align="center"]
4558To export the data as a .CSV file from within LibreOffice click _File ->  Save As_. On the dialogue that comes up, select the _Text CSV (.csv)_ as the file type and select the option _Edit filter settings_.
4560image::images/LOffice_save_as_options.jpg["FIGURE: Save as options",align="center"]
4562After selecting _Save_, select the appropriate field delimiter (choose _Tab_ to prevent conflicts with the comma when using this as a decimal point), then select _OK_.
4564image::images/LOffice_field_options.jpg["FIGURE: Field options",align="center"]
4566Double check the .CSV file by opening it with a text editor, and then import the dive data as explained on the section xref:S_ImportingCSVDives[Importing CSV dives].
4568=== Microsoft _Excel_
4570The field delimiter (called "_list separator_" in Microsoft manuals) is not accessible
4571from within _Excel_ and needs to be set through the _Microsoft Control Panel_. After changing the
4572separator character, all software on the Windows machine uses the new character as a separator.
4573You can change the character back to the default character by following the same procedure, outlined below.
4575- In Microsoft Windows, click the *Start* button, then select _Control Panel_ from the list on the right-hand side.
4576- Open the _Regional and Language Options_ dialog box.
4577- Do the following:
4578  ** In Windows 7, click the _Formats_ tab, and then click _Customize this format_.
4579- Type a new separator in the _List separator_ box. To use a TAB-delimited file, type the word TAB in the box.
4580- Click _OK_ twice.
4582Below is an image of the _Control Panel_:
4584image::images/Win_SaveCSV2.jpg["FIGURE: Win List separator",align="center"]
4586To export the dive log in CSV format:
4588With the dive log opened in _Excel_, select the round Windows button at the top left, then _Save As_.
4590image::images/Win_SaveCSV1.jpg["FIGURE: Excel save as option",align="center"]
4592Click on the left-hand part of the _Save as_ option, NOT on the arrow on the right-hand. This brings up a dialogue for saving the
4593spreadsheet in an alternative format. From the dropdown list at the
4594bottom of the dialogue, marked _Save as Type:_, select _CSV(Comma delimited) (*.CSV)_. Be sure the appropriate folder has been
4595selected to save the CSV file into.
4597image::images/Win_SaveCSV3.jpg["FIGURE: Excel save CSV dialogue",align="center"]
4599Select the _Save_ button. The CSV-formatted file is saved into the
4600folder that was selected. You can double check the .CSV file by
4601opening it with a text editor, then import the dive data as
4602explained on the section xref:S_ImportingCSVDives[Importing CSV dives].
4604== APPENDIX E: Writing a custom print template
4606_Subsurface_ has a way to create or modify templates for printing dive logs to
4607produce customized printouts of them. Templates written in HTML, as well as a simple
4608Grantlee instruction set, are rendered to the print device by _Subsurface_.
4610Templates are accessed using the print dialogue (see image *B* below).
4612image::images/Print1_f22.jpg["FIGURE: Print dialogue",align="center"]
4614The buttons under the _Template_ dropdown box lets you _Edit_, _Delete_,
4615_Import_ and  _Export_ templates (see image *A* above). New or modified templates are stored as HTML
4616files in the same directory as the dive log being processed. In order to create or modify
4617a template, select one of the templates from the template dropdown list in the print dialogue
4618(see image *B* above). Choose an existing template that resembles the final desired printout. Then select _Edit_.
4620The Edit Panel has three tabs:
4622image::images/Template1_f22.jpg["FIGURE: template edit dialogue",align="center"]
46241) The _Style_ tab (image *A* above) controls the font, line spacing and color template used for printing the dive log.
4625   The style attributes are editable. Choose one of the four color palettes used for color printing.
46272) The _Colors_ tab (image *B* above) allows editing the colors used for printing the dive log. The colors are highly
4628   customizable: the _Edit_ buttons in the _Colors_ tab allows choosing arbitrary colors for different
4629   components of the dive log printout.
46313) The _Template_ tab of the Edit Panel (see image below) allows creating a template using HTML as well as a few
4632   Grantlee programming primitives. Grantlee can create and format HTML code in
4633   a highly simple but efficient way (see below). The HTML of the template can be edited and saved. The saved
4634   template is stored in the same directory as the dive being processed. By default, a _Custom_
4635   template is a skeleton with no specific print instructions. The information printed
4636   needs to be specified and formatted in the template by replacing the section marked with:
4637   "<!-- Template must be filled -->". Writing HTML code with Grantlee instructions allows unlimited
4638   freedom in determining what is printed and in which way it should be rendered.
4640image::images/Template2_f22.jpg["FIGURE:Template tab",align="center"]
4642You can adapt any of the existing templates and save it to the dive log directory. The standard templates (e.g. One dive, Six dives,
4643Table) can be modified in this way. After completing the edits, use the _Export_ button in the print
4644dialogue to save the new template using a new template name.
4646To write a custom template, the following elements must exist so  the template will be correctly handled and rendered.
4648=== Main dive loop
4649_Subsurface_ exports a dive list called (*dives*) to the _Grantlee_ back end. It is possible to iterate over the list as follows:
4652        {% for dive in dives %}
4653                <h1> {{ dive.number }} </h1>
4654        {% endfor %}
4659        <h1> 1 </h1>
4660        <h1> 2 </h1>
4661        <h1> 3 </h1>
4664Additional information about _Grantlee_ can be found at[here]
4666=== Grantlee exported variables
4667Only a subset of the dive data is exported:
4670|number| (*int*) dive number
4671|id| (*int*) unique dive ID, should be used to fetch the dive profile
4672|date| (*string*) date of the dive
4673|time| (*string*) time of the dive
4674|location| (*string*) location of the dive
4675|duration| (*string*) duration of the dive
4676|depth| (*string*) depth of the dive
4677|divemaster| (*string*) divemaster for the dive
4678|buddy| (*string*) buddy for the dive
4679|airTemp| (*string*) air temperature of the dive
4680|waterTemp| (*string*) water temperature of the dive
4681|notes| (*string*) dive notes
4682|rating| (*int*) dive rating which ranges from 0 to 5
4683|sac| (*string*) SAC value for the dive
4684|tags| (*string*) list of dive tags for the dive
4685|gas| (*string*) list of gases used in the dive
4686|suit| (*string*) the suit used for the dive
4687|cylinders| (*string*) complete information of all used cylinders
4688|cylinder0-7| (*string*) information about a specific cylinder
4689|weights| (*string*) complete information of all used weight systems
4690|weight0-5| (*string*) information about a specific weight system
4691|maxcns| (*string*) maxCNS value for the dive
4692|otu| (*string*) OTU value for the dive
4693|sumWeight| (*string*) the summed weight of all used weight systems
4694|startPressure| (*string*) the start pressure
4695|endPressure| (*string*) the end pressure
4696|firstGas| (*string*) first used gas
4699_Subsurface_ also exports *template_options* data. This data must be used as _CSS_ values to provide a dynamically
4700editable template. The exported data is shown in the following table:
4703|font| (*string*) font family
4704|borderwidth| (*int*) border-width value dynamically calculated as 0.1% of the page width with minimum value of 1px
4705|font_size| (*double*) size of fonts in vw, ranges between 1.0 and 2.0
4706|line_spacing| (*double*) distance between text lines, ranges between 1.0 and 3.0
4707|color1| (*string*) background color
4708|color2| (*string*) primary table cell color
4709|color3| (*string*) secondary table cell color
4710|color4| (*string*) primary text color
4711|color5| (*string*) secondary text color
4712|color6| (*string*) border colors
4717        border-width: {{ template_options.borderwidth }}px;
4722        border-width: 3px;
4725Another variable that _Subsurface_ exports is *print_options*. This variable contains a single member:
4728|grayscale | Use _CSS_ filters to convert the page into grayscale (should be added to body style to enable printing grayscale prints)
4734        body {
4735                {{ print_options.grayscale }};
4736        }
4741        body {
4742                -webkit-filter: grayscale(100%);
4743        }
4746=== Defined CSS selectors
4747As the dive profile is placed after rendering, _Subsurface_ uses special _CSS_ selectors to searche
4748in the HTML output. The _CSS_ selectors in the following table should be added.
4752|dive_{{ }} | id | is used to fetch the relevant dive profile
4753|diveProfile | class | each dive that will contain a dive profile should have this class selector in addition to the dive_{{ }} id selector
4754|dontbreak | class | prevents the dive with this class from being divided into two pages. This can be used
4755in flow layout templates only (when data-numberofdives = 0)
4758IMPORTANT: Rendering dive profiles is not supported for flow layout templates (when data-numberofdives = 0).
4760=== Special attributes
4762There are two ways of rendering- either rendering a specific number of dives in each page or make _Subsurface_ try to
4763fit as many dives as possible into one page (_flow_ rendering).
4765The *data-numberofdives* data attribute is added to the body tag to set the rendering mode.
4767- render 6 dives per page:
4770        <body data-numberofdives = 6>
4773- render as much dives as possible:
4776        <body data-numberofdives = 0>
4779IMPORTANT: All CSS units should be in relative lengths only, to support printing on any page size.
4781== APPENDIX F: FAQs.
4783=== Subsurface appears to miscalculate gas consumption and SAC
4785'Question': I dived with a 12.2 l tank, starting with 220 bar and ending with 100 bar, and I calculate a different SAC compared what _Subsurface_ calculates. Is _Subsurface_
4788'Answer': Not really. What happens is that _Subsurface_ actually calculates gas
4789consumption differently - and better - than you expect.
4790In particular, it takes the incompressibility of the gas into account.
4791Traditionally, gas consumption and SAC should be:
4792+consumption = tank size x (start pressure - end pressure)+
4794and that's true for an ideal gas, and it's what you get taught in dive theory.
4795But an "ideal gas" doesn't actually exist, and real gases actually don't compress
4796linearly with pressure. Also, you are missing the fact that one atmosphere of
4797pressure isn't actually one bar.
4798So the *real* calculation is:
4800+consumption = (amount_of_air_at_beginning - amount_of_air_at_end)+
4802where the amount of air is *not* just "tank size times pressure in bar".
4803It's a combination of: "take compressibility into account" (which is a fairly
4804small issue under 220 bar - you'll see more differences when you do high-pressure
4805tanks with 300bar) and "convert bar to atm" (which is the majority of your discrepancy).
4806Remember: one ATM is ~1.013 bar, so without the compressibility, your gas use is:
4810which is about 1445, not 1464. So there was 19 l too much in your simple
4811calculation that ignored the difference between 1 bar and one ATM.
4812The compressibility does show up above 200 bar, and takes that 1445 down
4813about eight litres more, so you really did use only about 1437 l of air at surface pressure.
4815So be happy: your SAC really is better than your calculations indicated.
4816Or be sad: your cylinder contains less air than you thought it did.
4817And as mentioned, the "contains less air than you thought it did" really
4818starts becoming much more noticeable at high pressure. A 400 bar really does not
4819contain twice as much air as a 200 bar one. At lower pressures, air acts pretty much like an ideal gas.
4821=== Some dive profiles have time discrepancies with the recorded samples from my dive computer...
4823_Subsurface_ ends up ignoring surface time for many things (average depth, divetime, SAC, etc).
4824'Question':  Why do dive durations in my dive computer differ from that given by _Subsurface_?
4826'Answer': For example, if you end up doing a weight check (deep enough to trigger the "dive started")
4827but then come back up and wait five minutes for your buddies, your dive computer may say
4828that your dive is 50 minutes long - because you have fifty minutes worth of samples - but
4829subsurface will say it's 45 minutes - because you were actually diving for 45 minutes.
4830It's even more noticeable if you do things like divemastering the initial OW dives, when
4831you may stay in the water for a long time, but spend most of it at the surface. And then
4832you don't want that to count as some kind of long dive”.
4834=== Some dive profiles are missing from the download
4837'Question': I cannot download all my dives, only the most recent ones,
4838even though my dive computer's manual states that it records history of
4839e.g. 999 dives?
4840'Answer': Dive history is different than the dive profiles on the log.
4841The history only keeps track of the total number of dives and total
4842amount of time spent below surface. The logs, on the other hand, store
4843the dive profile, but they have a limited amount of memory to do so. The
4844exact amount of dive profiles that can be stored on the device depends on
4845sample interval and duration of the dives. Once the memory is full the
4846oldest dives get overwritten with new dives. Thus we are only able to
4847download the last 13, 30 or 199 dives.
4849If you have downloaded your dives to different dive logging software
4850before they were overwritten, there is a good chance that Subsurface can
4851import these. However, if the logs are only on your dive computer, they
4852cannot be salvaged after being overwritten by new dives.
Note: See TracBrowser for help on using the repository browser.