Process BAR-LT log files into a data frame reflecting metadata, schedule
information, and events. Events are time-stamped logs of either GPS fixes
(lat and lon) or recordings (rec_file, rec_size, rec_end).
Arguments
- log_files
Character vector of log files to process.
- return
Character. What kind of data to return, GPS fixes (
"gps"), recording events ("recordings") or"all"(default).- progress
Logical. Whether to use
purrr::map()progress bars (defaultTRUE).
Value
Data frame containing
file_names andpaths of the log filesevents and theirdate_timeslatandlonfor "gps" eventsrec_file,rec_sizeandrec_endfor "recording" events (recording start is thedate_timeof the event)scheduleinformation such asschedule_date,schedule_name,schedule_lat,schedule_lon,schedule_sr(sunrise), andschedule_ss(sunset)metadata information such asmeta_serialandmeta_firmware
Details
Note that log files can have glitches. If there is no start time for a
recording (generally when there is a problem and no recording is made), the
date_time value for that recording will be the same as the rec_end time.
Because the BAR-LT units adjust their time according to the GPS locations, all times are in "local" to that area.
Examples
if (FALSE) { # dir.exists("my_project_folder")
# Replace "my_project_folder" with your directory containing your recordings and logfiles
log_files <- fs::dir_ls("my_project_folder", recurse = TRUE, glob = "*logfile*")
log_files
logs <- clean_logs(log_files)
log_files <- "../ARUtools - Extra/aru_log_files/P028/1A_BARLT10962/logfile_00010962_SD1.txt"
clean_logs(log_files)
clean_logs(log_files, return = "gps")
clean_logs(log_files, return = "recordings")
log_files <- fs::dir_ls("../ARUtools - Extra/aru_log_files/", recurse = TRUE, glob = "*logfile*")
l <- clean_logs(log_files)
}
