Skip to content

soaresden/MN90Mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

35 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿคฟ MN90 Mobile Planner

Professional Dive Planning Tool - Plan your dives safely with French MN90 decompression tables on any device! ๐Ÿ“ฑ๐Ÿ’ป

HTML5 JavaScript Responsive License


โœจ Features

๐Ÿงฎ Advanced Dive Calculations

  • Real-time dive planning with instant feedback
  • Autonomy calculations (bottom time vs. air consumption)
  • Safety pressure management and gas reserve tracking
  • Decompression requirements based on MN90 French tables
  • Multi-level dive profiles with stop simulations

๐Ÿ“Š Interactive Visualizations

  • Beautiful dive profiles with color-coded decompression stops
    • ๐ŸŸ  Bottom time (orange)
    • ๐Ÿ”ต 15m stops (cyan)
    • ๐ŸŸข 12m stops (green)
    • ๐ŸŸฃ 9m stops (purple)
    • ๐Ÿ”ด 6m stops (red/pink)
    • ๐ŸŸก 3m stops (yellow)
  • Live graphing with Chart.js
  • DTR (Decompression Time Remaining) display
  • Autonomy trends showing consumption patterns
  • MN90 tables viewer with dynamic columns

๐Ÿ“ฑ Fully Responsive Design

  • โœ… Desktop - Full-featured split-view interface
  • โœ… Tablet - Optimized vertical layout
  • โœ… Mobile - Touch-friendly controls (handles, sliders)
  • โœ… Drag-to-resize panels on all devices
  • โœ… Touch-optimized sliders (28px handles on mobile)

๐ŸŽฏ Three Powerful Tabs

1๏ธโƒฃ Autonomy Tab ๐Ÿซ

Calculate how long you can stay underwater based on:

  • Depth (6-65m)
  • Bottom time
  • Gas mixture (AIR, Nitrox, Custom)
  • Initial pressure
  • Consumption rate
  • Safety pressure margin

Features:

  • Real-time validation warnings
  • PPOโ‚‚ (Partial Pressure of Oxygen) calculation
  • Optimal dive curves showing maximum possible bottom time
  • Autonomy trends chart
  • Margin of optimization analysis

2๏ธโƒฃ Tables Tab ๐Ÿ“‹

Browse official MN90 decompression tables with:

  • Depth selection (6-65m)
  • Bottom time lookup
  • Dynamic decompression stops (P15, P12, P9, P6, P3)
  • Group letter assignment
  • Colored dive profile visualization with palier zones
  • DTR calculation
  • User's selected dive highlighted in summary

3๏ธโƒฃ Settings Tab โš™๏ธ

Fine-tune your dive planning:

  • Gas mix parameters
  • PPOโ‚‚ limits
  • Safety thresholds
  • Consumption profiles

๐Ÿš€ Quick Start

Option 1: Direct Usage

Simply open mn90_mobile_compact_improved.html in any modern web browser:

# On macOS
open mn90_mobile_compact_improved.html

# On Linux
xdg-open mn90_mobile_compact_improved.html

# On Windows
start mn90_mobile_compact_improved.html

Option 2: Local Server (Recommended)

# Using Python 3
python3 -m http.server 8000

# Using Node.js
npx http-server

# Using PHP
php -S localhost:8000

Then open: http://localhost:8000/mn90_mobile_compact_improved.html


๐Ÿ“– How to Use

๐Ÿซ Autonomy Tab

  1. Set your dive parameters:

    • Adjust depth with the depth slider (6-65m)
    • Set bottom time (how long you want to stay at depth)
    • Choose your gas mixture (AIR, Nitrox, Custom)
    • Set initial bottle pressure
    • Adjust consumption rate
  2. View results:

    • ๐Ÿ“Š Real-time autonomy calculation
    • โš ๏ธ Validation warnings (if safety exceeded)
    • ๐Ÿ“ˆ Consumption trend chart
    • ๐Ÿ’ก Optimization margin (if you can dive longer safely)
  3. Optimize:

    • The "optimal dive curves" (dashed lines) show maximum possible bottom time
    • Compare with your planned dive (solid lines)

๐Ÿ“‹ Tables Tab

  1. Select depth: Use the depth slider (6-65m)
  2. Set bottom time: Choose your desired time at depth
  3. View profile:
    • ๐ŸŽจ Colored dive profile with palier zones
    • ๐Ÿ“Š MN90 table for selected depth
    • ๐Ÿ“Œ Your selected dive highlighted
  4. Check decompression:
    • ๐Ÿ”บ DTR (Decompression Time Remaining)
    • ๐Ÿงฎ Palier requirements (15m, 12m, 9m, 6m, 3m)
    • ๐Ÿ“ Group letter assignment

โš™๏ธ Settings Tab

Configure defaults for all calculations and gas mixtures.


๐ŸŽฎ Mobile Controls

๐Ÿ“ Drag to Resize

  • All panel separators (โ–Œ) are draggable
  • Works with mouse or touch
  • Panels maintain minimum size constraints
  • Charts auto-update when resized

๐Ÿ‘† Touch Optimization

  • Sliders: 28px touch targets on mobile (vs 18px on desktop)
  • All controls have generous spacing
  • Full touch support for all interactions

๐Ÿ“ฑ Responsive Breakpoints

  • < 768px: Tablet/Mobile layout (vertical stacking)
  • < 480px: Small phone optimization
  • > 1024px: Full desktop experience

๐Ÿ› ๏ธ Technical Stack

Component Technology
Frontend HTML5 + Vanilla JavaScript
Charting Chart.js 3.x
Data MN90 French Decompression Tables (410+ entries)
Styling CSS3 (Flexbox, Grid, Media Queries)
Storage LocalStorage for settings (no server needed!)
Compatibility All modern browsers (Chrome, Firefox, Safari, Edge)

๐Ÿ“Š Data Source

All decompression data based on the French MN90 Standard tables:

  • โœ… 29 depths (6m to 65m)
  • โœ… Multiple bottom times per depth
  • โœ… Decompression stops at 15m, 12m, 9m, 6m, 3m
  • โœ… Group letter assignments (A-P, *)
  • โœ… 410+ dive profiles

๐ŸŽจ Color Scheme

Background:     #1a2332 (Dark Navy)
Primary:        #00d4d4 (Cyan) โ” Dive planning color
Accent:         #06b6d4 (Bright Cyan) โ” Highlights
Success:        #2d8b8b (Teal)
Warning:        #f59e0b (Amber)
Danger:         #ef4444 (Red)

Palier Colors:
  P15: #06b6d4 (Cyan)
  P12: #22c55e (Green)
  P9:  #a855f7 (Purple)
  P6:  #f43f5e (Red)
  P3:  #fbbf24 (Yellow)

โš™๏ธ Configuration

Default Parameters

Edit inside <script> section:

// Initial values
const initialDepth = 20;        // meters
const initialTime = 20;         // minutes
const initialConsumption = 23;  // L/min
const initialBottlePressure = 210; // bar
const safetyPressure = 50;      // bar reserve

Gas Mixtures

Modify the gas mix definitions:

  • AIR: 21% Oโ‚‚, 79% Nโ‚‚ (standard)
  • NITROX: Customizable Oโ‚‚ percentage
  • CUSTOM: Define your own mix

๐Ÿ” Safety Considerations

โš ๏ธ DISCLAIMER: This tool is for educational and planning purposes only. Always:

  • โœ… Follow your certification agency's guidelines
  • โœ… Consult official tables and dive computers
  • โœ… Never dive alone
  • โœ… Plan conservative dives with margin
  • โœ… Follow your training and experience limits
  • โœ… Check with qualified instructors

This tool does NOT replace professional dive training or certification!


๐Ÿ› Browser Support

Browser Version Status
Chrome 90+ โœ… Full Support
Firefox 88+ โœ… Full Support
Safari 14+ โœ… Full Support
Edge 90+ โœ… Full Support
Opera 76+ โœ… Full Support
IE 11 - โŒ Not Supported

๐Ÿ“ฆ File Structure

mn90_mobile_compact_improved.html
โ”œโ”€โ”€ HTML Structure (3 tabs)
โ”œโ”€โ”€ CSS Styling (responsive)
โ”œโ”€โ”€ Chart.js Integration
โ”œโ”€โ”€ MN90 Data Tables (410 entries)
โ””โ”€โ”€ JavaScript Logic
    โ”œโ”€โ”€ Calculations
    โ”œโ”€โ”€ Validations
    โ”œโ”€โ”€ Graphing
    โ”œโ”€โ”€ Touch/Resize Handlers
    โ””โ”€โ”€ Mobile Optimization

File Size: ~120 KB (self-contained, no dependencies except Chart.js via CDN)


๐ŸŽฏ Key Formulas

Autonomy Calculation

Final Pressure = Initial Pressure - (Depth + 10) / 10 ร— Consumption ร— Time

Decompression Requirements

Based on MN90 tables:

  • Depth & bottom time โ†’ Decompression stops
  • Stops at 15m, 12m, 9m, 6m, 3m (as required)
  • Ascent rate: 6 m/min (standard safety)

PPOโ‚‚ (Partial Pressure Oโ‚‚)

PPOโ‚‚ = (Depth/10 + 1) ร— Oโ‚‚%

๐Ÿš€ Features Roadmap

  • ๐Ÿ“ Altitude dive adjustments
  • ๐ŸŒก๏ธ Temperature effects simulation
  • ๐Ÿ’พ Dive logging & history
  • ๐Ÿ”— Share dive plans (URL encoding)
  • ๐ŸŒ™ Dark/Light theme toggle
  • ๐Ÿ—ฃ๏ธ Multi-language support (FR, EN, DE, ES)
  • ๐Ÿ“ฒ Progressive Web App (PWA)
  • โŒš Apple Watch integration
  • ๐ŸŽ“ Tutorial & certification modes

๐Ÿค Contributing

Contributions welcome! ๐ŸŽ‰

To Contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Test thoroughly on mobile & desktop
  4. Commit changes: git commit -m 'Add amazing feature'
  5. Push to branch: git push origin feature/amazing-feature
  6. Open a Pull Request

Code Style:

  • Use meaningful variable names
  • Add comments for complex calculations
  • Test on multiple devices
  • Maintain responsive design

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

๐Ÿ‘จโ€๐Ÿ’ป Author

Built with โค๏ธ for the diving community ๐Ÿคฟ

Questions? Issues? Feature requests?

โ†’ Open an issue on GitHub
โ†’ Submit a pull request
โ†’ Contact: [your-email@example.com]


๐Ÿ™ Acknowledgments

  • ๐Ÿ‡ซ๐Ÿ‡ท French MN90 Decompression Tables - FFESSM/CMAS Standard
  • ๐Ÿ“Š Chart.js - Beautiful JavaScript Charting
  • ๐ŸŒ MDN Web Docs - Web Platform Reference
  • ๐Ÿคฟ Diving Community - For the feedback and safety culture

๐ŸŽฌ Usage Examples

Scenario 1: Planning a 30m dive ๐ŸŠ

  1. Go to Autonomy Tab
  2. Set Depth: 30m
  3. Initial Pressure: 210 bar
  4. Adjust bottom time until autonomy shows comfortable margin
  5. Switch to Tables Tab to see exact decompression requirements
  6. Review colored profile and DTR
  7. Plan your decompression stops! โœ…

Scenario 2: Nitrox dive at 20m ๐Ÿซ

  1. Go to Settings Tab
  2. Select NITROX gas mix
  3. Set Oโ‚‚: 32% (Nitrox32)
  4. Back to Autonomy Tab - see improved autonomy!
  5. Check PPOโ‚‚ - should be safe at 20m
  6. Plan your dive! ๐Ÿš€

Scenario 3: Mobile dive planning on the boat ๐Ÿ“ฑ

  1. Open on your phone
  2. Tap sliders to adjust parameters
  3. Drag panel separators to see more details
  4. Screenshot the profile for reference
  5. Dive safely! ๐ŸŒŠ

๐Ÿ“ž Support

  • Bug Reports: Open an issue with details
  • Feature Requests: Describe your use case
  • Questions: Check existing issues first
  • Security: Report security issues privately

๐ŸŒŸ If you find this useful...

โญ Star the repository!
๐Ÿ“ข Share with your dive buddies!
๐Ÿ’ช Contribute improvements!


Happy diving! ๐Ÿคฟโœจ

      โ– ~ โ– ~ โ–
    ๐Ÿคฟ MN90 Planner ๐Ÿคฟ
      โ– ~ โ– ~ โ–
     Safety First Always

Last Updated: 2025-01-16
Version: 1.0.0
Status: Stable & Production Ready โœ…

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages