Learn R Programming

shotGroups (version 0.6.2)

drawTarget: Draw a target pattern

Description

Draws a target pattern - either from the name of a pre-specified target type or from a supplied list defining the target.

Usage

drawTarget(x, unit = 'cm', dstTarget = 100, conversion = 'm2cm',
           add = FALSE, cex = par('cex'))

Arguments

x
either a character value with the name of a target in targets or a list with a target definition containing the same components as those in targets<
unit
the measurement unit that should be used in the plot. Possible values are 'cm', 'mm', 'm', 'in', 'ft', 'yd', 'MOA', 'SMOA', 'milrad'.
dstTarget
a numerical value with the distance to the target - used in MOA calculation. See getMOA.
conversion
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates - used in MOA calculation. See getMOA.
add
logical: add to existing plot or create new plot?
cex
numerical value specifying the magnification factor for plotting the ring numbers.

Value

  • Invisibly returns a list with (at least) the following components defining the target:
  • nametarget name.
  • unitTargetmeasurement unit for ring diameters and radii.
  • nRingsnumber of rings.
  • maxCounthighest ring count for scoring.
  • ringD10diameter of ring number 10 (highest-valued ring).
  • ringD10idiameter of sub-division of ring number 10 (Innenzehn). If target has no sub-division, equal to ringD10.
  • ringWwidth of the remaining rings number 9, 8, 7, ...
  • colsnRings+1 colors of the rings - right half of the target, starting with the sub-division of ring number 10 and going outwards.
  • colsTxtnRings-1 colors of the ring numbers, starting with ring number 9 and going outwards.
  • ringRnRings+1 ring radii, including sub-division of ring number 10.
  • unitConvmeasurement unit for ringD10u, ringD10iu, ringWu, ringRu as defined by unit.
  • ringD10udiameter of ring number 10 converted to unit.
  • ringD10iudiameter of sub-division of ring number 10 (Innenzehn) converted to unit.
  • ringWuwidth of the remaining rings number 9, 8, 7, ... converted to unit.
  • ringRunRings+1 ring radii, including sub-division of ring number 10, converted to unit.

See Also

targets, drawGroup

Examples

Run this code
# draw ISSF 300m target in inch
trgt <- drawTarget('ISSF_300m', unit='in')

# target definition
trgt

Run the code above in your browser using DataLab