Exporting tank size data

Discussions about Diving Log 6.0 - questions and hints
Post Reply
SwamiMacGyver
Posts: 13
Joined: Tue Nov 15, 2011 01:37

Exporting tank size data

Post by SwamiMacGyver »

I want to export my data to do some analysis. When exporting the data, I can't figure out what the tank size data means. It looks like the working pressure is changing the tank size data. Why is that? One of the calculations I want to do with the exported data is to look at my SAC rate (which I can't export).

Here are all the values in the export and the tanks they should represent:
Exported value - Material Size
60.33715057 - Aluminum 63
66.77971649 - Steel 80
68.95674133 - Aluminum 72
76,61856842 - Aluminum 80 (working pressure 3000psi)
79.99998474 - Aluminum 80 (no working pressure specified)
83.47464752 - Steel 100 (working pressure 3442psi)
99.99996948 - Steel 100 (no working pressure specified)
101.7590714 - Aluminum 85 (working pressure 2400psi)
102.0567093 - Aluminum 85 (working pressure 2393psi)

One suggestion I have is to allow users to control the tank size information. Since we all know an Aluminum 80 isn't really 80 cubic feet, and that could change by manufacturer, you could allow us to specify the information. That way, if we look up the manufacturer's info, the calculations could be more accurate.
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Exporting tank size data

Post by divinglog »

Hi

Diving Log stores all data in the database in metric units, so the tank size is stored in liters. During display or export, Diving Log calculates the cuft based on the working pressure. So if you change the working pressure, the tank size changes as well and you would to adjust it. Because of this calculation you also get the large number of digits, even though you can round them (I assue you use the Excel export).

Kind regards,
Sven
SwamiMacGyver
Posts: 13
Joined: Tue Nov 15, 2011 01:37

Re: Exporting tank size data

Post by SwamiMacGyver »

Apologies. Maybe I'm missing something. Why does the working pressure change the tank size? A 100 cubic foot tank with a working pressure of 3000psi, and a 100 cubic foot tank with a working pressure of 3442psi are both still 100cuft tanks. Right? The working pressure is taken into account when calculating the SAC/RMV rate, but shouldn't affect the tank size. Or do I misunderstand something?

Since I can't export SAC info to Excel, I want to export and recalculate using your forumula:
ImperialSAC = ((TankPressureDiff / WorkingPressure) * TanksizeCuFt) / (Divetime * (AvgDepthMeter / 10 + 1))

When I export the data, I get the correct tank pressures, I get the correct working pressure, I get the correct dive times, and I get the correct average depth. However, the tank size is wrong, so I can't do the calculation.

Example dive:
Steel 100 cuft. Working pressure 3442. Start Pressure 3442. End Pressure 1377. Dive Time: 60 minutes. Avg depth 33 ft.

Diving Log correctly determines the SAC rate is .5

When exporting that dive, the tank size is exported as 83.47... So, the formula above gives us:
((2065 / 3442) * 83.47) / (60 * (10/10 + 1)) = .417

In order to do the calculation in Excel, the tank size needs to be exported as the original value. Let me know if I'm missing something or if there's a reason the tank size is exported as something other than the raw value. Is there a way for me to export the raw tank size?

Thanks!
-Mike
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Exporting tank size data

Post by divinglog »

Hi Mike

The raw tank size value is stored in metric units, in Liter. These are the caluculations between Liter and CuFt:

Code: Select all

CuFt = Liter * 0.035335689046 * PresW
Liter = (CuFt * 28.3) / PresW
So you can see, changing the working pressure will change the calculation between metric and imperial units. If you enter 100 cuft, Diving Log calculates the liter value, and stores it in the database. During display or export, the liter gets calculated back to cuft. To get the real raw values from the database, you have to switch the units in Diving Log to metric, then export and then switch back to imperial

Kind regards,
Sven
SwamiMacGyver
Posts: 13
Joined: Tue Nov 15, 2011 01:37

Re: Exporting tank size data

Post by SwamiMacGyver »

Thanks for your replies, Sven! I truly appreciate how much time you spend responding to questions like these :-)

So, for my 100CuFt tank (PressW of 3442), that would be .822196 liters (100*28.3/3442). The value that's exported is 83.47464752. How do you get that number? The reverse calculation should result in 100 (.822196 * 0.035335689046 * 3442), so I haven't been able to figure out where the 83.4746... comes from.

What value do you store for dives where I didn't input a working pressure (since you'd have to divide by 0 or something...)?

-Mike
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Exporting tank size data

Post by divinglog »

Hi Mike

I forgot to mention that my formulas take metric units, so you have to convert the working pressure to bar:

3442 PSI = 237 bar
100 CuFt = 100 * 28.3 / 237 bar = 11.9 liter

But I've just tried to export that dive in imperial units to Excel and it seems something is not working correctly. The 100 CuFt should be exported of course as 100 CuFt and nothing else. For some reason it gets exported as 83 CuFt, so it looks like my export function does not convert the value correctly back to imperial units. I have to check my code, but I would guess Diving Log does not use the correct working pressure during export. It seems Diving Log is using the formula below (11.9 liter * 7 = 83 CuFt)

If no working pressure is entered, Diving Log is using this formula (which is using a default working pressure of ca. 2900 PSI):

Liter = CuFt / 7

I'll fix my export functions so it is using the correct entered working pressure.

Kind regards,
Sven
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Exporting tank size data

Post by divinglog »

Hi Mike

I've fixed the Excel export and the tank size is now exported correctly in imperial units. Please download this update and extract it into the Diving Log 6.0 program folder.

Thank you for reporting this bug and sorry it took some time to understand the root of the problem! Please let me know if it works not for you.

Kind regards,
Sven
Post Reply