Learn R Programming

puff (version 0.1.0)

interpolate_wind_data: Resample wind_speeds and wind_directions to the simulation resolution by interpolation

Description

Resample wind_speeds and wind_directions to the simulation resolution by interpolation

Usage

interpolate_wind_data(wind_speeds, wind_directions, sim_start, sim_end, puff_dt)

Value

Quantities corresponding to the conversion direction

Arguments

wind_speeds

A list of float values of wind speeds in m/s at each time stamp

wind_directions

A list of float values of wind directions in degrees at each time stamp following the conventional definition: 0 -> wind blowing from North, 90 -> E, 180 -> S, 270 -> W

sim_start

Date & time stamps of simulation start time

sim_end

Date & time stamps of simulation end time

puff_dt

A scalar time interval between two puffs

Examples

Run this code
out <- interpolate_wind_data(c(2, 3), c(90, 180),
  "2024-01-01 00:00:00", "2024-01-01 01:00:00", 300
)

Run the code above in your browser using DataLab