Creates a function that converts a directory path to a flight name
Source:R/uas_path2name_fun.R
uas_path2name_fun.Rd
Creates a function that converts a directory path to a flight name
Details
This will return a function that will parse a directory path into its constituent pieces and
construct a name from one or more of those pieces. This can be useful for automatically naming flights
based on the directory path in which the images are saved when running uas_info
.
idx_from_last
are indices of the subdirectories in the path, starting from the end. Hence if you wanted to construct
names for a flight based on the very subdirctory (only), let idx_from_last = 1
. If you want the names to be constructed
based on the 2nd to last subdirectory, let idx_from_last = 2
, and so on. If more than one number is passed for
idx_from_last
, the name returned will concatenate the pieces separated by underscores.
Note that this function does not actually convert a directory path to a flight name, but returns a function that will do the conversion.