Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingData = fmt.Errorf("missing rifle, environment, or target")
Functions ¶
This section is empty.
Types ¶
type Bullet ¶
type Bullet struct { Caliber float64 // Diameter of bullet in inches Weight float64 // Weight of bullet in grains BC *Coefficient Length float64 // bullet length in inches }
type Coefficient ¶
type Environment ¶
type Environment struct { Temperature float64 // In Fahrenheit Altitude int // in ft Pressure float64 // in Hg Humidity float64 // Himidity percentage WindAngle float64 // Wind direction in degrees (0 to 360) WindSpeed float64 // Wind speed in mph PressureAbsolute bool // If true, only Pressure will be used }
type Rifle ¶
type Rifle struct { Name string Load *Load SightHeight *float64 // Sight height in inches (default 1.5) BarrelTwist *float64 // Barrel twist rate (default 7) TwistDirection string // Twist direction "left" or "right" (default "right") ZeroRange *float64 // Zero range of rifle in yrds (default 100) }
type Scenario ¶
type Scenario struct { Rifle *Rifle Environment *Environment Target *Target IncludeSpinDrift bool }
func NewScenario ¶
func NewScenario(r *Rifle, e *Environment, t *Target, drift bool) *Scenario
func (*Scenario) SetEnvironment ¶
func (s *Scenario) SetEnvironment(env *Environment)
func (*Scenario) SetIncludeSpinDrift ¶
Click to show internal directories.
Click to hide internal directories.