Skip to main content

Module constants

Module constants 

Source
Expand description

Physical constants used in ballistics calculations.

Constants§

AIR_DENSITY_SEA_LEVEL
Air density at sea level (kg/m³)
BC_FALLBACK_CONSERVATIVE
Conservative overall BC fallback value
BC_FALLBACK_HEAVY
Heavy projectiles (150-200 grains) Typical: .308 Winchester match bullets, .300 Winchester Magnum
BC_FALLBACK_LARGE_CALIBER
Large calibers (.264“ to .284“) Examples: .270 Winchester, .280 Remington, 7mm Remington Magnum
BC_FALLBACK_LIGHT
Light projectiles (50-100 grains)
Typical: .223 Remington, .243 Winchester hunting bullets
BC_FALLBACK_MEDIUM
Medium projectiles (100-150 grains) Typical: .270 Winchester, .30-06 hunting bullets
BC_FALLBACK_MEDIUM_CALIBER
Medium calibers (.243“) Examples: .243 Winchester, 6mm Creedmoor
BC_FALLBACK_SMALL_CALIBER
Small calibers (.224“ and smaller) Examples: .17 Remington, .22-250, .223 Remington
BC_FALLBACK_ULTRA_LIGHT
Ultra-light projectiles (0-50 grains) Typical: .17 caliber varmint bullets, .22 caliber target bullets
BC_FALLBACK_VERY_HEAVY
Very heavy projectiles (200+ grains) Typical: .338 Lapua Magnum, .50 BMG bullets
BC_FALLBACK_XLARGE_CALIBER
Extra large calibers (.308“ and larger) Examples: .308 Winchester, .30-06, .300 Winchester Magnum Note: Lower than expected due to inclusion of older, less aerodynamic designs
CD_TO_RETARD
Cd-to-retardation conversion for ICAO-referenced BCs.
DEFAULT_POWDER_REFERENCE_TEMP_C
Default powder reference temperature in Celsius.
DEFAULT_POWDER_REFERENCE_TEMP_F
Default powder reference temperature in Fahrenheit.
FPS_TO_MPS
Conversion factor: feet per second to meters per second
GRAINS_PER_GRAM
Grains per gram — the exact reciprocal of GRAMS_PER_GRAIN.
GRAINS_TO_KG
Conversion factor: grains to kilograms
GRAMS_PER_GRAIN
Grams per grain — exact by definition.
G_ACCEL_MPS2
Gravitational acceleration in m/s²
MIN_DIVISION_THRESHOLD
Minimum threshold for preventing division by zero in general calculations
MIN_MACH_THRESHOLD
Minimum threshold for Mach number calculations near unity
MIN_VELOCITY_THRESHOLD
Minimum threshold for velocity magnitude to avoid division by zero
MPS_TO_FPS
Conversion factor: meters per second to feet per second
NUMERICAL_TOLERANCE
General numerical tolerance for floating point comparisons
ROOT_FINDING_TOLERANCE
Tolerance for root finding algorithms
SPEED_OF_SOUND_MPS
Speed of sound at sea level, standard atmospheric conditions
STANDARD_AIR_DENSITY
Standard air density at sea level (kg/m³)