I suggest you ...

Calculating RMV

It would be nice to see an average RMV being calculated based off of the data that came out of the computer. I assume that you can get the pressures from air integrated computers so calculating an average RMV for each dive should not be too hard to integrate.

1 vote
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
John Lento shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

26 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • AdminDiveboard team (Admin, Diveboard) commented  ·   ·  Flag as inappropriate

    cool :) so if u're happy with the maths they'll be in production tmrw morning after i drop kid @ school ;)
    (and everything will recalculate magically ;) )

    plenty kudos for your help and support !

  • John Lento commented  ·   ·  Flag as inappropriate

    Sweet. So can we apply this to all profiles? I love what you are doing with Diveboard. I have wanted to do something similar for a long time. Good Job!

  • AdminDiveboard team (Admin, Diveboard) commented  ·   ·  Flag as inappropriate

    sure :)

    this is what i get when usign the real values

    (avg depth being 14.860869565217392 m calculated from profile)

    irb(main):001:0> Tank.find(276).RMV_n(true)
    => 17.76
    irb(main):002:0> Tank.find(276).SAC_n(true)
    => 1.48
    irb(main):003:0> Tank.find(276).RMV_n(false)
    => 0.629
    irb(main):004:0> Tank.find(276).SAC_n(false)
    => 21.5

  • John Lento commented  ·   ·  Flag as inappropriate

    The numbers in the detail section look good. I just know for the RMV in SI you do not use the pressure rating. Can you apply that formula to my Corsair dive so I can check the math?

  • John Lento commented  ·   ·  Flag as inappropriate

    I think your metric units are still off.

    This is what I got.

    SAC = (40 / 38) / ((18 /10) + 1) = .37 BAR/min
    RMV = .37 * (12) = 4.44 L/min

    That makes sense but I assumed 18m average depth.

  • Jason Prater commented  ·   ·  Flag as inappropriate

    The information needed to sanity check your code is:
    Start pressure & units
    End Pressure & units
    Dive Time
    Average Depth & units

  • Jason Prater commented  ·   ·  Flag as inappropriate

    In your original code example I think line 45 is where the problem is. Looks like you were using the volume of the tank instead of a 'tank baseline' type number. Your new results look reasonable. Is there someplace to read the average depth on the site? I can see you using it in the code example, but can't find it for your example dive.

  • John Lento commented  ·   ·  Flag as inappropriate

    Ok, I figured it out. When calculating SI it is

    RMV = SAC * tank_size
    For Imperial it is RMV = SAC * (tank_size / tank_rating)

    Does that make sense?

    For SI everything it in BAR. For Imperial you are using ATA and PSI so you have to convert.

  • AdminDiveboard team (Admin, Diveboard) commented  ·   ·  Flag as inappropriate

    ok :)

    lookign better now :

    in imperial units (for my tank : http://stage.diveboard.com/ksso/5430)

    irb(main):012:0> Tank.find(276).RMV_n(false)
    => 0.63
    irb(main):013:0> Tank.find(276).SAC_n(false)
    => 21.5

    yeah... i'm a heavy breather ...

    in SI

    irb(main):015:0> Tank.find(276).RMV_n(true)
    => 0.0753
    irb(main):016:0> Tank.find(276).SAC_n(true)
    => 1.48

    does that sound realistic ?

    I need to add the tank pressure rating as a user modifiable field...
    curretly it's

    def pressure_rating (si=true)
    if si
    return 236 #236 bars
    else
    return 3420 #3420 psis
    end
    end

  • John Lento commented  ·   ·  Flag as inappropriate

    So I just calculated it out using my formula and it makes sense.

    Baseline for calculation (agnostic of unit): http://www.diveboard.com/johnlento/5283

    SAC = ((2936-1096) / 28) / ((100 / 33) + 1)
    SAC = 16.35 PSI/minute
    RMV = 16.35 * (80 / 3000)
    RMV = 0.436

    I think something in the code is dorked. I will take a look in a minute...PHP is not my strong suit.

  • John Lento commented  ·   ·  Flag as inappropriate

    That did help. Here is what I came up with. Tell me what you think.

    metricSAC = (p_diff / btime) / ((avdepth / 10) + 1)
    metricRMV = metricSAC * (tankVol / tankRatedPressure)

    Not sure which variables had the tank volume or rated pressure...

  • John Lento commented  ·   ·  Flag as inappropriate

    My bad on the baseline. Mixed up multiplication and division. I think the site SAC is actually RMV. Thanks for double checking Jason.

  • Jason Prater commented  ·   ·  Flag as inappropriate

    The calculation on the site seems to be about right, but I can't double-check the math without the average depth for the dive.

← Previous 1

Feedback and Knowledge Base