seasonder_exportMUSICTable: Export MUSIC Table from SeaSondeRCS Object

View source: R/SeaSondeRCS_MUSIC.R

seasonder_exportMUSICTableR Documentation

Export MUSIC Table from SeaSondeRCS Object

Description

This function generates a table containing detailed MUSIC detection data from a SeaSondeRCS object. The output table includes geographic coordinates, signal parameters, and other metadata for each MUSIC detection.

Usage

seasonder_exportMUSICTable(seasonder_cs_object)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing MUSIC detection data and related metadata.

Details

This function performs the following operations:

  1. Retrieves the timestamp (nDateTime) from the header of the SeaSondeRCS object. Defaults to as.POSIXct(0) if unavailable.

  2. Initializes an empty data frame with predefined columns.

  3. Retrieves MUSIC detection data, processes the Direction of Arrival (DOA) and geographic coordinates (lonlat), and unnests these fields.

  4. Converts MUSIC bearings to geographic bearings using the associated Antenna Pattern Matrix (APM) object.

  5. Computes additional metrics such as signal power in dB, signal-to-noise ratio (SNR), and DOA peak response in dB.

  6. Appends the timestamp to the table and reorders columns for clarity.

Value

A data frame with the following columns:

  • datetime: Timestamp of the data.

  • longitude: Geographic longitude of the detection.

  • latitude: Geographic latitude of the detection.

  • range_cell: Range cell number.

  • range: Range in kilometers.

  • doppler_bin: Doppler bin number.

  • doppler_freq: Doppler frequency.

  • radial_velocity: Radial velocity in m/s.

  • signal_power: Signal power.

  • bearing: Geographic bearing in degrees.

  • bearing_raw: Original MUSIC bearing in degrees.

  • noise_level: Noise level in dB.

  • signal_power_db: Signal power in dB.

  • SNR: Signal-to-noise ratio in dB.

  • DOA_peak_resp_db: DOA peak response in dB.

See Also

  • seasonder_getSeaSondeRCS_MUSIC

  • seasonder_MUSICBearing2GeographicalBearing

  • seasonder_getSeaSondeRAPM_AntennaBearing

Examples


  # Load sample CSS and APM files
  cs_file  <- system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR")
  apm_file <- system.file("css_data/MeasPattern.txt",       package = "SeaSondeR")
  apm_obj  <- seasonder_readSeaSondeRAPMFile(apm_file)
  # Create SeaSondeRCS object with APM
  cs_obj <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
FOR <- seasonder_getSeaSondeRCS_FOR(cs_obj)
cs_obj <- seasonder_setSeaSondeRCS_FOR(cs_obj,FOR[4:5])

  # Run MUSIC algorithm (in FOR context) if MUSIC data is available:
  cs_obj <- seasonder_runMUSICInFOR(cs_obj)
  # Export MUSIC table
  music_table <- seasonder_exportMUSICTable(cs_obj)
  print(music_table)


SeaSondeR documentation built on June 8, 2025, 10:50 a.m.