ABSTRACT
This section describes and presents a decompression program called
DODeco. It
contains serveral decompression algorithms. It is meant to be
experimental, so do not apply to real diving or decompression
situations. The software contains errors.
The purpose is to get insight in implementation of
decompression algorithms. It has been designed to be easily
extended with more algorithms.
Before reading further: the program is for experimental and educational purposes.
Do not apply to real diving or decompression situations.
Ok, having said that, please procede.
Why writing a new decompression program when there are plenty available on the internet? The reason I wrote DODeco was to get insight in how decompression algorithms work. Most programs on the internet do not deliver source code. DODeco does. Including the architectural design that is described on this page. I hope it may give the user insight and that it may be the basis for further development.
The program is published as open source software under GNU Public licence.
Initially, the VPMDECO Fortran code of Erik Baker (implementing the VPM algorithm of Yount, Baker and Maiken) was taken as point of starting. It was translated to the Object Oriented software format in Java. It was designed in such a way that easily other alorithms could be added. I added VPM-B of Erik Baker, in which Boyle law compensation has been added. Furthermore I implemented Buhlmann ZH16-L and the Buhlmann algorithm that has been made more conservative by Erik Baker by adding a gradient factor.
The User Interface is separated from the calculation functionality. Though the user interface can be used to enter and edit dives, surface intervals, etc. it lacks a proper error handling and checking. You can enter nonsence exposures.
The program has been tested by providing a few exposure patterns to it and to other software and verify the results.
The software has NOT been tested in practice. Of course the VPM algorithms and Bühlmann algorithms have been tested, but not in the form of DODeco. Errors may be present in DODeco. So do not use DODeco for real diving situations.
A lot of TO DO's exist:
Download the binary (JAR file). To run it, you need Java 1.5.0 or higher. A Java Runtime Environment can be downloaded at Sun for free, for Windows or Linux.
The software can be started by:
java -jar DODeco1.0.jar
The MainFrame is shown, presenting an overview of the exposures. See Figure 1. By default, there is always a 'Saturation'.

Figure 1 MainFrame with an overview of the exposures
To get going real fast, just select from the menu: File -> Example Dive. This loads an example dive sequence (as shown in Figure 2).

Figure 2 MainFrame with an overview of the exposures
Select from the Algorithm menu the appropriate decompression algorithm (or just leave it). Press the Calculate button. This calculates the decompression profile (Figure 3).

Figure 3 The resulting decompression profile
Adding an exposure
We assume you started the program (Figure 1). This leaves you in the MainFrame overview. This overview shows the exposures to which the diver is exposed. There are 4 types of exposures:
Press the Add button to add a new exposure. By default the selection bar is set to the end of the list, so the new exposure is added here. Prior to pressing add, you may move the selection line to the position where you want to add the exposure. Anyway, after pressing the 'Add' button, the Add Exposure Dialog opens.

Figure 4 Add Exposure Dialog
Select the appropriate exposure you like to add. When pressing OK, the edit box is opened that allows you to fill in the details for the exposure you chose.
An existing exposure can be edited by selecting it and pressing the Edit button. An exposure can be deleted (except from the 1st) by selecting it and pressing the Delete button.
Edit Saturation

Figure 5 Edit Saturation Dialog
Edit Acclimatisation

Figure 6 Edit Acclimatisation Dialog
Editing a dive
When adding a dive (or pressing Edit to edit one), the Edit Dive Dialog opens. The Edit Dive Dialog (Figure 7) shows the components that make up a dive.

Figure 7 Dive Edit Dialog
There are three different components that make up a dive:
To add a new component to the list, select the position in the list where to add (leaving the default selection appends the component to the list) and press the Add button. This opens the Add Dive Component Dialog (Figure 8).

Figure 8 Add Dive Component Dialog
Select the appropriate Dive Component and press Ok button (the Cancel button closes the Dialog without an component to be added). After adding a Dive Component, the appropriate Edit Dialog for the Component opens up.
Edit Ascent/Descent

Figure 9 Edit Ascent/Descent Dialog
Edit Stay

Figure 10 Edit Stay Dialog
Edit Deco Stage

Figure 11 Edit Deco Stage Dialog
Edit Surface Interval

Figure 12 Edit Surface Interval Dialog
Settings are read from an XML file named settings.xml. Setting files are available in the download section for imperial and metric unit systems. If the settings file is not present in the current directory, hard coded settings are used.
Settings can be loaded from the menu, prior to creating dives or executing calculations. Use File -> Load Settings. You can also rename the downloaded or created settings files to settings.xml and place them in the start-up directory.
This section presents a description of the software. Diagrams are presented in UML (Unified Modeling Language). Basic knowledge on software development, software architecture and UML is prerequisite.

Figure 13 Packages
Following packages are present in the software:
The ui package has a dependency towards the calculator package. The dependency is not vice versa. This enables adding other user interfaces, without modifying the calculator package.
This package is the heart of the software. It offers representation for the Diver and the diving situations. It contains a number of Decompression algorithms.

Figure 14 Concept of net.deepocean.dodeco.calculator
The base structure is presented in Figure 14. The Processor class is the entry point. It contains a Diver instance and (a Vector of) Exposures. When executing, the Exposures are applied to the Diver, updating the Divers TissueCompartments.

Figure 15 Exposures

Figure 16 The Dive class

Figure 17 The ExposureSegment tree