Air Usage Feature

Discussions about Diving Log 6.0 - questions and hints
Post Reply
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Air Usage Feature

Post by lloyd_borrett »

G'day Sven,

An idea for an enhancement would be some form of air usage per dive minute indication. Perhaps as a calculated value for each dive.

Statistics should show the average air usage, average usage per dive, most effective dive and least effective dive for air use. Maybe even a chart option.

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

The SAC rate is displayed above the dive profile. In the statistics it's currently not implemented.
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

G'day Sven,

I'm having a go at adapting Olaf van Zandwijk's online dive log using the Diving Log MySQL dump.

Given PresS, PresE, Divetime and Tanksize, just what is the formula for getting the SAC?

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Hi Lloyd

There are different ways, but I use this. To calculate the SAC in liter/min (all units in metric):

Code: Select all

SAC = ((PresS - PresE) * Tanksize) / (Divetime * (AverageDepth / 10 + 1))
To calculate it in ft³/min:

Code: Select all

SAC = SAC * 0.035335689046
Best regards,
Sven
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

G'day Sven,

So how do you calculate AverageDepth?

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

I run through the dive profile, sum all depth entries and divide the value at the end with the number of profile entries. Then you have the average depth. You can decide if you want to add zero values or not, I'll use all entries in my formular.

Sven
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

Okay,

So just what is the format of the "Profile" string that I've got in the MySQL database.

I'm assuming there must be something to give me the time interval for each value, then an array of depth values. Maybe even some other values.

Right now my graph is giving me a calculated 80 minutes of dive time for an actual 40 minute dive from a Suunto Vytec.

It's calculating some 400 minutes of dive time for an actual 75 minute dive from a Uwatec.

So I'm assuming there must be a value held somewhere that gives the sample rate.

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

In this thread I have written something about the profile format.

Sven
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

G'day Sven,

I'm getting the same value as Diving Log for the Average Depth, but different values for the SAC.

The code I'm using is:

Code: Select all

$sac = (($result[0]['PresS'] - $result[0]['PresE']) * $result[0]['Tanksize']) / ($result[0]['Divetime'] * ($averagedepth / 10 + 1));
Diving Log 27.99, me 28.81.
Diving Log 24.91, me 25.53.
Diving Log 32.51, me 38.80.
Diving Log 21.42, me 23.64.

UPDATE: I tried calculating the dive time and I'm now getting the same values for SAC.

By the way, just what do the initials SAC stand for?

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

SAC = Surface Air Consumption Rate
Post Reply