Beta

Scuba Diving Safety: Oxygen Toxicity

Description
Loading description...
Physics
Fundamentals
  • Please sign in or sign up to leave a comment.
  • vlbee Avatar

    Hi Voile,

    There is no reason the chart in the Kata needs to go beyond 1.4 bar which is the max safe range for normal recreational diving. I guess I included the wider range because the idea is that the chart is an external source of information the programme needs to reference, and it is published with wider ranges. So in a real life programming scenario, if you were writing code for a dive computer, you would need to limit the range of the input data to suit your programe.

    However, as it's confusing I can remove this easily and will do so now. (In writing this Kata I realized how complicated diving physics and safety is!)

    • Voile Avatar

      Sure :)

      (Also you should reply on the comments by clicking the Reply button under the comment, so that everything is gathered inside a single thread.)

    • vlbee Avatar

      total fail there :)

      The chart is reduced now to a .6 - 1.4 range.

  • Voile Avatar

    If we're only ever allowing oxygen level to reach 1.35 before declaring it's unsafe, why the chart has values up to 1.8?

  • vlbee Avatar

    Hi Voile - just fixed this. Thanks for spotting!

  • Voile Avatar

    Sample tests says:

    Test.assertEquals(diveSafe(120, 20, 32), 'MOD REACHED. Replan your dive.')

    But description says:

    "MAX OPERATING DEPTH REACHED. Replan your dive."

    .