Skip to contents

This function calculates geographic coordinates (latitude and longitude) for each MUSIC detection based on the range and direction of arrival (DOA) bearings from a SeaSondeRCS object.

Usage

seasonder_MUSICLonLat(seasonder_cs_object)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing MUSIC detection data.

Value

A SeaSondeRCS object with updated MUSIC data, including geographic coordinates for each detection.

Details

This function performs the following operations:

  1. Retrieves MUSIC data and original geographic coordinates (latitude and longitude) from the seasonder_cs_object. If these coordinates are not available, the origin is derived from the associated Antenna Pattern (APM) data.

  2. Converts DOA bearings from MUSIC detections into geographic bearings using the APM object.

  3. Computes latitude and longitude for each MUSIC detection based on the range and geographic bearings using seasonder_computeLonLatFromOriginDistBearing

  4. Updates the seasonder_cs_object with the newly computed coordinates.

Examples

# Create a SeaSondeRCS object for MUSIC example
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)
#> seasonder_createSeaSondeRAPM:  APM object created successfully.
cs_obj   <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
#> new_SeaSondeRCS:  SeaSondeRCS object created successfully.
cs_obj <- seasonder_initMUSICData(
 cs_obj,
 range_cells = c(rep(5,11), rep(4,11)),
 doppler_bins = c(c(669:679),c(674:684))
)
cs_obj <- seasonder_runMUSIC(cs_obj)
#> seasonder_runMUSIC:  MUSIC algorithm started.
#> seasonder_runMUSIC:  MUSIC algorithm finished.
updated_obj <- seasonder_MUSICLonLat(cs_obj)
print(updated_obj)
#> Station Code: TORA
#> Time: 2024-04-04 07:00:00
#> N Doppler Cells: 1024
#> N Range Cells: 63