Waterloo Rocketry's state estimator is a tool used to determine information about the state of our rocket at any point in flight.
Python 3.6 or newer is required to run the project.
It is recommended that a virtual environment be used to house the Python packages for this project. This can be installed through a Windows terminal with the following:
py -m pip install --user virtualenv
py -m venv venv
.\venv\Scripts\activate
This can be installed in bash terminal with the following:
python3 -m pip install --user virtualenv
python3 -m venv venv
source venv/bin/activate
Once in the virtual environment, the required Python packages can be installed with pip
:
pip install -r requirements.txt
As a side note, to exit the virtual environment when needed:
deactivate
To generate a data set, run data_generator.py
which will prompt for user input.
This is the message output on each run of data_generator.py
:
Enter a total mass, thrust, burn time, and noise params (pressure, temperature, acceleration, gyro, and magnetic noise). Please separate each value with a space:
And this is an example user input:
100 0,0,20000 60 1 1 1 1 1
Where 100
is the total mass of the rocket (in kilograms), 0,0,20000
is the thrust generated by the rocket ([x,y,z] in newtons), 60
is the burn time (in seconds), and 1 1 1 1 1
is the sensor noise parameters (currently unused).
This will generate 2 files: /generated_files/ground_truth.txt
and /generated_files/sensor_data.txt
which house the generated data sets for the flight profile.
The project has unit tests stored in the /tests
directory. To run and check these tests, run this command in a terminal (in the project directory):
pytest
For additional information about the pytest
package and how to used it, check out their documentation.
New contributors are always welcome! Feel free to assign yourself to any issues marked with good first issue
. If you see an issue that is not listed but needs addressing, please open an issue and discuss what you would like to change. If you are contributing to the project, make sure unit tests are written or updated to address your contributions.
Additionally, be sure to run the format.sh
script after adding or making changes to the project's codebase to ensure that the new code is properly formatted!