getDistance {shotGroups} | R Documentation |
Get distance based on absolute and angular size
Description
Calculates the distance to an object based on the object's absolute and angular size.
Usage
getDistance(x, angular, conversion,
type = c('deg', 'rad', 'MOA', 'SMOA', 'mrad', 'mil'))
Arguments
x |
a numerical vector of absolute object sizes. |
angular |
a numerical vector of angular object sizes. |
conversion |
how to convert the measurement unit for the returned distance to object to that of given absolute object size. Either a character vector indicating the conversion such as |
type |
type of angular measure used in |
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')
Value
A numerical vector with the distance values.
See Also
Examples
size <- seq(1, 20, by=5) # inch
dst <- 100 # yard
# get angular size in MOA from absolute size
angular <- getMOA(size, dst=dst, conversion='yd2in', type='MOA')
# this should return dst throughout
getDistance(size, angular=angular, conversion='yd2in', type='MOA')