Skip to content

YaceroConsulting/dykupp

Repository files navigation

Dykning med direktuppstigning

Build and deploy

This template leverages Remix SPA Mode and the Remix Vite Plugin to build your app as a Single-Page Application using Client Data for all of your data loads and mutations.

Frontpage Haiku generated with the help of PartyRock

Roadmap

  • Övning av gruppbeteckning efter dykning med direktuppstigning med maximal expositionstid samt
  • Övning av upprepade dyk med direktuppstigning med direktuppstigning
  • Övning av upprepade dyk med olika djup (multi-level diving)

Data

Data values for expositionstime are stored in JSON file. The data is extracted from the Swedish Navy's diving tables. The file below is described by the Swedish description from the original source table U.S. Navy Diving Manual (USN rev 6)

  • expositionstid.json - Maximal expositionstid samt gruppbeteckning efter dykning med direktuppstigning. Före ytintervall.
  • app/practice.ts contains function repeatedDives that have a list of repeated dive questions.

Repeate dives

There are two different questions that can be asked for the second dive.

Ask the student to caclulate the maximum dive time for the second dive from the maxRemaining object.

{
        ...
        surfaceTime: { hours: 1, minutes: 30, letter: 'J' },
        secondDive: { time: 60, depth: 18, group: 'K' },
        maxRemaining: {
            diveTimeAtDepth: 2,
            consumed: 58,
            maxExposition: 60,
        },
    },

Ask the student to provide the maximum exposition time for the group and depth, and the consumed time. This is because the maxRemaining object does not contain the diveTimeAtDepth property.

{
    ...
    surfaceTime: { hours: 0, minutes: 55, letter: 'E' },
    secondDive: { time: 60, depth: 12, group: 'K' },
    maxRemaining: { consumed: 45, maxRemaining: 118 },
},

Development

You can develop your SPA app just like you would a normal Remix app, via:

npm run dev

Testing and Linting

To run unit tests:

npm run test

To format your code:

npm run format

To lint your code:

npm run lint

Production

When you are ready to build a production version of your app, npm run build will generate your assets and an index.html for the SPA.

npm run build

Deployment

This application is deployed to GitHub Pages.

Learn more

To learn more about the technologies used in this site template, see the following resources:

Landing page image generated with DALL-E 3 OpenAI model.

Prompt used: "An illustration of a helmeted commercial diver receiving oxygen from a tube from the surface portrayed underwater with a school of fish."