transectHeading: transectHeading

Description Usage Arguments Value Examples

View source: R/transectHeading.R

Description

Determines the compass heading of a cross-section transect, assuming transect starts at river right

Usage

1
transectHeading(x, y, velE, velN, depth, flowHeading)

Arguments

x

A vector of x coordinates.

y

A vector of y coordinates. Must be the same length as x.

velE

A vector of velocities to the east. Must be the same length as x.

velN

A vector of velocities to the north. Must be the same length as x.

depth

A vector of water depths. Must be the same length as x.

flowHeading

Optional. Mean direction of flow over the cross-section. If provided velE, velN, and depth may be omitted.

Value

Returns the compass heading of a transect

Examples

1
2
3
4
5
data(vels)
velSub <- vels[transectName == "t1",,]
transectHeading(velSub$UTM_X_Proj, velSub$UTM_Y_Proj, velSub$Mean.Vel.E, velSub$Mean.Vel.N, velSub$depth)
#If flow heading is known
transectHeading(velSub$UTM_X_Proj, velSub$UTM_Y_Proj, flowHeading = 149)

jasonfischer/rivSurveyR documentation built on May 18, 2019, 5:54 p.m.