Skip to content

Commit 2537875

Browse files
committed
Corrections to docstrings
1 parent 9065387 commit 2537875

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

py_ballisticcalc/trajectory_data.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,15 @@ def calculate_energy(bullet_weight: float, velocity: float) -> float:
422422
"""Calculates the kinetic energy of a projectile.
423423
424424
Args:
425-
bullet_weight: The weight of the bullet in pounds.
426-
velocity: The velocity of the bullet in feet per second.
425+
bullet_weight: Projectile weight in grains.
426+
velocity: Projectile velocity in feet per second.
427427
428428
Returns:
429-
The kinetic energy of the projectile in foot-pounds.
429+
Kinetic energy in foot-pounds (ft·lbf).
430+
431+
Notes:
432+
Uses the standard small-arms approximation:
433+
E(ft·lbf) = weight(grains) * v(fps)^2 / 450400.
430434
"""
431435
return bullet_weight * math.pow(velocity, 2) / 450400
432436

@@ -435,8 +439,8 @@ def calculate_ogw(bullet_weight: float, velocity: float) -> float:
435439
"""Calculates the optimal game weight for a projectile.
436440
437441
Args:
438-
bullet_weight: The weight of the bullet in pounds.
439-
velocity: The velocity of the bullet in feet per second.
442+
bullet_weight: Bullet weight in grains (per common OGW formula).
443+
velocity: Projectile velocity in feet per second.
440444
441445
Returns:
442446
The optimal game weight in pounds.

0 commit comments

Comments
 (0)