Skip to main content

Implementation of physical models for flying sport discs.

Project description

License Last Commit Coverage Tests PyPI PyPI PyPI

🥏 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

V. Morrison, “The physics of frisbees,” Mount Allison University Physics Department, vol. 1, 2005.

The Morrison model is a Euler approximation of S. A. Hummel, Frisbee Flight Simulation and Throw Biomechanics. University of California, Davis, 2003.

Constants
  • G. Stilley and D. Carstens, “Adaptation of the Frisbee flight principle to delivery of special ordnance,” in 2nd Atmospheric Flight Mechanics Conference, in Guidance, Navigation, and Control and Co-located Conferences. American Institute of Aeronautics and Astronautics, 1972. doi: 10.2514/6.1972-982.
  • K. Yasuda, “Flight and aerodynamic characteristics of a flying disk,” Japanese Soc. Aero. Space Sci, vol. 47, no. 547, pp. 16–22, 1999.
  • S. A. Hummel, Frisbee Flight Simulation and Throw Biomechanics. University of California, Davis, 2003.
  • V. Morrison, “The physics of frisbees,” Mount Allison University Physics Department, vol. 1, 2005.
  • W. J. Crowther and J. R. Potts, “Simulation of a spin-stabilised sports disc,” Sports Engineering, vol. 10, no. 1, pp. 3–21, 2007.
  • L. Hannah, “Constraining Frisbee Tracking Methods Through Bayesian Analysis of Flying Disc Models,” 2017.

🚀 Get Started

Installation

pip3 install flying-discs

👩‍🏫 Example

Jupyter notebooks can be found under notebooks.

Morrison Example

from flying_discs.morrison.constants import MorrisonUltrastar
from flying_discs.morrison.coordinates import MorrisonPosition3D
from flying_discs.morrison.linear import MorrisonLinearCalculator

disc = MorrisonLinearCalculator(MorrisonUltrastar())

Z0 = 1
TIMESCALE = 0.033
ANGLE_OF_ATTACK = 5
V0 = 14
DIRECTION_ANGLE = 0

throw = disc.calculate_trajectory(
    MorrisonPosition3D(z=Z0),
    V0,
    ANGLE_OF_ATTACK,
    DIRECTION_ANGLE,
    TIMESCALE,
)

📃 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

flying_discs-0.4.0.tar.gz (626.6 kB view details)

Uploaded Source

Built Distribution

flying_discs-0.4.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file flying_discs-0.4.0.tar.gz.

File metadata

  • Download URL: flying_discs-0.4.0.tar.gz
  • Upload date:
  • Size: 626.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for flying_discs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c93a2cde63ccc260945315dcbf2efc953ffa090f0a41449edbeddf73079b97cb
MD5 407bb2c5377892fd00d76771503d2965
BLAKE2b-256 0acd18e443b6b780e95ebe3c342d5d671f69bf7f89a0ef589477eea41952117e

See more details on using hashes here.

File details

Details for the file flying_discs-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flying_discs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3463fcb775848d92ef10d109e1f5909f59a263604e354ba06ede103b6ef3960e
MD5 96256b469ae288d50c53ad12d792186d
BLAKE2b-256 eec4e860f6d7061d4190f636f638d54e59235799038a0ee58902c3ca2655c219

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page