Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Simulation software for the Cislunar Explorers Mission

License

Notifications You must be signed in to change notification settings

Cislunar-Explorers/CislunarSim

Repository files navigation

Warning

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.

CislunarSim

Simulation Software for the Cislunar Explorers Mission
Read the Docs

Getting Started

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.

Running the Sim

Usage:

python src/main.py config [-v] [-p] [-o [OUT]] 

Options:

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

Examples:

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.

Plotting Sim Runs

Usage:

python src/utils/plot.py {file path}

Options:

file path (Required): The path of the csv file to plot

Example:

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.

IMPORTANT: Python Version MUST be >=3.8

Run python --version to find your Python version. If it's lower than 3.8, you must upgrade your Python version:

macOS:

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
Windows:

About

Simulation software for the Cislunar Explorers Mission

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages