Weapon
A base class for creating Weapon.
Attributes:
Name | Type | Description |
---|---|---|
sight_height |
Distance
|
Sight height |
twist |
Distance
|
Twist |
zero_elevation |
Angular
|
Zero elevation |
sight |
Optional[Sight]
|
Sight properties |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sight_height
|
Optional[Union[float, Distance]]
|
Vertical distance from center of bore line to center of sight line. |
None
|
twist
|
Optional[Union[float, Distance]]
|
Distance for barrel rifling to complete one complete turn. Positive value => right-hand twist, negative value => left-hand twist. |
None
|
zero_elevation
|
Optional[Union[float, Angular]]
|
Angle of barrel relative to sight line when sight is set to "zero." (Typically computed by ballistic Calculator.) |
None
|
sight
|
Optional[Sight]
|
Sight properties |
None
|
Example
This is how you can create a weapon
from py_ballisticcalc import Weapon, Unis, Sight
weapon = Weapon(
sight_height=Unit.Inch(2.),
twist=Unit.Inch(10.),
zero_elevation=Unit.Mil(0),
sight=Sight(
'FFP', 2,
h_click_size=Unit.Mil(0.2),
v_click_size=Unit.Mil(0.2)
)
)
Source code in py_ballisticcalc\munition.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|