Skip to content

Commit 0f9e5c9

Browse files
committed
Fixed throwbacks
1 parent dcd40a2 commit 0f9e5c9

File tree

11 files changed

+12
-16
lines changed

11 files changed

+12
-16
lines changed

.DS_Store

0 Bytes
Binary file not shown.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Info.plist renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Info.plist

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/MacOS/YakkerStreamApp renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/MacOS/YakkerStreamApp

500 KB
Binary file not shown.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/PkgInfo renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/PkgInfo

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/Assets.car renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/Assets.car

1.78 MB
Binary file not shown.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/appicon.icns renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/appicon.icns

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/livedata.xml.template renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/livedata.xml.template

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/requirements.txt renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/requirements.txt

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/yakker.sh renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/yakker.sh

File renamed without changes.

YakkerStreamApp 2026-02-05 11-59-39/YakkerStreamApp.app/Contents/Resources/yakker_stream.py renamed to YakkerStreamApp 2026-02-06 15-23-23/YakkerStreamApp.app/Contents/Resources/yakker_stream.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
# Yakker merges pitch + hit observations; catcher throwbacks surface as a single contributing event,
3838
# so require at least two event IDs (pitch + hit) when no pitch metrics accompany hit data.
3939
MIN_CONTRIBUTING_EVENTS_FOR_HIT = 2
40-
THROWBACK_MAX_EXIT_VELO = 60.0
41-
THROWBACK_MIN_ANGLE_DEG = 10.0
42-
THROWBACK_MAX_ANGLE_DEG = 20.0
40+
# Filter throwbacks based on low exit velocity (soft throws back to pitcher/catcher)
41+
THROWBACK_MAX_EXIT_VELO = 65.0
4342

4443
PayloadHook = Callable[[dict], Union[Awaitable[None], None]]
4544

@@ -69,15 +68,12 @@ def _is_valid(value: Optional[float]) -> bool:
6968
def _looks_like_throwback(hit_data: dict) -> bool:
7069
"""Return True when the hit profile matches a soft throwback to the mound."""
7170
exit_velocity = hit_data.get("ExitSpeedMPH")
72-
launch_angle = hit_data.get("AngleDegrees")
73-
if not (_is_valid(exit_velocity) and _is_valid(launch_angle)):
71+
if not _is_valid(exit_velocity):
7472
return False
7573
exit_velocity = float(exit_velocity)
76-
launch_angle = float(launch_angle)
77-
return (
78-
exit_velocity < THROWBACK_MAX_EXIT_VELO
79-
and THROWBACK_MIN_ANGLE_DEG <= launch_angle <= THROWBACK_MAX_ANGLE_DEG
80-
)
74+
# Filter throwbacks based solely on low exit velocity
75+
# Throwbacks are characterized by low exit velocity regardless of angle
76+
return exit_velocity < THROWBACK_MAX_EXIT_VELO
8177

8278

8379
def _is_true_hit(hit_data: dict, pitch_data: dict, contributing_events: List[str]) -> bool:
@@ -125,7 +121,7 @@ class MetricAggregator:
125121
"hit_distance_ft",
126122
"hangtime_sec",
127123
)
128-
STALE_TIMEOUT_SECONDS = 30
124+
STALE_TIMEOUT_SECONDS = 10
129125
ROLLING_WINDOW_SECONDS = 1.0
130126

131127
class MetricEntry(TypedDict):
@@ -521,7 +517,7 @@ async def update_livedata_xml(aggregator: MetricAggregator) -> None:
521517

522518

523519
def _format_metric(
524-
value: Optional[float], decimals: int, empty_placeholder: str = "--- "
520+
value: Optional[float], decimals: int, empty_placeholder: str = "-- "
525521
) -> str:
526522
"""Format a metric value for ProScoreboard, showing placeholder for 0 or None."""
527523
if value is None or value == 0:

0 commit comments

Comments
 (0)