particle_track | R Documentation |
Track one or more particles
particle_track(
X,
P0 = X$random_points(),
tstep = 60,
tmax = 3600 * 12,
reverse = FALSE,
drag = c(0, 0, 0),
resistance = c(0, 0, 0),
resistance_type = c("proportional", "constant")[1],
fixed_z = FALSE,
clip_z = TRUE,
show_progress = FALSE,
verbose = FALSE,
filename = c("particle_track.geojson", NA)[2],
overwrite = TRUE
)
X |
FVCOM_Physics object |
P0 |
starting point(s), see |
tstep |
numeric, seconds between each iteration |
tmax |
numeric, number of seconds to run for |
reverse |
logical, if TRUE run the track reverse in time. It is an error
to provide the seed point with a timestamp equivalent to the first timestep of the
model. See |
drag |
numeric, a three element vector of drag factors in [x, y, z], like a sinking rate in z.
Drag units must be the same as the units of |
resistance |
numeric, if non zero then apply this to the speed computed at each each time step. Negative to impeded progress, positive to add to progress. Zero has no effect |
resistance_type |
character, one of 'proportional' or 'constant' Proportional is a proportion of the speed, thus typically a fraction in the range of [-1, 1]. Constant is applied uniformly and is in the unit/time (typically m/s) of the data. |
fixed_z |
logical, if TRUE then depths are fixed to the initial depths, and
|
clip_z |
logical, if TRUE clip Z positions to be between surface and bathymetric depth. |
show_progress |
logical, if TRUE then show a progress bar |
verbose |
logical, if TRUE output messages (for development) |
filename |
an optional filename to save the track to or NA to skip |
overwrite |
logical, if TRUE allow overwriting of existing files |
sf object of type POINT
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.