Traj3DSmoothSG {trajr}R Documentation

Smooth a 3D trajectory using a Savitzky-Golay filter

Description

Smooths a 3-dimensional trajectory using a Savitzky-Golay smoothing filter.

Usage

Traj3DSmoothSG(trj3d, p = 3, n = p + 3 - p%%2, ...)

Arguments

trj3d

The 3=dimensional trajectory to be smoothed.

p

polynomial order (passed to sgolayfilt).

n

Filter length (or window size), must be an odd number. Passed to sgolayfilt.

...

Additional arguments are passed to sgolayfilt.

Details

Consider carefully the effects of smoothing a trajectory with temporal gaps in the data. If the smoothed trajectory is used to derive speed and/or acceleration, it may be advisable to fill in the gaps before smoothing, possibly by calling Traj3DResampleTime.

Value

A new trajectory which is a smoothed version of the input trajectory.

See Also

Traj3DFromCoords, sgolayfilt, TrajSmoothSG


[Package trajr version 1.5.1 Index]