Draws a group with scaled bullet holes on a target background. Spread measures can be selected individually.
drawGroup(xy, center = FALSE, xyTopLeft = TRUE,
bb = FALSE, bbMin = FALSE, bbDiag = FALSE,
minCirc = FALSE, minEll = FALSE, maxSpread = FALSE,
meanDist = FALSE, confEll = FALSE,
CEP = FALSE, ringID = FALSE, valueID = TRUE, doRob = FALSE,
level = 0.95, scaled = TRUE, caliber = 9, dstTarget, conversion,
unit = 'unit', alpha = 0.5, target)# S3 method for data.frame
drawGroup(xy, center = FALSE, xyTopLeft = TRUE,
bb = FALSE, bbMin = FALSE, bbDiag = FALSE,
minCirc = FALSE, minEll = FALSE,
maxSpread = FALSE, meanDist = FALSE, confEll = FALSE,
CEP = FALSE, ringID = FALSE, valueID = TRUE, doRob = FALSE,
level = 0.95, scaled = TRUE, caliber = 9, dstTarget, conversion,
unit = 'unit', alpha = 0.5, target)
# S3 method for default
drawGroup(xy, center = FALSE, xyTopLeft = TRUE,
bb = FALSE, bbMin = FALSE, bbDiag = FALSE,
minCirc = FALSE, minEll = FALSE,
maxSpread = FALSE, meanDist = FALSE, confEll = FALSE,
CEP = FALSE, ringID = FALSE, valueID = TRUE, doRob = FALSE,
level = 0.95, scaled = TRUE, caliber = 9, dstTarget, conversion,
unit = 'unit', alpha = 0.5, target)
Invisibly returns a list with the following components, all converted to unit
(if they were requested):
(x,y)-coordinates converted to unit
.
(x,y)-offset of group center relative to point of aim in unit
(robust with doRob=TRUE
).
bounding box as returned by getBoundingBox
.
minimum-area bounding box as returned by getMinBBox
.
length of diagonal of bounding box.
length of diagonal of minimum-area bounding box.
minimum enclosing circle as returned by getMinCircle
.
minimum enclosing ellipse as returned by getMinEllipse
.
maximum pairwise distance between points (center-to-center, = maximum spread).
mean distance to group center.
confidence ellipse with coverage level
as returned by getConfEll
(robust with doRob=TRUE
).
Rayleigh estimate for the circular error probable CEP with coverage level
.
Definition of the selected target in original and converted measurement units.
Simulated and maximum ring count as returned by simRingCount
.
either a numerical (n x 2)-matrix with the (x,y)-coordinates of n points (1 row of coordinates per point), or a data frame with either the variables x
, y
or point.x
, point.y
as well as aim.x
, aim.y
giving the point of aim. If missing, point of aim is assumed to be in (0,0).
logical: center groups to mean (0,0) first? If variable series
does not exist, all shots are treated as belonging to the same group. Only available in method drawGroup.data.frame()
.
logical: is the origin of the absolute coordinate system in the top-left corner? This is the default for data exported by OnTarget PC/TDS. If an (n x 2)-matrix is supplied for xy
, point of aim is assumed to be in (0,0).
logical: draw bounding box?
logical: draw minimum-area bounding box?
logical: draw bounding box diagonal?
logical: draw minimum enclosing circle?
logical: draw minimum enclosing ellipse?
logical: draw maximum spread?
logical: draw circle with mean distance to group center?
logical: draw confidence ellipse with coverage level
?
draw estimate of CEP circle with coverage level
? Either logical or a string defining the CEP type. See getCEP
.
logical: identify and display the ring count for each shot?
logical: display numerical values of calculated measures in the diagram?
logical: use robust estimation of group center and confidence ellipse?
logical: draw bullet holes to scale?
a numerical value indicating the bullet diameter in mm.
a numerical vector giving the coverages of the confidence ellipses and CEPs.
a numerical value giving the distance to the target - used in MOA calculation. Acts as override if variable distance
is already included in xy
. See getMOA
.
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates in MOA calculation. Acts as override if variables dist.unit
and point.unit
are already included in xy
. Example 'm2cm'
. See getMOA
.
Measurement unit for the diagram. Defalt 'unit'
indicates that the measurement unit given in conversion
should be used. Possible values are 'unit', 'm', 'cm', 'mm', 'yd', 'ft', 'in', 'deg', 'MOA', 'SMOA', 'rad', 'mrad', 'mil'
.
a numerical value in [0,1] which controls the alpha blending for simulated transparency used to draw the bullet holes
a character string like 'ISSF_100m' indicating the target type to be drawn in the scatterplot. See targets
.
getBoundingBox
,
getMinBBox
,
getMinCircle
,
getMinEllipse
,
getMaxPairDist
,
getDistToCtr
,
getConfEll
,
drawBox
,
drawBox2
,
drawCircle
,
drawEllipse
,
targets
,
drawTarget
,
simRingCount
,
covMcd
# draw group in MOA
dg <- drawGroup(DFcciHV, xyTopLeft=TRUE, bb=TRUE, minCirc=TRUE,
confEll=TRUE, maxSpread=TRUE, caliber=5.56, unit='MOA',
dstTarget=100, conversion='yd2in', target='BDS9')
# mininum enclosing circle in MOA
dg$minCirc
# show Grubbs-Patnaik CEP estimator for mulitple levels
drawGroup(DF300BLKhl, CEP="GrubbsPatnaik", level=c(0.5, 0.9, 0.95),
dstTarget=100, conversion="yd2in", caliber=7.62)
Run the code above in your browser using DataLab