Installation¶
Advanced instructions for compiling MoCSI locally, including everything you need to develop new features.
MoCSI builds on Linux, macOS, and Windows. Pick your platform to jump straight to the steps:
You’ll need CMake, a C++ compiler (gcc / clang / MSVC), git, and Python for the config generator.
Minimum installation instructions¶
Each tab below walks through the minimum steps to clone, configure, and build MoCSI without SPICE or VTK.
Install CMake, a C++ compiler (we recommend gcc), git and Python:
sudo apt-get update && sudo apt-get install -y build-essential cmake git python3 python3-pip
Navigate to a preferred folder, clone the repository, and enter it:
git clone https://gitlab.git.nrw/uni-ms/ag-gundlach/public/mocsi.git cd mocsi
Create the build directory and run CMake + make:
mkdir build cd build cmake .. make
The final executable is called
mocsiand lives inbuild/. See the Quickstart for how to run it.
Install CMake, a C++ compiler (we recommend gcc), git and Python:
brew install cmake gcc git python
Navigate to a preferred folder, clone the repository, and enter it:
git clone https://gitlab.git.nrw/uni-ms/ag-gundlach/public/mocsi.git cd mocsi
Create the build directory and run CMake + make:
mkdir build cd build cmake .. make
The final executable is called
mocsiand lives inbuild/. See the Quickstart for how to run it.
Install git, CMake, Python, and Visual Studio. When opening Visual Studio for the first time, select Desktop Development with C++ to install the MSVC compiler.
Navigate to a preferred folder and clone the repository.
Open the CMake GUI. Click Browse Source and select the MoCSI root folder. Create a new folder for your build files and select it via Browse Build.
Click Configure. You’ll be prompted to pick a generator — choose Visual Studio 17 2022 (or your version) and hit Finish. After a few warnings you should see “Configuration done”.
Click Generate. CMake finishes with “Generate done”.
Click Open Project to open the generated solution in Visual Studio.
In the top bar, pick your compilation configuration: Release for the highest optimization level, or Debug for testing.
In the Solution Explorer, right-click ALL_BUILD and choose Build. It should finish with “Build completed”.
Your executable
mocsi.exelives inbuild/Debug/orbuild/Release/depending on the configuration you picked. See the Quickstart for how to run it.
Installing additional libraries (optional)¶
Three build-time features extend what MoCSI can do. Enable what you need — each has its own setup below.
Feature |
Default |
How to enable |
What it unlocks |
|---|---|---|---|
Auto-detect |
Install system VTK (see below) |
Reading shape-model mesh files |
|
Off |
Pass |
Accurate orbital geometry from ephemerides |
|
MPI |
Off |
Pass |
Parallel execution across processes |
SPICE (for accurate orbital data)¶
Download the correct CSPICE toolkit into your preferred folder. With gcc:
curl -O https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z
uncompress cspice.tar.Z
tar -xf cspice.tar
Then re-run the CMake command from step 3, pointing to SPICE:
cmake .. -DCSPICE_DIR=/path/to/cspice/
All other steps remain the same.
Download the correct CSPICE toolkit into your preferred folder:
curl -O https://naif.jpl.nasa.gov/pub/naif/toolkit/C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z
uncompress cspice.tar.Z
tar -xf cspice.tar
Then re-run the CMake command from step 3, pointing to SPICE:
cmake .. -DCSPICE_DIR=/path/to/cspice/
All other steps remain the same.
Download the correct CSPICE toolkit and extract the files to a directory of your choosing.
Open the CMake GUI and click + Add Entry. If your SPICE toolkit is at D:/cspice, set:
Name: CSPICE_DIR
Type: Path
Value: D:/cspice
Click OK, then continue from step 4 of the Windows minimum-install instructions. (If you already picked a compiler, clicking Configure skips the prompt and jumps straight to the configuration step.)
VTK (for shape-model support)¶
Install VTK:
sudo apt-get install -y --no-install-recommends libvtk9-dev
When running CMake at step 3, it automatically discovers the installed VTK and wires it into the build.
Install VTK via Homebrew:
brew install vtk
When running CMake at step 3, it automatically discovers the installed VTK and wires it into the build.
Download the latest VTK release and extract it to a folder of your choosing. Follow the same MSVC + CMake GUI flow, but select the VTK folder as Source and a new folder as Build. The Visual Studio build takes a while — make sure you pick the same configuration (Release/Debug) you plan to use for MoCSI.
After VTK builds successfully, add its library folders to your Path system variable:
Open Windows system variables, select Path, click Edit.
Add the
../bin/and../lib/Release(or../lib/Debug/) folders from your VTK install.Confirm and exit.
CMake will now find VTK automatically at configuration time. From there, continue from step 4 of the Windows minimum-install instructions.