Title: | Process Columbus GPS Files |
---|---|
Description: | Small package with a few functions for processing files from Columbus GPS units used in PER studies. |
Authors: | Travis Hinkelman |
Maintainer: | Travis Hinkelman <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-03-02 03:18:17 UTC |
Source: | https://github.com/EnvironmentalScienceAssociates/ColumbusGPS |
Adjust datetime string from UTC to pacific timezone or vice versa.
adjust_datetime(datetime_str, type = c("to_pacific", "to_utc"))
adjust_datetime(datetime_str, type = c("to_pacific", "to_utc"))
datetime_str |
Datetime string in YYYY-MM-DD HH:MM:SS format |
type |
Direction for timezone adjustment: to_pacific or to_utc |
# Daylight Savings Time started on 2022-11-06 adjust_datetime(c("2022-11-05 12:00:00", "2022-11-07 12:00:00"), "to_pacific")
# Daylight Savings Time started on 2022-11-06 adjust_datetime(c("2022-11-05 12:00:00", "2022-11-07 12:00:00"), "to_pacific")
Get the sample date from datetime strings based on threshold time (to accommodate sampling that extends beyond midnight).
get_sample_date(datetime_str, threshold_time = "05:00:00")
get_sample_date(datetime_str, threshold_time = "05:00:00")
datetime_str |
Datetime string in the format YYYY-MM-DD HH:MM:SS |
threshold_time |
Time string in the format HH:MM:SS |
get_sample_date(c("2023-01-05 23:00:00", "2023-01-06 03:00:00", "2023-01-06 06:00:00"))
get_sample_date(c("2023-01-05 23:00:00", "2023-01-06 03:00:00", "2023-01-06 06:00:00"))
Prep Columbus GPS data file.
prep_data_file(data_file)
prep_data_file(data_file)
data_file |
Path to Columbus GPS data file |
Combine YYMMDD date and HHMMSS time into YYYY-MM-DD HH:MM:SS datetime.
prep_datetime(date_str, time_str)
prep_datetime(date_str, time_str)
date_str |
Date string in YYMMDD format |
time_str |
Time string in HHMMSS format |
prep_datetime("221212", "143000")
prep_datetime("221212", "143000")
Convert string representation of decimal degrees to numeric.
prep_lat_lon(x)
prep_lat_lon(x)
x |
String representing decimal degrees that end in N,S,E,W |
prep_lat_lon(c("121.51W", "121.51E")) prep_lat_lon(c("38.24N", "38.24S"))
prep_lat_lon(c("121.51W", "121.51E")) prep_lat_lon(c("38.24N", "38.24S"))