seasonder_readSeaSondeCSFileData {SeaSondeR}R Documentation

Read SeaSonde Cross Spectra (CS) File Data

Description

This function reads the SeaSonde CS file data based on the provided header information. The CS file data includes the antenna voltage squared self spectra (⁠SSA*⁠) and the antenna cross spectra (CSxy). Additionally, a quality matrix (QC) is read when the header's nCsKind is greater than or equal to 2.

Usage

seasonder_readSeaSondeCSFileData(connection, header, endian = "big")

Arguments

connection

A connection object to the CS file.

header

A list containing the header information. This is typically the output of the seasonder_readSeaSondeCSFileHeader function.

endian

Character string indicating the byte order. Options are "big" (default) or "little".

Details

Value

A list containing the processed CS file data including matrices for SSA*, CSxy, and QC (if applicable).

Condition Management

This function utilizes the rlang package to manage errors and conditions, providing detailed and structured messages:

Error Classes:

Error Cases:

Examples

con <- rawConnection(as.raw(rep(0, 300)))
header <- list(nRangeCells = 1, nDopplerCells = 5, nCsKind = 2)
data <- seasonder_readSeaSondeCSFileData(con, header, endian = "big")
print(data)
close(con)

[Package SeaSondeR version 0.2.8 Index]