ifcb_get_svea_position.RdThis function reads .txt files from a specified folder containing ferrybox data, filters them based on a specified ship name (default is "SveaFB" for R/V Svea), and extracts GPS coordinates for timestamps (nearest minute) falling within the date ranges defined in the file names.
ifcb_get_svea_position(timestamps, ferrybox_folder, ship = "SveaFB")A vector of POSIXct timestamps for which GPS coordinates are to be retrieved.
Path to the folder containing ferrybox .txt files.
Name of the ship to filter ferrybox files (default is "SveaFB").
A data frame containing the input timestamps and corresponding GPS coordinates. Columns include 'timestamp', 'gpsLatitude', and 'gpsLongitude'.
if (FALSE) {
ferrybox_folder <- "/path/to/ferrybox/data"
timestamps <- as.POSIXct(c("2016-08-10 10:47:34 UTC",
"2016-08-10 11:12:21 UTC",
"2016-08-10 11:35:59 UTC"))
result <- ifcb_get_svea_position(timestamps, ferrybox_folder)
print(result)
}