Skip to content

Commit

Permalink
Merge pull request #15 from crzdg/add-frispy
Browse files Browse the repository at this point in the history
Add calculator for FrisPy-library
  • Loading branch information
crzdg authored Aug 17, 2024
2 parents 2e5f8ac + 55de4f5 commit 127ff33
Show file tree
Hide file tree
Showing 21 changed files with 410 additions and 274 deletions.
1 change: 0 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
3.11
3.10
3.9
3.8
- name: Install python dependencies
run: pip install -r requirements/dev.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"

- name: Install python dependencies
run: pip install ".[ci]"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ dmypy.json
.junit.xml
.coverage.xml
*.svg
.virtual_documents/
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,26 @@ This project can be used by researchers, sports enthusiasts, and anyone interest

## 🔬 Included disc models

#### V. Morrison, “The physics of frisbees,” Mount Allison University Physics Department, vol. 1, 2005.
#### S. Hummel, "Frisbee Flight Simulation and Throw Biomechanics" University of California, Davis, 2003.

The [Morrison](src/flying_discs/morrison) model is a Euler approximation of [S. A. Hummel, Frisbee Flight Simulation and Throw Biomechanics. University of California, Davis, 2003.](https://books.google.ch/books?id=KQlA7DJ323MC)
The base model for calculation of a flying discs trajectory. The model was researched by L.Hannah in [L. Hannah, Constraining Frisbee Tracking Methods Through Bayesian Analysis of Flying Disc Models 2017.]
She and her initiator T. McClintock initial published the code in the repository [Frisbee_Simulator](https://github.com/tmcclintock/Frisbee_Simulator). Recently this was re-written in a Python library [FrisPy](https://github.com/tmcclintock/FrisPy). The library solves the models ODE, allowing for increased parameterizations and precision.


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

The [Morrison](src/flying_discs/morrison) model is a Euler approximation of [S. A. Hummel, Frisbee Flight Simulation and Throw Biomechanics. University of California, Davis, 2003.](https://books.google.ch/books?id=KQlA7DJ323MC) using constants.

##### 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.
- **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
Expand Down
157 changes: 157 additions & 0 deletions notebooks/frispy-notebook.ipynb

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions notebooks/morrison-constant-comparison.ipynb

Large diffs are not rendered by default.

68 changes: 0 additions & 68 deletions notebooks/morrison-constant-comparison.py

This file was deleted.

15 changes: 6 additions & 9 deletions notebooks/morrison.ipynb

Large diffs are not rendered by default.

157 changes: 0 additions & 157 deletions notebooks/morrison.py

This file was deleted.

12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ license = "LGPL-3.0-only"
license-files = { paths = ["LICENSE"] }
readme = "README.md"
description = "Implementation of physical models for flying sport discs."
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Reto Barmettler"},
]
dependencies = [
"numpy>=1.22.0",
"frispy"
]
classifiers =[
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
]

[tool.hatch.metadata]
allow-direct-references = true

[project.urls]
Source = "https://github.com/crzdg/flying-discs"

Expand Down Expand Up @@ -52,7 +55,6 @@ ci = [
]
jupyter = [
"jupyter",
"jupytext",
"matplotlib"
]

Expand Down Expand Up @@ -109,7 +111,7 @@ scripts.typing = "mypy src/"

[[tool.hatch.envs.type.matrix]]
python = [
"38", "39", "310", "311"
"39", "310", "311"
]

[tool.hatch.envs.test]
Expand All @@ -121,7 +123,7 @@ scripts.no-cov = "cov --no-cov {args}"

[[tool.hatch.envs.test.matrix]]
python = [
"38", "39", "310", "311"
"39", "310", "311"
]

[tool.hatch.envs.tools]
Expand Down
12 changes: 6 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --annotation-style=line --extra=dev --extra=lint --extra=style --extra=test --extra=type --output-file=requirements/dev.txt --resolver=backtracking pyproject.toml
# pip-compile --annotation-style=line --extra=dev --extra=lint --extra=style --extra=test --extra=type --output-file=requirements/dev.txt pyproject.toml
#
anyio==3.6.2 # via httpcore
astroid==2.15.0 # via pylint
Expand All @@ -16,8 +16,8 @@ cryptography==39.0.2 # via secretstorage
dill==0.3.6 # via pylint
distlib==0.3.6 # via virtualenv
editables==0.3 # via hatchling
exceptiongroup==1.1.0 # via pytest
filelock==3.9.0 # via virtualenv
frispy==2.0.2 # via flying-discs (pyproject.toml)
h11==0.14.0 # via httpcore
hatch==1.6.3 # via flying-discs (pyproject.toml)
hatchling==1.13.0 # via hatch
Expand All @@ -38,7 +38,7 @@ mdurl==0.1.2 # via markdown-it-py
more-itertools==9.1.0 # via jaraco-classes
mypy==1.1.1 # via flying-discs (pyproject.toml)
mypy-extensions==1.0.0 # via black, mypy
numpy==1.24.2 # via flying-discs (pyproject.toml)
numpy==1.24.2 # via flying-discs (pyproject.toml), frispy, scipy
packaging==23.0 # via black, hatch, hatchling, pytest
pathspec==0.11.0 # via black, hatchling
pexpect==4.8.0 # via hatch
Expand All @@ -54,14 +54,14 @@ pytest-cov==4.0.0 # via flying-discs (pyproject.toml)
pytest-mock==3.10.0 # via flying-discs (pyproject.toml)
rfc3986[idna2008]==1.5.0 # via httpx
rich==13.3.2 # via hatch
scipy==1.10.1 # via frispy
secretstorage==3.3.3 # via keyring
shellingham==1.5.0.post1 # via hatch
sniffio==1.3.0 # via anyio, httpcore, httpx
tomli==2.0.1 # via black, coverage, hatchling, mypy, pylint, pytest
tomli-w==1.0.0 # via hatch
tomlkit==0.11.6 # via hatch, pylint
types-pyyaml==6.0.12.8 # via flying-discs (pyproject.toml)
typing-extensions==4.5.0 # via astroid, mypy
typing-extensions==4.5.0 # via mypy
userpath==1.8.0 # via hatch
virtualenv==20.20.0 # via hatch
wrapt==1.15.0 # via astroid
Expand Down
8 changes: 5 additions & 3 deletions requirements/main.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --annotation-style=line --output-file=requirements/main.txt --resolver=backtracking pyproject.toml
# pip-compile --annotation-style=line --output-file=requirements/main.txt pyproject.toml
#
numpy==1.24.2 # via flying-discs (pyproject.toml)
frispy==2.0.2 # via flying-discs (pyproject.toml)
numpy==1.24.2 # via flying-discs (pyproject.toml), frispy, scipy
scipy==1.10.1 # via frispy
Empty file.
Loading

0 comments on commit 127ff33

Please sign in to comment.