Metadata-Version: 2.4
Name: golfcalc
Version: 0.1.0
Summary: Golf handicap calculator and launch monitor ballistics estimator
Author-email: GolfLaunchLab <omgitscarlzon@gmail.com>
License: MIT
Project-URL: Homepage, https://golflaunchlab.com
Project-URL: Documentation, https://golflaunchlab.com/guides/
Project-URL: Reviews, https://golflaunchlab.com/reviews/
Project-URL: Repository, https://github.com/ndcarlson/golfcalc
Project-URL: Bug Tracker, https://github.com/ndcarlson/golfcalc/issues
Keywords: golf,handicap,launch-monitor,ballistics,usga
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# golfcalc

Golf handicap calculator and launch monitor ballistics estimator. Built by [GolfLaunchLab](https://golflaunchlab.com), an independent golf launch monitor review site.

## Install

```bash
pip install golfcalc
```

## Handicap Index

Calculate your USGA World Handicap System index from recent rounds:

```python
from golfcalc import handicap_index

# (adjusted_gross_score, course_rating, slope_rating)
rounds = [
    (85, 72.1, 131),
    (88, 71.5, 128),
    (82, 70.8, 125),
    (90, 73.2, 135),
    (87, 72.1, 131),
]

print(handicap_index(rounds))  # 11.4
```

## Shot Distance

Estimate carry and total distance from launch monitor data:

```python
from golfcalc import carry_distance, total_distance

# 7-iron: 132 mph ball speed, 16.5 deg launch, 7000 rpm spin
carry = carry_distance(132, 16.5, 7000)
total = total_distance(132, 16.5, 7000)

print(f"Carry: {carry} yards")
print(f"Total: {total} yards")

# Adjust for altitude (Denver = 5280 ft)
carry_denver = carry_distance(132, 16.5, 7000, altitude_ft=5280)
```

## Optimal Launch

Find the best launch angle and spin rate for your ball speed:

```python
from golfcalc import optimal_launch

# Driver at 165 mph ball speed
result = optimal_launch(165)
print(f"Launch: {result['launch_angle']} deg")
print(f"Spin: {int(result['spin_rate'])} rpm")
print(f"Carry: {result['carry_yards']} yards")
```

## CLI

```bash
# Calculate handicap interactively
golfcalc handicap

# Estimate distance from launch data
golfcalc distance 165 10.5 2500

# Find optimal launch conditions
golfcalc optimize 165

# At altitude
golfcalc distance 165 10.5 2500 --altitude 5280
```

## About

Built and maintained by [GolfLaunchLab](https://golflaunchlab.com). We test and review golf launch monitors with TrackMan-validated data. See our [launch monitor reviews](https://golflaunchlab.com/reviews/) and [buying guides](https://golflaunchlab.com/guides/).

## License

MIT
