Learn R Programming

shotGroups (version 0.6.1)

getMOA: Conversion of absolute size to MOA, SMOA or milliradian

Description

Converts object size to angular measure (minute of angle MOA = arcminute, Shooter's MOA SMOA, milliradian mrad, NATO mil).

Usage

getMOA(x, dst, conversion = 'm2cm', type = c('MOA', 'SMOA', 'mrad', 'mil'))

Arguments

x
a numerical vector of object sizes.
dst
a numerical vector of viewing distances.
conversion
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates. Either a character vector indicating the conversion like 'm2cm' for meter to centimeter, 'yd2in' for yards to inches, or 'ft2cm'
type
type of angular measure: 'MOA' for minute of angle, 'SMOA' for Shooter's MOA, 'mrad' for milliradian, 'mil' for NATO mil. See details.

Value

  • A numerical vector with the MOA values.

Details

1 MOA (minute of angle, arcmin) = 1/60 degree. Shooter's MOA = SMOA = Inches Per Hundred Yards IPHY. 1 inch at 100 yards = 1 SMOA. 1 milliradian = 1/1000 radian. 1 mil = 2*pi/6400 radian (NATO definition: the circle circumference is divided into 6400 mils). Details are given in the vignette, see vignette('shotGroups') .

See Also

fromMOA, getDistance

Examples

Run this code
size <- seq(1, 20, by=5)   # inch
dst  <- 100                # yard
getMOA(size, dst=dst, conversion='yd2in', type='MOA')

# this should return objSize
MOA <- getMOA(size, dst=dst, conversion='yd2in', type='MOA')
fromMOA(MOA, dst=dst, conversion='yd2in', type='MOA')
        
# SMOA
getMOA(c(1, 2, 5), dst=100, conversion='yd2in', type='SMOA')

# milliradian
getMOA(c(10, 20, 50), dst=100, conversion='m2mm', type='mrad')

Run the code above in your browser using DataLab