Implementation of physical models for flying sport discs.
Project description
🥏 Flying Discs
This Python repository contains modules and algorithms that can calculate trajectories of flying sports discs. The repository includes non-physical and physical model based algorithms and parameterizations for calculating the trajectories.
🤔 Why create this project?
This project can be used by researchers, sports enthusiasts, and anyone interested in studying or improving the performance of flying sports discs. The open-source nature of this project also allows for contributions and enhancements by the community, further improving its capabilities and usefulness.
🔬 Included disc models
🚀 Get Started
Installation
pip3 install flying-discs
👩🏫 Example
Code examples and Jupyter notebooks can be found under examples.
Morrison Example
from flying_discs.morrison.disc_morrison_linear import DiscMorrisonLinear
from flying_discs.morrison.morrison_constants import DiscMorrisonUltrastar
x0 = 0
y0 = 0
z0 = 1
disc = DiscMorrisonLinear(DiscMorrisonUltrastar(), x0, y0, z0)
timescale = 0.033
angle_of_attack = 5
v0 = 14
direction = 0
trajectory = disc.calculate_trajectory(
timescale,
alpha=angle_of_attack,
v0=v0,
direction=direction,
)
📃 Documentation
Some doc-strings are already added. Documentation is a work-in-progress and will be updated on a time by time basis.
💃🕺 Contribution
I welcome everybody contributing to this project. Please read the CONTRIBUTING.md for more information. Feel free to open an issue on the project if you have any further questions.
💻 Development
The repository provides tools for development using hatch.
All dependencies for the project also can be found in a requirements
-file.
Install the development dependencies.
pip3 install -r requirements/dev.txt
or
pip3 install "flying-discs[dev]"
Tools
To run all development tools, type checking, linting and tests hatch
is required.
make all
Type checking
Type checking with mypy
.
make mypy
Linting
Linting with pylint
.
make lint
Tests
Run tests with pytest
.
make test
Update dependencies
Update python requirements with pip-compile
.
make update
🧾 License
This repository is licensed under the GNU Lesser General Public License v3.0. See the LICENSE file for more information.
Please note that while the LGPLv3 allows for the use of the code in proprietary software projects, any modifications to the code must also be released under the LGPLv3.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flying_discs-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3188c6c19a9470002bcbfcb521284a6c97005e77fd11ca29fbfdbaf43dbc5dc6 |
|
MD5 | 9f0ba427ca2aa92b2b6a40b31cd1fc01 |
|
BLAKE2b-256 | f03bd374b44810b5aa5fd9d5ba064539817a63f4187d9b331f4609c87fff55f9 |