Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 3.59 KB

README.md

File metadata and controls

89 lines (65 loc) · 3.59 KB

Ball Flight

Ballflight enables the modeling of a pitched or hit ball. It is useful in determining the results of the pitch or the hit, and also includes plotting functions that are helpful in visualizing the metric outputs of the ballflight model.

Install

$ pip install ballflight

Command Line Instructions

For a full list of commands type

$ python ballflight --help

To get the results of a particular pitch:

$ python ballflight --releaseSpeed 88.4 --spinRate 2589 --breakSpin 2589 --spinDirection 12:33

To plot the results of a particular pitch, add a -p option to the end of your command line:

$ python ballflight --releaseSpeed 88.4 --spinRate 2589 --breakSpin 2589 --spinDirection 12:33 -p

Usage Instructions

In order to use Ballflight, first create a PitchOptions or SwingOptions object with your input information.

For example:

pitch_options = PitchOptions(play_type='FAST_PITCH_SOFTBALL', release_speed=60.0, release_spin_rate=900,
                             release_spin_axis=[1, 0, 0], release_lauch_angle=5.6, release_heading_angle=2.0, pitch=True)

Then you call a PitchResults object as follows:

pitch_result = PitchResult.throw_ball(pitch_options)

Release History

  • v0.1.1, October 19, 2018
    • main method for ball flight with command line args.
  • v0.1.0, August 9, 2018
    • Initial Release

License

MIT (see LICENSE for more information).

Thank You!

Many thanks to the Diamond Kinetics team, especially Minmin Zhang and Mike Ressler.

Works Referenced

The following works were consulted in the creation of this model. PRIMARY SOURCES CONSULTED:

  1. Baseball-bat collisions and the resulting trajectories of spinning balls -- Robert G. Watts and Steven Baroni
  2. How to hit home runs: Optimum baseball bat swing parameters for maximum range trajectories -- Gregory S. Sawicki, Mont Hubbard, and William J. Stronge
  3. Spin of a batted baseball -- Alan M. Nathan, Jonas Cantakos, Russ Kesman, Biju Mathew, Wes Lukash
  4. Aerodynamic drag crisis and its possible effect on the flight of baseballs -- Cliff Frolich
  5. List of moments of inertia -- https://en.wikipedia.org/wiki/List_of_moments_of_inertia
  6. Personal Correspondence with Mont Hubbard
  7. Report of the Committee Studying Home Run Rates in Major League Baseball -- Jim Albert, Jay Bartroff, Roger Blandford , Dan Brooks, Josh Derenski, Larry Goldstein, Anette (Peko) Hosoi, Gary Lorden, Alan Nathan, and Lloyd Smith

OTHER SOURCES: