seasonder_SwapDopplerUnits | R Documentation |
This function converts Doppler-related values between different units, including normalized Doppler frequency, Doppler bins, and absolute Doppler frequency (Hz), within a SeaSondeR
object.
seasonder_SwapDopplerUnits(seasonder_cs_object, values, in_units, out_units)
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 |
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"
: Uses seasonder_NormalizedDopplerFreq2Bins
.
To "doppler frequency"
: Uses seasonder_NormalizedDopplerFreq2DopplerFreq
.
If converting from "bins"
:
To "normalized doppler frequency"
: Uses seasonder_Bins2NormalizedDopplerFreq
.
To "doppler frequency"
: Uses seasonder_Bins2DopplerFreq
.
If converting from "doppler frequency"
:
To "bins"
: Uses seasonder_DopplerFreq2Bins
.
To "normalized doppler frequency"
: Uses seasonder_DopplerFreq2NormalizedDopplerFreq
.
Overall, the functions used for Doppler units conversion mimic the implementation of Doppler units displayed in SpectraPlotterMap 12 in Radial Suite R8
A numeric vector with the converted Doppler values in the specified output unit.
COS. SeaSonde Radial Suite Release 8; CODAR Ocean Sensors (COS): Mountain View, CA, USA, 2016.
seasonder_NormalizedDopplerFreq2Bins
, seasonder_Bins2NormalizedDopplerFreq
, seasonder_DopplerFreq2Bins
, and related functions for unit-specific conversions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.