Engineering Hobby

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

I wrote an easy Excel/Visual Basic for Applications Program for figuring out gas management and decompression profiles utilizing Ratio Deco, on the company computer at work . . .(unfortunately it's the intellectual property of Northrop Grumman Aerospace so I can't market & sell it).

Can't stop me from giving it away though. . .;)
 

Attachments

I wrote an easy Excel/Visual Basic for Applications Program for figuring out gas management and decompression profiles utilizing Ratio Deco, on the company computer at work . . .(unfortunately it's the intellectual property of Northrop Grumman Aerospace so I can't market & sell it).

Can't stop me from giving it away though. . .;)
As a fellow NG employee I'd dare say you better check again if you can give it away without the possibility of repercussions. That said, thanks, that's a nice tool even if I won't be doing any deco diving!
 
I wrote an easy Excel/Visual Basic for Applications Program for figuring out gas management and decompression profiles utilizing Ratio Deco, on the company computer at work . . .(unfortunately it's the intellectual property of Northrop Grumman Aerospace so I can't market & sell it).

Can't stop me from giving it away though. . .;)

Does "Restraining Order" have no meaning there?
 
As a fellow NG employee I'd dare say you better check again if you can give it away without the possibility of repercussions. That said, thanks, that's a nice tool even if I won't be doing any deco diving!

Does "Restraining Order" have no meaning there?
Unless Northrop Grumman Aerospace has a vested proprietary interest in "Scuba gas management & Ratio Deco profile spreadsheet tools" --there's no issue for my own personal use & sharing it with other interested Scuba divers just as long as there's no monetary profit involved.

The underlying algorithm as written for MS Excel, is nothing more unique or special than somethng you would write in Visual Basic for a beginning computer science course exercise . . .just simple input/output user prompts, looping & cases logic structures and elementary arithmetic/algebraic equations.
 
Program your HP 33s RPN Calculator to total the amount in Litres of breathing gas needed for a particular dive.
Input prompts for Depth ("D") in meters, Time ("T") at that depth in unit minutes with seconds in decimal base ten format
[so for example, 1min 30sec is entered as 1.5], and SCR ("S") [SCR --stands for Surface Consumption Rate, same as SAC rate in litres/min].
Program loops through your depth range, time at each depth and SCR, all the way to the surface --and yields the total gas needed in Litres.

L0001 LBL L
L0002 INPUT D
L0003 INPUT T
L0004 INPUT S
L0005 (D/10 + 1) X T X S [i.e. Depth-divided-by-10 plus 1, multiplied by Time and multiplied by SCR]
L0006 ∑+
L0007 29
L0008 STO i
L0009 VIEW(i)
L0010 D – 3
L0011 STO D
L0012 x ≥ 0?
L0013 GTO L
L0014 CLVARS
L0015 ∑x
L0016 ∑x
L0017 ∑x
L0018 ∑x
L0019 CL∑
L0020 RTN
PRGM TOP

(All the above is just an iterative application of a Gas Calculation exercise in the GUE Fundamentals of Better Diving Workbook. . .)
 
Last edited:
You truly are a nerd!!!

I still have the HP48G that I got for engineering school nearly twenty years ago that I haven't yet figured out how to program and use.

Program your HP 33s RPN Calculator to total the amount in Litres of breathing gas needed for a particular dive.
Input prompts for Depth ("D") in meters, Time ("T") at that depth in unit minutes with seconds in decimal base ten format
[so for example, 1min 30sec is entered as 1.5], and SCR ("S") [SCR --stands for Surface Consumption Rate, same as SAC rate in litres/min].
Program loops through your depth range, time at each depth and SCR, all the way to the surface --and yields the total gas needed in Litres.

L0001 LBL L
L0002 INPUT D
L0003 INPUT T
L0004 INPUT S
L0005 (D/10 + 1) X T X S [i.e. Depth-divided-by-10 plus 1, multiplied by Time and multiplied by SCR]
L0006 ∑+
L0007 29
L0008 STO i
L0009 VIEW(i)
L0010 D – 3
L0011 STO D
L0012 x ≥ 0?
L0013 GTO L
L0014 CLVARS
L0015 ∑x
L0016 ∑x
L0017 ∑x
L0018 ∑x
L0019 CL∑
L0020 RTN
PRGM TOP

(All the above is just an iterative application of a Gas Calculation exercise in the GUE Fundamentals of Better Diving Workbook. . .)
 
You truly are a nerd!!!

I still have the HP48G that I got for engineering school nearly twenty years ago that I haven't yet figured out how to program and use.
i've got a HP48SX that's over twenty years old as well . . .and when you've got nearly 24hrs of travel time across the Pacific to Micronesia/Oceania/Australia (and no free WiFi in the airport terminals of HNL, NRT & GUM), you find things to do like program your old HP Calculator. . .;)

<< DO
D
"Key in Depth Meters"
PROMPT 'D' STO
CLEAR
T
"Key in Time Min"
PROMPT 'T' STO
CLEAR
S
"Key SCR Litrs per Min"
PROMPT 'S' STO
CLEAR
'(D/10 + 1)*T*S' EVAL
'gastot'
STO+
'D' 3 STO-
UNTIL 'D' 0 <
END
gastot
DUP DUP DUP2
->STR "Litres needed "
SWAP + CLLCD 1 DISP
1 FREEZE
{ gastot D T S } PURGE
>>
 
Last edited:
(Found and resurrected an old Hewlett-Packard Calculator of mine):

How to program an old HP 33s/35s RPN Calculator (HP Focal Language) to total the amount in Liters or Cubic Feet of breathing gas needed for a Minimum Gas Reserve (MGR) "Rock Bottom" ascent to surface.

Input prompts for Depth ("D") in meters or feet, Time ("T") at that depth in minutes:seconds [so for example, 20 seconds is entered as 0.20; 1min 30sec is entered as 1.30], and SCR ("S") [Surface Consumption Rate or SAC rate in liters/min or cubic feet/min].

Program loops through your depth range, time at each depth and SCR, all the way to the surface --and sums the total gas needed in Liters or Cubic Feet.

(For Liters):
L0001 LBL L
L0002 INPUT D [// Depth in Meters //]
L0003 10
L0004 ÷
L0005 1
L0006 +
L0007 INPUT T
L0008 ->HR
L0009 X [// "X" denotes multiplication operation symbol and not a variable "x" //]
L0010 INPUT S
L0011 X [// "X" denotes multiplication operation symbol and not a variable "x" //]
L0012 Σ+
L0013 RCL D
L0014 3
L0015 -
L0016 STO D
L0017 x => 0? [//loop test: is "D" depth still equal or greater than zero? --If less than zero then exit loop//]
L0018 GTO L
L0019 CLVARS [//exit loop to total gas needed in liters//]
L0020 Σx [//this is the sum total gas in liters needed//]
L0021 ΕNTER
L0022 CLΣ
L0023 RTN

(For Cubic Feet):
C0001 LBL C
C0002 INPUT D [// Depth in Feet //]
C0003 33
C0004 ÷
C0005 1
C0006 +
C0007 INPUT T
C0008 ->HR
C0009 X
C0010 INPUT S
C0011 X
C0012 Σ+
C0013 RCL D
C0014 10
C0015 -
C0016 STO D
C0017 x => 0?
C0018 GTO C
C0019 CLVARS
C0020 Σx
C0021 ΕNTER
C0022 CLΣ
C0023 RTN

All the above is just a simple iterative programming application of the manual Gas Calculation exercise in the GUE Fundamentals of Better Diving Workbook. . .
 
Last edited:

Back
Top Bottom