seasonder_SwapDopplerUnits {SeaSondeR} | R Documentation |
Convert Between Different Doppler Frequency Units
Description
This function converts Doppler-related values between different units, including normalized Doppler frequency, Doppler bins, and absolute Doppler frequency (Hz), within a SeaSondeR
object.
Usage
seasonder_SwapDopplerUnits(seasonder_cs_object, values, in_units, out_units)
Arguments
seasonder_cs_object |
A |
values |
A numeric vector specifying the Doppler values to be converted. |
in_units |
A character string specifying the current unit of
|
out_units |
A character string specifying the target unit for conversion. Must be one of the same three options as |
Details
The function first validates that the input and output units are among the allowed options.
If in_units
and out_units
are the same, the function returns the original values without modification.
The unit conversions follow this logic:
If converting from
"normalized doppler frequency"
:To
"bins"
: Usesseasonder_NormalizedDopplerFreq2Bins
.To
"doppler frequency"
: Usesseasonder_NormalizedDopplerFreq2DopplerFreq
.
If converting from
"bins"
:To
"normalized doppler frequency"
: Usesseasonder_Bins2NormalizedDopplerFreq
.To
"doppler frequency"
: Usesseasonder_Bins2DopplerFreq
.
If converting from
"doppler frequency"
:To
"bins"
: Usesseasonder_DopplerFreq2Bins
.To
"normalized doppler frequency"
: Usesseasonder_DopplerFreq2NormalizedDopplerFreq
.
Overall, the functions used for Doppler units conversion mimic the implementation of Doppler units displayed in SpectraPlotterMap 12 in Radial Suite R8
Value
A numeric vector with the converted Doppler values in the specified output unit.
References
COS. SeaSonde Radial Suite Release 8; CODAR Ocean Sensors (COS): Mountain View, CA, USA, 2016.
See Also
seasonder_NormalizedDopplerFreq2Bins
, seasonder_Bins2NormalizedDopplerFreq
, seasonder_DopplerFreq2Bins
, and related functions for unit-specific conversions.