View source: R/sim-transmit_along_path.r
transmit_along_path | R Documentation |
Simulate tag signal transmission along a pre-defined path (x, y coords) based on constant movement velocity, transmitter delay range, and duration of signal.
transmit_along_path(path = NA, vel = 0.5, delayRng = c(60, 180), burstDur = 5, EPSG = 3175, sp_out = TRUE)
path |
A two-column data frame with at least two rows and columns
|
vel |
A numeric scalar with movement velocity along track; assumed constant. |
delayRng |
A 2-element numeric vector with minimum and maximum delay (time in seconds from end of one coded burst to beginning of next). |
burstDur |
A numeric scalar with duration (in seconds) of each coded burst (i.e., pulse train). |
EPSG |
Numeric EPSG code of the coordinate system used for simulations. Default is 3175, a projected coordinate system for the North American Great Lakes Basin and St. Lawrence River system. http://spatialreference.org/ref/epsg/nad83-great-lakes-and-st-lawrence-albers/ |
sp_out |
Logical. If TRUE (default) then output is a SpatialPoints object. If FALSE, then output is a data.frame. |
Delays are drawn from uniform distribution defined by delay range. First, elapsed time in seconds at each node in path is calculated based on path length and velocity. Next, delays are simulated and burst durations are added toeach delay to determine the time of each signal transmission. Location of each signal transmission along the path is linearly interpolated.
If path
object is a data frame with x and y columns and
sp_out
argument is TRUE, then SpatialPointsDataFrame
output object will have coordinate system of EPSG
. Coordinate
system on output will be same as input if path object is
SpatialPoints
.
A SpatialPointsDataFrame object in the same CRS as the
input path
object.
OR
x |
x coordinates for start of each transmission |
y |
y coordinates for start of each transmission |
et |
elapsed time to start of each transmission |
This function was written to be called before
detect_transmissions
, which was designed to accept the result
as input (trnsLoc
).
C. Holbrook cholbrook@usgs.gov
mypath <- data.frame(x=seq(0,1000,100),y=seq(0,1000,100)) mytrns <- transmit_along_path(mypath,vel=0.5,delayRng=c(60,180),burstDur=5.0) plot(mypath,type="b") points(mytrns,pch=20,col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.