interp_heading: Interpolate heading

View source: R/interp_heading.R

interp_headingR Documentation

Interpolate heading

Description

Function to interpolate headings. Heading interpolation can be a little tricky when you wrap around from 0 to 360, so this function takes care of that.

Used by distance_between(), target_track_distance(), target_ownship_distance(), and track_ownship_distance(). It's likely that if you're looking at using this function you actually want one of those.

Usage

interp_heading(currentTimes, currentHeadings, newTimes)

Arguments

currentTimes

vector of the times of the existing heading measurements

currentHeadings

vector of the existing heading measurements

newTimes

vector of the times to be interpolated to

Value

a vector of headings at the new times (newTimes)


battleVerse/scenarioMaker documentation built on July 16, 2024, 4:21 a.m.