lt_toolbox.TrajFrame.compute_velocity#

TrajFrame.compute_velocity() Self[source]#

Compute magnitude and direction of the velocity vectors describing each Lagrangian trajectory.

Two column variables are returned to the TrajFrame object: speed (m/s) and direction (degrees) each with List dtype.

The final element in each list is Null since the velocity magnitude and direction is undefined at the final position.

Returns:

TrajFrame is returned with two new column variables: magnitude (speed) and the direction (bearing) of the velocity vectors describing each Lagrangian trajectory.

Return type:

TrajFrame.

Examples

Computing velocity of particles along their Lagrangian trajectories, by default the speed is returned with units of the {dist} / {time} column variables (e.g., m/s).

>>> trajectories.compute_velocity()