Skip to contents

This function processes a block of keys from a binary connection according to a provided specification ('specs'). Each key is interpreted by reading it with seasonder_readSeaSondeCSFileBlock and processing it based on its key name. The key processing follows these rules:

Usage

seasonder_readCSSWBodyRangeCell(
  connection,
  specs,
  dbRef,
  endian = "big",
  specs_key_size = NULL
)

Arguments

connection

A binary connection from which keys and data are read.

specs

A list defining the expected keys and their formats.

dbRef

A numeric value providing the dB reference used in scaling.

endian

A string specifying the byte order ("big" or "little"). Defaults to "big".

specs_key_size

Optional specification for the key size block.

Value

A list with elements named after the keys read. For reduced data blocks, each element contains either the raw decoded data or the scaled voltage values if a 'scal' block had been applied.

Details

  • Scaling Block ('scal'): Reads scaling parameters (fmax, fmin, fscale, dbRef) using seasonder_readCSSWFields and stores them for later use.

  • Reduced Data Blocks (e.g., 'cs1a', 'cs2a', 'cs3a', 'c13m', 'c13a', etc.): Reads the block using seasonder_read_reduced_encoded_data. If scaling parameters were set by a preceding 'scal' block, the raw data is converted to voltage values using seasonder_SeaSondeRCSSWApplyScaling; otherwise, the raw data is returned.

  • Other Keys (e.g., 'csgn' and 'asgn'): These keys invoke their specialized read functions for processing.

The function continues reading keys until it detects the 'END ' marker or a repeated 'indx' key, which signals the end of the block.