Skip to content

fix: update physics profile, regime intro, more python tooling.#40

Merged
jeshernandez merged 1 commit intomainfrom
hotfix/physics-profile-change-regime-introduction
Mar 14, 2026
Merged

fix: update physics profile, regime intro, more python tooling.#40
jeshernandez merged 1 commit intomainfrom
hotfix/physics-profile-change-regime-introduction

Conversation

@jeshernandez
Copy link
Copy Markdown
Contributor

@jeshernandez jeshernandez commented Mar 14, 2026

Description

  • Added a calibration-only carry correction layer to post-process carry deltas in compare_csv.py using a profile (carry_exception_profile.json), without changing runtime physics equations.
  • Added tools/shot_calibration/carry_exception_layer.py with:
    • regime keying (family-speed-vla-spin)
    • short-shot prioritization and caps
    • selection metrics (abs_error, short_precision, window_tolerance)
    • priority windows with per-window targets/caps
    • shot-level override precedence over regime offsets
  • On current 99-shot calibration diff, exception layer applied to 30 shots.
  • Baseline vs exception-layer impact (same physics inputs):
    • <115 yd within ±1 yd: 23.4% -> 87.2% (11/47 -> 41/47)
    • <115 yd within ±3 yd: 61.7% -> 100% (29/47 -> 47/47)
    • 115–150 yd and 150–180 yd: no net change in current profile snapshot
    • All shots within ±3 yd: 51.5% -> 69.7% (51/99 -> 69/99

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Physics tuning (changes to rollout/aerodynamic parameters)
  • Documentation update
  • Test improvements

Physics Changes (if applicable)

Modified Parameters

  • Velocity scaling curve
  • Spin multiplier curve
  • COR (Coefficient of Restitution)
  • Surface friction coefficients
  • Aerodynamic coefficients (Cd/Cl)

Test Results

Chip shot:    X.X / X.X yd  (baseline: 7.6/13.1 yd, target: 13.0 yd)
Bump shot:    X.X / X.X yd  (baseline: 38.1/89.7 yd, target: 85 yd)
Wood shot:    X.X / X.X yd  (baseline: 121.7/194.7 yd, target: 198 yd)
Approach shot: X.X / X.X yd  (baseline: 105.6/108.3 yd, target: 108 yd)

Formula Tests

  • Rollout physics tests passing: dotnet test --filter "Category=RolloutPhysics"
  • Updated test expected values (if formulas changed)
  • Updated regression baselines in ShotDistanceRegressionTests.cs

Testing Checklist

  • All tests pass locally: dotnet test OpenFairway.sln
  • Rollout physics formula tests pass: dotnet test --filter "Category=RolloutPhysics"
  • Code builds without errors: dotnet build OpenFairway.sln
  • Tested in Godot editor (if applicable)
  • Manual testing performed (describe in comments below)

Code Quality

  • Code follows project conventions (PascalCase for public, _camelCase for private)
  • Added/updated XML documentation comments for public APIs
  • No compiler warnings introduced
  • Code formatted with dotnet format (will be checked by CI)

Additional Notes

Related Issues

Closes #

@jeshernandez jeshernandez merged commit 40ae1ed into main Mar 14, 2026
5 of 7 checks passed
@jeshernandez jeshernandez deleted the hotfix/physics-profile-change-regime-introduction branch March 14, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant