Fix flights' CSV file where callsigns contains ASCII NUL characters.

fix_nulls_in_callsign(flights_csv, fixed_dir = getwd())

Arguments

flights_csv

the full filename to the flights' file.

fixed_dir

the directory where to save the fixed files (defaults to current working directory).

Value

a the filename of a new file where each NUL in callsign has been substituted by a SPACE character. This typically happens for gliders (i.e. equip == "GLID"). The filename has a _fixed postfix to the original basename (without extension), i.e. 20170206_flights.csv becomes 20170206_flights_fixed.csv.

Examples

# NOT RUN {
# fix 6th Feb 2017 flights file
flights_dir <- system.file("extdata", package = "trrrj")
flights_file <- paste0(flights_dir, "/20170206_flights.csv")
flights_csv <- fix_nulls_in_callsign(flights_file)
# }