Skip to main content

PitchData

Struct PitchData 

Source
pub struct PitchData {
Show 33 fields pub release_speed: f64, pub plate_speed: f64, pub sz_bot: f64, pub sz_top: f64, pub sz_wid: f64, pub sz_dep: f64, pub aX: f64, pub aY: f64, pub aZ: f64, pub pfxX: f64, pub pfxZ: f64, pub pX: f64, pub pZ: f64, pub vX0: f64, pub vY0: f64, pub vZ0: f64, pub x0: f64, pub y0: f64, pub z0: f64, pub x: f64, pub y: f64, pub break_angle: f64, pub break_length: f64, pub induced_vertical_movement: f64, pub vertical_drop: f64, pub horizontal_movement: f64, pub depth_break: f64, pub spin_rate: f64, pub spin_axis: f64, pub zone: StrikeZoneSection, pub type_confidence: f64, pub time_to_plate: f64, pub extension: f64,
}
Expand description

Statistical data regarding a pitch.

Some acronyms are an existing spec, best to keep with that.

Fields§

§release_speed: f64

Velocity measured at release, measured in mph

§plate_speed: f64

Velocity measured crossing home plate, measured in mph

§sz_bot: f64

Height above home plate for the bottom of the hitter’s strike zone

Measured in feet.

§sz_top: f64

Height above home plate for the top of the hitter’s strike zone

Measured in feet.

§sz_wid: f64

Width of the strike zone

Measured in inches.

§sz_dep: f64

Depth of the strike zone

Measured in inches.

§aX: f64

Acceleration of the pitch near release, horizontal movement axis, catchers perspective (positive means RHP sweep)

Measured in feet/s^2.

§aY: f64

Acceleration of the pitch near release, depth axis, catchers perspective (positive means deceleration)

Measured in feet/s^2.

§aZ: f64

Acceleration of the pitch near release, vertical movement axis, catchers perspective (positive means literal carry)

Measured in feet/s^2.

§pfxX: f64

Might be broken, use horizontal_movement instead

Horizontal movement of the pitch between the release point and home plate, catchers perspective (positive means RHP sweep) as compared to a theoretical pitch thrown at with the same velocity vector and no spin-induced movement. This parameter is measured at y=40 feet regardless of the y0 value.

Measured in inches.

Does not account for seam-shifted wake!

§pfxZ: f64

Might be broken, use vertical_drop instead

Vertical movement of the pitch between the release point and home plate, catchers perspective (positive means literal rise), as compared to a theoretical pitch thrown at with the same velocity vector and no spin-induced movement. This parameter is measured at y=40 feet regardless of the y0 value.

Measured in inches.

Does not account for seam-shifted wake!

§pX: f64

Horizontal coordinate of the pitch as it crosses home plate, 0 is the middle of the plate. Catchers perspective, positive means arm-side for a RHP, negative means glove-side for a RHP.

Measured in feet.

§pZ: f64

Vertical coordinate of the pitch as it crosses home plate, 0 is the plate itself

Measured in feet.

§vX0: f64

Horizontal component of velocity out of the hand, catchers perspective, positive means RHP glove-side.

Measured in feet per second.

§vY0: f64

Depth component of velocity out of the hand, catchers perspective, positive means the ball isn’t going into centerfield.

Measured in feet per second.

§vZ0: f64

Vertical component of velocity out of the hand, measured in feet per second.

Measured in feet per second.

§x0: f64

X coordinate of pitch at release

Measured in feet

§y0: f64

Y coordinate of pitch at release, typically as close to 50 as possible.

Measured in feet

§z0: f64

Z coordinate of pitch at release

Measured in feet

§x: f64

No clue.

§y: f64

No clue.

§break_angle: f64

No clue. Does not match theta angle of induced break vector. Consistently 36.0. Strange.

§break_length: f64

No clue. Does not match length of induced break vector.

§induced_vertical_movement: f64

Standard metric, amount of vertical movement induced.

Measured in inches

§vertical_drop: f64

Standard metric, amount of vertical movement the pitch has (including gravity).

Measured in inches

§horizontal_movement: f64

Standard metric, amount of horizontal movement the pitch has.

Measured in inches

§depth_break: f64

No clue. Thought to be the amount of depth-based movement (acceleration), but it’s consistently 24.0. Strange.

§spin_rate: f64

RPMs out of the hand

§spin_axis: f64

Measured in degrees.

0 means complete topspin. 180 means complete backspin. 90 means complete sidespin (RHP sweeper). 270 means complete sidespin (elite RHP changeup).

~225 is your average RHP fastball.

§zone: StrikeZoneSection§type_confidence: f64

AI model confidence about pitch type designation.

Sometimes greater than 1.0

§time_to_plate: f64

Time from out of the hand to crossing the plate.

Measured in seconds

§extension: f64

Extension

Measured in feet

Trait Implementations§

Source§

impl Clone for PitchData

Source§

fn clone(&self) -> PitchData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PitchData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PitchData

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PitchData

Source§

fn eq(&self, other: &PitchData) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for PitchData

Source§

impl StructuralPartialEq for PitchData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,