Dive computer alogorithm