This repository is no longer used or maintained. We had a lot of fun and learned a lot while building this, and there are plenty of lessons to be learned. Reach out to tmf97@cornell.edu if interested in hearing some stories and lessons learned.
Simulation Software for the Cislunar Explorers Mission
Read the Docs
Create a virtual Python environment and install all the necessary dependencies. Make sure you run this from the root of the repository!
python -m venv venv
source venv/bin/activate
pip install -e .
You can exit this environment by running deactivate
. To re-enter an existing environment, all you need is source venv/bin/activate
.
Note: Some problems have been known to occur if your pip is not updated. Follow the warning prompt your terminal gives if this happens.
python src/main.py config [-v] [-p] [-o [OUT]]
config
(Required): The path of the config file to simulate
-v
(Optional): Verbose mode for logging extra information to the terminal
-p
(Optional): Plotting mode to plot the data of this sim run
-o [OUT]
(Optional): Outputs the data of this sim run to a CSV file. A name OUT can be provided, otherwise the name will be the current Unix timestamp
python src/main.py configs/iss.json
python src/main.py configs/freefall.json -pv
python src/main.py configs/test_angles.json -vo
python src/main.py configs/tli.json -po "tli"
We recommend setting your D_T
value (the timestep length) in constants.py
to be between 100 - 300. If you're looking for a faster run, you'll want to set it to be on the higher side of that range.
python src/utils/plot.py {file path}
file path
(Required): The path of the csv file to plot
python src/utils/plot.py runs/cislunarsim-355942804.csv
python src/utils/plot.py runs/tli.csv
Note: The above are example CSV files that don't necessarily exist locally on your system.
Run python --version
to find your Python version. If it's lower than 3.8, you must upgrade your Python version:
If you don't already have Homebrew, run the following:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, upgrade your Python version
brew update && brew upgrade python
and run the following command to set Python3 as the default interpreter
cp /usr/local/bin/python3 /usr/local/bin/python