/odysseus-mct

Odysseus engineering UI (based on OpenMCT)

Primary LanguageJavaScriptOtherNOASSERTION

Odysseus engineering UI

Odysseus engineering UI is based on Open MCT.

This repository is based on the Open MCT tutorial.

Screenshots

Screenshot 2024-07-16 at 09-31-39 Jump drive state

Screenshot 2024-07-16 at 09-32-14 Ship status

Screenshot 2024-07-16 at 09-31-25 Ship faults

Documentations

Local setup

If this doesn't work, don't be supprised. Ask for help in discord or try Local setup in Docker or Local setup in VSCode Dev Container instead.

Launch:

npm install
npm start

The content assumes that:

The base URL http://localhost:8082/ is replaced by the relative odysseus-misc-ui path by deployment build scripts.

Local setup in Docker

You can also run the odysseus-mct in Docker

Requirements

dictionary.js

Update your dictionary.js (row 136) from

        "url" : "https://apps.odysseuslarp.dev",

to

        "url" : "http://localhost:8888",

Run

  • To build docker image run docker-compose build
  • To start the docker container run docker-compose up
  • In case you need to restart the docker container run docker restart odysseus-mct

Odysseus MCT should now be available at http://localhost:8060 (odysseus-mct was changed to port 8060 due to HANSCA taking the port 8080)

NOTE! With Windows changing the code will not automatically update in browser --> Refresh the page and the page should be updated.

Local setup in VSCode Dev Container

You can also run the backend using VSCode dev containers. Create/update your .env file like in the local setup instructions.

Requirements

Install Dev Containers extension for vscode.

  • Open new window in VSCode
  • File --> Open Folder... --> odysseus-mct
  • Update dictionary.json as instructed in dictionary.js
  • VSCode will ask do you want to Reopen in Container --> Click it
    • If you are too slow --> Click the button in left bottom corner (looks like two L:s or disjointed ><) and choose Reopen in Container from the menu.
  • VSCode will then start up the odysseus-mct service

Odysseus MCT should now be available at http://localhost:8060 (odysseus-mct was changed to port 8060 due to HANSCA taking the port 8080)

NOTE! With Windows changing the code will not automatically update in browser --> Refresh the page and the page should be updated.

Problems?

  • Try to rebuild the container: Click the button in left bottom corner (looks like two L:s or disjointed >< with the container name) and choose Rebuild Container from the menu.
  • You might run into this issue on ARM processors, see the issue for potential workarounds.

Editing ESS Odysseus views

To edit the default views within ESS Odysseus folder:

  1. Right-click top-level ESS Odysseus and choose Duplicate
  2. Duplicate in My Items
  3. Edit copy in My Items
  4. Right-click ESS Odysseus in My Items and choose Export as JSON
  5. Save as tmp.json
  6. Pretty-print the JSON in place of odysseus.json:
    python3 -m json.tool tmp.json odysseus.json

Make sure that all iframes in odysseus-misc-ui have base URL http://localhost:8082/.

Jumping the Odysseus (from Admin UI)

  • Make a jump Admin UI Jump drive tab tab
    • Move to calculating --> OK
    • Approve jump --> OK
    • Mark spectral calibration done --> OK
    • Mark jump reactor done --> OK
    • Next state (prep complete) --> OK
    • Initiate jump --> OK --> Wait 60 seconds
    • If you want to break the ship click Change to breaking jump or Change to minor breaking jump --> OK
    • End jump --> OK
  • To continue jumping
    • Bypass engineer fixes --> OK
    • Mark cooldown done --> OK

Now there should be stuff happening in Jump drive state, Ship faultsand Ship status.

Breaking Odysseus Manually (for testing purposes)

  • Go to Admin UI Empty Epsilon tab
    • Disable connection and Disable state synchronization (otherwise it will sync back to full health since Empty Epsilon is not running and it defaults to full health)
    • Break things by Update values example
      • Target type: systems
      • Target: impulse
      • Value type: health
      • Value: 0.7
      • Set value

When you go back to see Ship status the impulse engine health should be down to 70% and Ship faults should now have Malcunctions listed

Fixing Odysseus Malfunctions (for testing purposes)

  • Either use HANSCA
  • Or from Admin UI Data stores tab
    • Choose game or box from dropdown
    • Scroll to see which Status is broken
    • Click the one which is broken
    • Change "status": "broken", to "status": "fixed",
    • OK

When you go back to Ship faults there should be some Calibrations going on.