NAME
Dive - Simulate a dive and corresponding tissues
SYNOPSIS
use Deco::Dive;
my $dive = new Deco::Dive( );
$dive->load_data_from_file( file => $file);
$dive->model( config => '/path/to/my/model.cnf' );
$dive->simulate( );
DESCRIPTION
The Dive model can be used to simulate a dive. You add data points, set some properties and call the simulate method to calculate the entire dive.
After simulating, you can retrieve info in several ways from the dive.
METHODS
- $dive->load_data_from_file( file => $file , timefield => 0, depthfield => 1, timefactor => 1, separator => ';');
-
Load data from a csv file. You HAVE to specify the filename. Additional options are timefield, the 0 based field number where the timestamps are stored. Depthfield, field number where the depth (in meters is stored), separator, the fieldseparator and timefactor, the factor to multiply the time field with to transform them to seconds.
- $dive->model( model => 'padi', config => $file );
-
Set the model to use. If you specify one of the known models and the config dir has been set right, then the method will load the corresponding config file and set up the tissues for this model.
Alternatively you can specify your own config file to use.
- $dive->simulate( model => 'haldane' );
-
This method does the simulation for all tissues for the chosen model. It will run along all the time and depth points of the dive and calculate gas loading for all the tissues of the model.
- $dive->_nodeco_time( );
-
Private function, but might be useful. This function will loop over all the tissues of the model, calling the LDeco::Tissue::nodeco_time() function on them. The lowest value will be stored, together with the associated tissue nr.
EXPORT
None by default.
SEE ALSO
In the docs directory you will find an extensive treatment of decompression theory in the file Deco.pdf. A lot of it has been copied from the www.deepocean.net website.
AUTHOR
Jaap Voets, <narked@xperience-automatisering.nl>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Jaap Voets