getDistance | R Documentation |
Calculates the distance to an object based on the object's absolute and angular size.
getDistance(x, angular, conversion, type = c('deg', 'rad', 'MOA', 'SMOA', 'mrad', 'mil'))
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 |
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')
A numerical vector with the distance values.
getMOA
,
fromMOA
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.