View source: R/SeaSondeRCSSW.R
seasonder_readSeaSondeRCSSWFile | R Documentation |
This function reads a SeaSonde RCSSW file from a specified file path and parses its content into a SeaSondeRCS object. The file is processed by reading its header and body sections using CSSW specifications provided via a YAML file.
seasonder_readSeaSondeRCSSWFile(
filepath,
specs_path = seasonder_defaultSpecsFilePath("CSSW"),
endian = "big"
)
filepath |
A character string specifying the path to the SeaSonde RCSSW file. |
specs_path |
A character string specifying the path to the YAML file containing CSSW specifications.
Defaults to the output of |
endian |
A character string indicating the byte order used in the file. Defaults to |
The function executes the following steps:
Sets up error handling parameters specific to the function.
Retrieves YAML specifications for the key size block from the CSSW spec file.
Attempts to open the file in binary mode ("rb") with warnings suppressed.
Reads the file key and uses it to extract file specs.
Reads the header key, retrieves header specs, and parses the CSSW header.
Converts the CSSW header into a valid SeaSondeRCS header.
Reads the body key, retrieves body specs, and parses the CSSW body.
Transforms the CSSW body into a SeaSondeRCS data structure.
Combines the header and data into a SeaSondeRCS object.
A SeaSondeRCS object containing the parsed header and data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.