nyxtom / dive

Various standard scuba diving algorithms, formulas, calculations and device management. :sparkles: :turtle: :rocket: :sparkles:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure pressure conversions

jirkapok opened this issue · comments

I have two questions regarding pressure conversions:

  1. https://github.com/nyxtom/dive/blob/master/lib/core.js#L386
    contains temperature checks, which for 100°C use the lower range constants. Shouldn't they use the higher range constants?
  2. For all the depth to pressure conversions the altitudePressure.current constant is used except https://github.com/nyxtom/dive/blob/master/lib/core.js#L322
    Shouldn't be used everywhere?
  3. And also the constant is in bars (i guess), but is used in addition to pascals or Atm which looks like a unit mismatch. (e.g. https://github.com/nyxtom/dive/blob/master/lib/core.js#L244)

Arent these mistakes in calculations?