A real-data ISS orbit scenario for the NASA 42 Spacecraft Simulator, configured to mimic the actual travel of the International Space Station using live orbital elements from n2yo.com.
Built and tested on Windows MSYS64 UCRT64.
After setup, your 42/ directory should look like this:
~/NASA_Builds/42/
42.exe
Demo/ ← original demo files, leave untouched
InOut/ ← default 42 input folder, leave untouched
ISS_Mission/ ← this scenario ✅
The ISS_Mission/ folder sits at the same level as InOut/ and Demo/ — do not put it inside InOut/.
If you haven't built 42 yet, clone and build it first:
git clone https://github.com/nasa/42.git ~/NASA_Builds/42
cd ~/NASA_Builds/42
makeMake sure you have
gcc,make, and the required OpenGL/GLUT libraries installed in your UCRT64 environment.
1. Copy InOut/ as your scenario base:
cp -r ~/NASA_Builds/42/InOut ~/NASA_Builds/42/ISS_Mission2. Copy the ISS files from Demo into your new scenario folder:
cp ~/NASA_Builds/42/Demo/Orb_ISS.txt ~/NASA_Builds/42/ISS_Mission/
cp ~/NASA_Builds/42/Demo/SC_ISS.txt ~/NASA_Builds/42/ISS_Mission/3. Update Orb_ISS.txt with live orbital data (see section below).
4. Update Inp_Sim.txt to point to the ISS files:
cat > ~/NASA_Builds/42/ISS_Mission/Inp_Sim.txt << 'EOF'
# ... (see Inp_Sim.txt in this repo)
EOFThe two critical lines to change in Inp_Sim.txt are:
TRUE Orb_ISS.txt ! Input file name for Orb 0
TRUE 0 SC_ISS.txt ! Existence, RefOrb, Input file for SC 0
To simulate the ISS at its current real-world position, grab live Keplerian elements from n2yo:
-
Note the following values:
- Perigee (km)
- Apogee (km)
- Inclination (°)
- RAAN — listed as Right Ascension of Ascending Node in the TLE
- Argument of Perigee — from the TLE (field 6, line 2)
- True Anomaly — from the TLE (field 7, line 2)
-
Plug them into
Orb_ISS.txtunder theCENTRAL/KEP/PAsection:
421.5 431.5 ! Periapsis & Apoapsis Altitude, km
51.6305 ! Inclination (deg)
149.5338 ! Right Ascension of Ascending Node (deg)
27.3797 ! Argument of Periapsis (deg)
332.7579 ! True Anomaly (deg)
The values above were captured on May 5, 2026 from the n2yo TLE for NORAD ID 25544.
cd ~/NASA_Builds/42
./42.exe ISS_Mission42 will read all input files from ISS_Mission/ and launch the simulation with the ISS orbital parameters.
Since each scenario is its own self-contained folder, switching is just a matter of passing a different folder name:
./42.exe ISS_Mission # run ISS scenario
./42.exe InOut # run default 42 scenarioYour Demo/ folder always stays untouched as a reference backup.
| Parameter | Value |
|---|---|
| Perigee | 421.5 km |
| Apogee | 431.5 km |
| Inclination | 51.6305° |
| RAAN | 149.5338° |
| Arg of Perigee | 27.3797° |
| True Anomaly | 332.7579° |
| Period | ~93.0 min |
| Semi-major axis | 6797 km |
| NORAD ID | 25544 |
| TLE Source | n2yo.com / Caltech |
- Orbital elements change over time due to atmospheric drag and station reboosts. Re-grab from n2yo periodically for accuracy.
- The
SC_ISS.txtspacecraft file is sourced directly from the NASA 42 Demo folder. - Tested on Windows 11 with MSYS64 UCRT64.