Installations
npm install pg-ballistics
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.16.1
NPM Version
6.14.0
Score
67
Supply Chain
91
Quality
75.1
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
PaulGilchrist
Download Statistics
Total Downloads
974
Last Day
1
Last Week
17
Last Month
73
Last Year
283
GitHub Statistics
MIT License
2 Stars
2 Commits
3 Watchers
1 Branches
1 Contributors
Updated on Apr 20, 2023
Package Meta Information
Latest Version
1.0.1
Package Id
pg-ballistics@1.0.1
Unpacked Size
8.90 kB
Size
2.76 kB
File Count
4
NPM Version
6.14.0
Node Version
12.16.1
Total Downloads
Cumulative downloads
Total Downloads
974
Last Day
-80%
1
Compared to previous day
Last Week
13.3%
17
Compared to previous week
Last Month
114.7%
73
Compared to previous month
Last Year
54.6%
283
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Ballistics Drag Functions NPM Library
Usage
1import ballistics from 'pg-ballistics'; 2// Returns an array of 'Range' objects each of which represents a row on the ballistics table 3const rangeData = ballistics.getRangeData(weather, target, firearm, round);
Models
1export interface Firearm { 2 id: string; 3 name: string; 4 // Gradients are clicks required to match 1 full turret unit. 5 // MoA and IPHY are 1, 2 or 4 displayed in select as 1, 1/2, 1/4 per click 6 // Mil scopes are always 10 clicks per Mil shown as 1/10 7 elevationTurretGradients: number; 8 reticleUnits: string; // 'Mil', 'MoA', or 'IPHY' 9 rounds: Array<Round>; 10 sightHeightInches: number; 11 turretUnits: string; // 'Mil', 'MoA', or 'IPHY' 12 windageTurretGradients: number; 13 zeroRangeUnits: string; // 'Yards' or 'Meters' 14 zeroRange: number; 15} 16export interface Range { 17 rangeMeters: number; 18 rangeYards: number; 19 velocityFPS: number; 20 energyFtLbs: number; 21 timeSeconds: number; 22 dropInches: number; 23 verticalPositionInches: number; 24 // Cross Winds take on full range value regardless of Slant To Target 25 crossWindDriftInches: number; 26 leadInches: number; 27 slantDegrees: number; 28 // All the remaining properties are computed 29 verticalPositionMil: number; 30 verticalPositionMoA: number; 31 verticalPositionIPHY: number; 32 crossWindDriftMil: number; 33 crossWindDriftMoA: number; 34 crossWindDriftIPHY: number; 35 leadMil: number; 36 leadMoA: number; 37 leadIPHY: number; 38 slantDropInches: number; 39 slantMil: number; 40 slantMoA: number; 41 slantIPHY: number; 42} 43export interface Round { 44 id: string; 45 name: string; 46 bulletBC: number; 47 bulletDiameterInches: number; 48 bulletWeightGrains: number; 49 muzzleVelocityFPS: number; 50} 51export interface Target { 52 distanceUnits: string; // 'Yards' or 'Meters' 53 distance: number; 54 chartStepping: number; 55 sizeInches?: number; 56 slantDegrees: number; 57 speedMPH: number; 58} 59export interface Weather { 60 altitudeFeet: number; 61 temperatureDegreesFahrenheit: number; 62 barometricPressureInchesHg: number; 63 relativeHumidityPercent: number; 64 windVelocityMPH: number; 65 windAngleDegrees: number; 66}
Functions
getRangeData(weather, target, firearm, round)
- Returns an array of 'Range' objects each of which represents a row on the ballistics table

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More