scalc is a Web tool for interactive calculations needed for planning technical scuba dives.
You can open the application here at GitHub pages by clicking this line
SCALC is currently work in progress and under active development. The existing and planned calculation tools include:
- MOD calculation: working
- gas blending: working, needs improvement
- dive planner: simple prototype, has many bugs and issues
There is a working sample of the tool running at: http://scalc.ianleiman.com/
This sample may not be as up to date as the github.io instance that syncs directly from this repo: https://eianlei.github.io/scalc/index.html
This is a web application so it needs to be served by a web server to a web browser. You can either install it to a "real" web server (such Apache, nginx) or use some local development solution such as VS Code Live Server extension.
It is possible to make this app run on electron so it can run like a normal desktop application.
Just copy all the files in source folder to a web site server root. Or git clone this repo to the server. The web server will serve index.html, which will call out all the modules. Usually a web browser will cache the entire application as it so small.
If you have Visual Studio Code installed, then it is really easy to run any web app using the Live Server extension.
In Visual Studio Code clone this repository. Install "Live Server" extension. Now you can launch the app from editor to your browser using a local server with live reload.
scalc is made from plain vanilla HTML, CSS, Javascript and does not use any fancy JS frameworks (such as Angular, React, Vue, Svelte etc...). The UI uses plain HTML5 elements and canvas. Calculations are done by pure and simple Javascript functions running on your browser. There is no back-end, nothing is calculated at the server end.
jQuery
The Javascript used in calculations is refactored (manually transpiled) from following Python and C# projects that I have published previously:
The UI is a web (HTML5, CSS, JS) implementation of the respective GUIs done previously in Qt5 or WPF/.NET 4.8/XAML.
The application is intended for certified technical divers and Trimix gas blenders, who blend gases and make plans for technical scuba diving.
It is assumed that anyone daring to use this application knows what they are doing.
Use this application at your own risk, the author provides no guarantees about the correctness of the application, and assumes no liability for the use of it for any purpose!
- In no event should you consider blending breathing gases without proper training!
- In no event should you consider scuba diving with mixed gases without proper training!
- Ignoring these warnings can cause your death or serious and permanent injuries!
- 2021-11-03 published to github a quickly hacked up demo, that needs lot of TLC
- 2021-11-08 added the dive planner prototype
- 2021-11-12 most of essential functionality in place
- 2021-11-21 big cleaning up & refactoring of very messy code in planner
- 2021-11-23 implemented Van Der Waals gas law calculation to blender
- some cleanup, proper structuring and commentting to the sources
- make UI mobile friendly (CSS)
- do a proper favicon
- add user documentation
- to Blender: bring up all the same functionality that exists in FillCalcWin
- new feature: use gas temperatures in calculations
- Planner implementation,
- Bühlmann: have manually transpiled Python code to Javascript from pydplan, but the code still need some fine tuning
- improvements on graphical web UI
- desktop version will run on electron and include Windows installer
- Android and iOS mobile versions using Cordova
Copyright (C) 2021 Ian Leiman
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.