From 29dde952b667875ff186fd20480043c41fc91fa4 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 25 May 2024 00:12:10 +0000 Subject: [PATCH 1/4] Add docker description update job --- .github/workflows/docker-description.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/docker-description.yml diff --git a/.github/workflows/docker-description.yml b/.github/workflows/docker-description.yml new file mode 100644 index 00000000..13fde2ae --- /dev/null +++ b/.github/workflows/docker-description.yml @@ -0,0 +1,22 @@ +name: Update Docker Hub Description + +on: + push: + branches: + - master + paths: + - README.md + - .github/workflows/docker-description.yml + +jobs: + dockerHubDescription: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: sirromsystems/42 + readme-filepath: README.md From 7aea8503571c901493b0b72156fce412b7e852c1 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 25 May 2024 00:51:36 +0000 Subject: [PATCH 2/4] Update readme and remove duplicate readme --- README.md | 119 ++++++++++++++++++++++++++++++++++++++--------------- README.txt | 70 ------------------------------- 2 files changed, 85 insertions(+), 104 deletions(-) delete mode 100644 README.txt diff --git a/README.md b/README.md index 37f0319f..99f165b3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # 42 - Spacecraft Simulation +This is a fork of the 42 Spacecraft Simulator. The intent of this fork is +to provide an easier, deployment-friendly, and modernized version of 42. +This fork builds the same as its upstream, and is also available as a +docker image at https://hub.docker.com/r/sirromsystems/42 . + 42 is a comprehensive general-purpose simulation of spacecraft attitude and orbit dynamics. Its primary purpose is to support design and validation of attitude control systems, from concept studies through integration and test. 42 @@ -12,38 +17,72 @@ visualization of spacecraft attitude. Features: - - Multi-body dynamics (tree topology, rotational and/or translational - joints) - - Rigid and/or flexible bodies - - Multiple spacecraft (prox ops, formation flying, or independent) - - Inter-spacecraft and spacecraft-surface contact forces support landers, - rovers, and spacecraft servicing scenarios - - Two-body or three-body orbits, anywhere in the solar system - - Optional visualization - - Socket-based interprocess comm (IPC) interface to other apps - - Fast setup for concept studies - - Rigorous and full-featured to support full spacecraft life cycle +- Multi-body dynamics (tree topology, rotational and/or translational + joints) +- Rigid and/or flexible bodies +- Multiple spacecraft (prox ops, formation flying, or independent) +- Inter-spacecraft and spacecraft-surface contact forces support landers, + rovers, and spacecraft servicing scenarios +- Two-body or three-body orbits, anywhere in the solar system +- Optional visualization +- Socket-based interprocess comm (IPC) interface to other apps +- Fast setup for concept studies +- Rigorous and full-featured to support full spacecraft life cycle ## Installation -If you're installing on Windows, see the file "Install-msys.txt" in the Docs -folder. +### Docker + +Pull the image: + +```console +$ docker pull sirromsystems/42 +``` + +### Linux + +Install dependencies + +```console +$ sudo apt -y install make gcc g++ freeglut3-dev libglfw3-dev +``` + +Compile + +```console +$ make clean; make +``` -The compiler will attempt to detect what platform you're on (Linux, OSX, or +Note: the compiler will attempt to detect what platform you're on (Linux, OSX, or Msys), but its success rate isn't great. If you have errors on the first compile or run, try editing your Makefile to manually set your `42PLATFORM`. -For OpenGL graphics, newer Macs with Retina displays will need the GLFW graphics libraries, available from MacPorts, Homebrew, and probably elsewhere. Otherwise, you'll need the GLUT libraries, which are also readily available if not already installed on your system. Graphics are optional, settable in the Makefile by GUIFLAG. +### Windows -## Getting Started +See the file "Install-msys.txt" in the Docs folder. -See the overview, "42 Overview.pdf", in the Docs folder. Also recommended: +### OSX -- Nomenclature.pdf -- POV Menu.pdf -- Key Bindings.txt -- FSW Models.pdf -- Flight Regimes.pdf +For OpenGL graphics, newer Macs with Retina displays will need the GLFW graphics libraries, available from MacPorts, Homebrew, and probably elsewhere. Otherwise, you'll need the GLUT libraries, which are also readily available if not already installed on your system. Graphics are optional, settable in the Makefile by GUIFLAG. + +## Usage + +### Docker + +If you're using docker, run it: + +```console +$ docker run -v ${PWD}/path/to/sim/input/dir:/42/testcase 42 +``` + +Note: the docker image will attempt to look for the input case called "testcase", to change +this simply provide the case name as the first argument: + +```console +$ docker run -v ${PWD}/path/to/sim/input/dir:/42/MyCoolSimName 42 MyCoolSimName +``` + +### Native The default folder for inputs and outputs is "InOut". Look there for sample input files. "Inp_Sim.txt" is the top-level input file. @@ -51,18 +90,30 @@ input files. "Inp_Sim.txt" is the top-level input file. The input/output folder may be changed for a sim run by running 42 with an argument. For example, enter this at the command prompt: - 42 Demo +```console +$ ./42 examples/Demo +``` + +## Light Reading + +See the overview, "42 Overview.pdf", in the Docs folder. Also recommended: + +- Nomenclature.pdf +- POV Menu.pdf +- Key Bindings.txt +- FSW Models.pdf +- Flight Regimes.pdf ## Common Problems -1) 42 expects the input files to be plain vanilla text files. If your text -editor adds formatting, makes straight quotes into smart quotes, etc, 42 may get -confused. The most common symptom is generating the "Bogus input in -DecodeString" error. - -2) Also text-related, 42 is very simple-minded about reading the input files. -Adding extra lines, or accidentally deleting a line, or swapping lines, will -throw things out of synch. Again, the most common symptom is the "Bogus input in -DecodeString" error. Use your debugger to trace back where the error was -generated. (The actual mistake may be at that line, or may be somewhere -upstream.) +1. 42 expects the input files to be plain vanilla text files. If your text + editor adds formatting, makes straight quotes into smart quotes, etc, 42 may get + confused. The most common symptom is generating the "Bogus input in + DecodeString" error. + +2. Also text-related, 42 is very simple-minded about reading the input files. + Adding extra lines, or accidentally deleting a line, or swapping lines, will + throw things out of synch. Again, the most common symptom is the "Bogus input in + DecodeString" error. Use your debugger to trace back where the error was + generated. (The actual mistake may be at that line, or may be somewhere + upstream.) diff --git a/README.txt b/README.txt deleted file mode 100644 index 9a686d6f..00000000 --- a/README.txt +++ /dev/null @@ -1,70 +0,0 @@ -# 42 - Spacecraft Simulation - -42 is a comprehensive general-purpose simulation of spacecraft attitude and -orbit dynamics. Its primary purpose is to support design and validation of -attitude control systems, from concept studies through integration and test. 42 -accurately models multi-body spacecraft attitude dynamics (with rigid and/or -flexible bodies), and both two-body and three-body orbital flight regimes, -modelling environments from low Earth orbit to throughout the solar system. 42 -simulates multiple spacecraft concurrently, facilitating studies of rendezvous, -proximity operations, and precision formation flying. It also features -visualization of spacecraft attitude. - -Features: - - - Multi-body dynamics (tree topology, rotational and/or translational - joints) - - Rigid and/or flexible bodies - - Multiple spacecraft (prox ops, formation flying, or independent) - - Inter-spacecraft and spacecraft-surface contact forces support landers, - rovers, and spacecraft servicing scenarios - - Two-body or three-body orbits, anywhere in the solar system - - Optional visualization - - Socket-based interprocess comm (IPC) interface to other apps - - Fast setup for concept studies - - Rigorous and full-featured to support full spacecraft life cycle - -## Installation - -If you're installing on Windows, see the files "Install-msys.txt" and "Install Ubuntu on Win10.txt" in the Docs folder. - -The compiler will attempt to detect what platform you're on (Linux, OSX, or -Msys), but its success rate isn't great. If you have errors on the first -compile or run, try editing your Makefile to manually set your `42PLATFORM`. - -42 supports both the GLUT and GLFW libraries, which handle the platform-specific parts of graphics processing. There was a period of time when newer Macs with Retina displays needed the GLFW graphics libraries, but the problem with GLUT has since been fixed. GLFW is available from MacPorts, Homebrew, and probably elsewhere. The GLUT libraries are also readily available if not already installed on your system. Graphics are optional, settable in the Makefile by GUIFLAG. - -## Getting Started - -See the overview, "42 Overview.pdf", in the Docs folder. Also recommended: - -- Nomenclature.pdf -- POV Menu.pdf -- Key Bindings.txt -- FSW Models.pdf -- Flight Regimes.pdf - -The default folder for inputs and outputs is "InOut". Look there for sample -input files. "Inp_Sim.txt" is the top-level input file. - -The input/output folder may be changed for a sim run by running 42 with an -argument. For example, enter this at the command prompt: - - 42 Demo - -## Common Problems - -1) 42 expects the input files to be plain vanilla text files. If your text -editor adds formatting, makes straight quotes into smart quotes, etc, 42 may get -confused. The most common symptom is generating the "Bogus input in -DecodeString" error. - -2) Also text-related, 42 is very simple-minded about reading the input files. -Adding extra lines, or accidentally deleting a line, or swapping lines, will -throw things out of synch. Again, the most common symptom is the "Bogus input in -DecodeString" error. Use your debugger to trace back where the error was -generated. (The actual mistake may be at that line, or may be somewhere -upstream.) - -3) Line endings. Natively, Windows uses CRLF, OSX uses CR, and *nix uses LF (I think I got those right...) Text editors, etc, are better these days at tolerating unexpected line endings than they used to be, but this is something you should check if something goes awry. For example, there are reports that git, in an effort to be helpful, might regularize your line endings. This might cause some text files to fail being read in properly by 42 on other platforms. One reported outcome is graphics shader code not compiling correctly, resulting in gray worlds or other graphics issues. Something to watch for. - From dfce0fa93de22e928c1ad10bb0d5ebedaaec7f95 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 25 May 2024 02:02:07 +0000 Subject: [PATCH 3/4] Get rid of dollar signs --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 99f165b3..bca5e5e4 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Features: Pull the image: ```console -$ docker pull sirromsystems/42 +docker pull sirromsystems/42 ``` ### Linux @@ -44,13 +44,13 @@ $ docker pull sirromsystems/42 Install dependencies ```console -$ sudo apt -y install make gcc g++ freeglut3-dev libglfw3-dev +sudo apt -y install make gcc g++ freeglut3-dev libglfw3-dev ``` Compile ```console -$ make clean; make +make clean; make ``` Note: the compiler will attempt to detect what platform you're on (Linux, OSX, or @@ -72,14 +72,14 @@ For OpenGL graphics, newer Macs with Retina displays will need the GLFW graphics If you're using docker, run it: ```console -$ docker run -v ${PWD}/path/to/sim/input/dir:/42/testcase 42 +docker run -v ${PWD}/path/to/sim/input/dir:/42/testcase 42 ``` Note: the docker image will attempt to look for the input case called "testcase", to change this simply provide the case name as the first argument: ```console -$ docker run -v ${PWD}/path/to/sim/input/dir:/42/MyCoolSimName 42 MyCoolSimName +docker run -v ${PWD}/path/to/sim/input/dir:/42/MyCoolSimName 42 MyCoolSimName ``` ### Native @@ -91,7 +91,7 @@ The input/output folder may be changed for a sim run by running 42 with an argument. For example, enter this at the command prompt: ```console -$ ./42 examples/Demo +./42 examples/Demo ``` ## Light Reading From 4baa59d6726631992ec1a995f04b1e8a9a812efb Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 25 May 2024 02:06:58 +0000 Subject: [PATCH 4/4] Change code formatting to shell --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bca5e5e4..6e657396 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Features: Pull the image: -```console +```shell docker pull sirromsystems/42 ``` @@ -43,13 +43,13 @@ docker pull sirromsystems/42 Install dependencies -```console +```shell sudo apt -y install make gcc g++ freeglut3-dev libglfw3-dev ``` Compile -```console +```shell make clean; make ``` @@ -71,14 +71,14 @@ For OpenGL graphics, newer Macs with Retina displays will need the GLFW graphics If you're using docker, run it: -```console +```shell docker run -v ${PWD}/path/to/sim/input/dir:/42/testcase 42 ``` Note: the docker image will attempt to look for the input case called "testcase", to change this simply provide the case name as the first argument: -```console +```shell docker run -v ${PWD}/path/to/sim/input/dir:/42/MyCoolSimName 42 MyCoolSimName ``` @@ -90,7 +90,7 @@ input files. "Inp_Sim.txt" is the top-level input file. The input/output folder may be changed for a sim run by running 42 with an argument. For example, enter this at the command prompt: -```console +```shell ./42 examples/Demo ```