NAME
SCUBA::Table::NoDeco - Calculate no-decompression dive times.
SYNOPSIS
use SCUBA::Table::NoDeco;
my $table = SCUBA::Table::NoDeco->new();
$table->dive(metres => 15, minutes => 30);
print $table->group,"\n"; # Prints "E"
$table->surface(minutes => 60);
print $table->group,"\n"; # Prints "D"
print $table->max_time(metres => 30),"\n"; # Prints 6
WARNING AND DISCLAIMER
Do NOT use this module as your sole source of no-decompression dive times. This module is intended for use only as a guide to assist in planning your dives. ALWAYS calculate and verify your dive times by hand once you have planned your dives. If you have a dive computer, follow its instructions for use.
SCUBA diving involves serious risks of injury or death, and should only be performed by individuals in good health and with the appropriate skills and training. Even when tables are used with proper safety procedures, decompression sickness may still occur.
The author provides ABSOLUTELY NO WARRANTY on this module, without even the implied warranty of merchantability or fitness for a particular purpose. Use entirely at your own risk.
DESCRIPTION
This module provides the ability to perform useful calculations using dive-tables, including calculating dive groups and maximum no-decompression times for repetitive dives. A selection of tables are available. The module assumes that the diver is using air as their breathing gas.
METHODS
The following methods are provided.
new
my $stn = SCUBA::Table::NoDeco->new(table => "SSI");
This class method returns a SCUBA::Table::NoDeco object. It takes an optional table argument, specifying which dive table should be used.
If no dive table is supplied then the module will use the default SSI table. This default may change in future releases, so you should not rely upon this default.
SSI tables are the only ones supported in the present release.
list_tables
my @tables = SCUBA::Table::NoDeco->list_tables();
This method returns a list of tables that can be selected when creating a new SCUBA::Table::NoDeco object.
max_depth
my $max_depth_ft = $stn->max_depth(units => "feet");
my $max_depth_mt = $stn->max_depth(units => "metres");
This method provides the maximum depth provided by the tables currently in use. It does not supply the maximum safe depth. The units argument is mandatory.
clear
$stn->clear();
This method resets the object to its pristine state. The table used for dive calculations is retained.
table
print "You are using the ",$stn->table," tables\n";
This method simply returns the name of the dive table being used by the SCUBA::Table::NoDeco
object.
dive
my $group = $stn->dive(feet => 60, minutes => 30);
my $group = $stn->dive(metres => 18, minutes => 30);
This method determines and sets the diver's group for the dive information provided. If the dive 'falls off' the tables, then an exception is returned. This method takes into account the diver's current group, surface interval, and residual nitrogen time.
If the diver does not have a surface interval of at least 10 minutes, this will consider the dive to be a continuation of the previous dive. The dive times will be added, and the maximum depth of both dives will be used to calculate the diver's group.
group
print "You are a ",$stn->group," diver\n";
The group method returns the current letter designation representing the amount of residual nitrogen present in the diver. The letter designation is always upper-case. A diver with no residual nitrogen has no group, represented by the empty string.
surface
$stn->surface(minutes => 60); # Spend an hour on surface.
print "Total surface time ",$stn->surface," minutes\n";
This method returns the total time of the current surface interval. If the optional minutes
argument is provided, this is added to the diver's current surface interval before returning the total minutes elapsed.
max_time
print "Your maximum time at 18 metres is ",$stn->max_time(metres => 18),"\n";
print "Your maximum time at 60 feet is ",$stn->max_time(feet => 60),"\n";
This calculates the maximum no-decompression time for a dive to the specified depth. The diver's current group is taken into account.
rnt
my $rnt = $stn->rnt(metres => 12);
my $rnt2 = $stn->rnt(feet => 40);
This method returns the residual nitrogen time for a diver, in minutes. The depth argument (in either metres or feet) is mandatory.
BUGS
Almost certainly. If you find one, please report it to pjf@cpan.org.
AUTHOR
Paul Fenwick, <pjf@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Paul Fenwick.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.