generate_cruise_files: Generates Cruise Files and diagnostic plots

View source: R/generate_cruise_files.R

generate_cruise_filesR Documentation

Generates Cruise Files and diagnostic plots

Description

Generates 1Hz tables for all transects within a cruise (Ship Speed, Ship position, CBASS layback, CBASS depth, CBASS altitude, CBASS Pitch, CBASS Position) as well as diagnostic plots. Can also be used to generate this for a specific transect rather than full cruise using "CBASS_transect_name" and "CBASS_transect_subdir" arguments. Will also output a file "messages.txt" that logs inputs/warnings/errors. Note: If there is an error and you cannot delete "messages.txt" you may need to run "closeAllConnections()"

Usage

generate_cruise_files(
  output_dir,
  EK_dir,
  CBASS_dir,
  Ship_dir,
  winch_dir,
  altimeter_file = "altimeter_readings.tsv",
  ctd_file = "ctd_readings.tsv",
  compass_file = "compass_readings.tsv",
  zeroed = "water",
  GPS_Source = "CoG",
  CBASS_transect_name = NULL,
  CBASS_transect_subdir = "",
  alt_pos = ""
)

Arguments

output_dir

Directory to output files to

EK_dir

Directory of Ek Ship track file(s). Shiptrack files must be the only files in that directory that end in ".gps.csv"

CBASS_dir

Directory of CBASS transects

Ship_dir

Directory containing "Northstar-941X—GPVTG" file(s) (.lab, .aco, or .Raw)

winch_dir

Directory of winch data or path to Alex #2's payout tsv files

altimeter_file

name of altimeter files in CBASS directory. Default is "altimeter_readings.tsv" (only change if there is a default in original data table)

ctd_file

name of ctd files under CBASS directory. Default is "ctd_readings.tsv" (only change if there is a mistake in default data table)

compass_file

name of compass files under CBASS directory. Default is "compass_readings.tsv" (only change if there is a mistake in original default table)

zeroed

Where winch is zeroed ("water" or "block", default is water)

GPS_Source

Adds offset forward/aft offset between trawl block and GPS source. Must be "None", "CoG" (Center of Gravity), "Furuno" or "Northstar". Default is CoG.

CBASS_transect_name

Name of CBASS transect. Only use if you want to generate files for just one transect.

CBASS_transect_subdir

Name of sub_dir for CBASS transect. Only use if you want to generate files for just one transect.

alt_pos

File, vector of file names, or directory containing alternative positioning source (instead of EK). Currently only files with a basename of "Northstar-941X—GGA.lab", "Northstar-941X—GGA.aco", and Northstar-941X—GGA_*.Raw are supported. If a directory is supplied lab files will be preferentially used, then aco, then Raw.


ailich/mytools documentation built on Jan. 7, 2023, 11:16 a.m.