Skip to content

Commit

Permalink
Merge branch 'release/v0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Gardner committed Mar 12, 2018
2 parents defc99e + 78290ce commit 6c2fa5f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GOPATH=/Users/runeimp/dev/apps/ballistic
VERSION=0.4.1
VERSION=0.4.2
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Ballistic v0.4.1
Ballistic v0.4.2
================

Command line ballistics calculator
Expand All @@ -23,15 +23,25 @@ Usage
### Typical Gun Ballistics

```text
$ ballistic -m 300gr -v 800fps -f 4
$ ballistic -m 123gr -v 50000fps
Projectile Velocity: 800.0000 feet per second
Projectile Energy: 1,155.8428 joules
Projectile Momentum: 4.7402 meter kilogram per second
Max Point Blank Range: 242.3544 feet
Projectile Velocity: 50,000.001600 feet per second
Projectile Energy: 1,851,154.550587 joules
Projectile Momentum: 121.466834 meter kilogram per second
Max Point Blank Range: 15,147.150313 feet
$ ballistic -m 123gr -v 50000fps --locale IN
Projectile Velocity: 50,000.001600 feet per second
Projectile Energy: 18,51,154.550587 joules
Projectile Momentum: 121.466834 meter kilogram per second
Max Point Blank Range: 15,147.150313 feet
```

Note that the first run defaults to my locale of `en_US.UTF-8`. If a locale is not found or supported (yet) the default is `en_US`.


### Archery or Mechanical Ballistics with JSON output (pretty printed)

```text
Expand Down Expand Up @@ -68,19 +78,21 @@ USAGE:
ballistic [global options]
VERSION:
0.2.0
0.4.2
GLOBAL OPTIONS:
--debug, -d Output debug info
--draw-length LENGTH, --length LENGTH, -l LENGTH Bow or sling shot draw LENGTH. Used to calculate projectile velocity, energy, etc.
--draw-weight WEIGHT, --weight WEIGHT, -w WEIGHT Bow or sling shot draw WEIGHT. Used to calculate projectile velocity, energy, etc.
--json, -j Output JSON data
--mass MASS, -m MASS Projectile MASS (weight). Used to calculate projectile velocity, energy, etc.
--pretty-print, --pretty, -p Pretty printed JSON output
--radius RADIUS, -r RADIUS The RADIUS of the target area. Used to calculate MPBR (Maximum Point Blank Range).
--velocity VELOCITY, -v VELOCITY The projectile VELOCITY (speed). Used to calculate projectile energy, momentum, etc.
--help, -h Print this help info
--version, -V Print the ballistic version
--debug, -d Output debug info
--draw-length LENGTH, --length LENGTH, -l LENGTH Bow or sling shot draw LENGTH. Used to calculate projectile velocity, energy, etc.
--draw-weight WEIGHT, --weight WEIGHT, -w WEIGHT Bow or sling shot draw WEIGHT. Used to calculate projectile velocity, energy, etc.
--json, -j Output JSON data
--locale LOCALE, --local LOCALE The LOCALE to format number output for. (default: "en_US") [$LC_CTYPE, $LANG]
--precision PRECISION, --float PRECISION, -f PRECISION The output floating point PRECISION (numbers after decimal mark). (default: "6")
--pretty-print, --pretty, -p Pretty printed JSON output
--projectile MASS, --mass MASS, -m MASS Projectile MASS (weight). Used to calculate projectile velocity, energy, etc.
--radius RADIUS, -r RADIUS The RADIUS of the target area. Used to calculate MPBR (Maximum Point Blank Range). (default: "225mm")
--velocity VELOCITY, -v VELOCITY The projectile VELOCITY (speed). Used to calculate projectile energy, momentum, etc.
--help, -h Output this help info
--version, -V Output the ballistic app version
VALUE SUFFIXES:
All input values may be suffixed to allow for broader input selection.
Expand Down Expand Up @@ -113,6 +125,7 @@ VALUE SUFFIXES:
† This is the default and will be used if no suffix is specified
If most or all of the input values are in imperial units then the output will use imperial units as well.
```


Expand Down
4 changes: 2 additions & 2 deletions ballistic.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
//
// CONSTANTS
//
const APP_VERSION = "0.3.0"
const APP_VERSION = "0.4.2"


//
Expand Down Expand Up @@ -551,7 +551,7 @@ func main() {
Usage: "Output JSON data",
},
cli.StringFlag{
Name: "locale",
Name: "locale, local",
Value: "en_US",
Usage: "The `LOCALE` to format number output for.",
EnvVar: "LC_CTYPE,LANG",
Expand Down

0 comments on commit 6c2fa5f

Please sign in to comment.