interpolate_trips: interpolate_trips, interpolate your tracking data to a...

View source: R/interpolate_trips.R

interpolate_tripsR Documentation

interpolate_trips, interpolate your tracking data to a specific interval

Description

interpolate_trips, interpolate your tracking data to a specific interval

Usage

interpolate_trips(
  GPS_data = GPS_data,
  interval = interval,
  column_date = column_date,
  column_time = column_time,
  datetime_format = datetime_format,
  column_lat = column_lat,
  column_lon = column_lon,
  column_trip = column_trip
)

Arguments

GPS_data

Is the data you want to interpolate

interval

Is the interval you want to use, in seconds, for example 900 s is 15 minutes

column_date

Is the name of the column where you have the Date, if you dont have date separately, you can always create a new column only with the date

column_time

Is the name of the column where you have the Time, if you dont have time separately in a column, you can always create a new column only with the time

datetime_format

Is the format you use for your date and time, for example "%d/%m/%Y %H:%M:%S", "%d-%m-%Y %H:%M:%S" or "%Y-%m-%d %H:%M:%S"

column_lat

Is the name of the column where you have the Latitude

column_lon

Is the name of the column where you have the Longitude

column_trip

Is the name of the column where you have the Trip number, if you dont have number of trip please check the function count_trips

Value

Gives back a data frame with the interpolated data, only four columns will be returned: dt, Longitude, Latitude, and trip_number

Examples

GPS_interpolated<-interpolate_trips(GPS_data=GPS01_trips,interval='900 sec',
column_date='DateGMT',column_time='TimeGMT',column_trip='trip_number',
column_lat='Latitude',column_lon='Longitude',datetime_format="%d/%m/%Y %H:%M:%S")

MiriamLL/sula documentation built on July 7, 2024, 10:34 a.m.