|
libRBR
v1.2.3
RBR instrument communication API
|
Library for salinity dynamic correction. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
| struct | RBRDynamicCorrectionParams |
| struct | RBRDynamicCorrectionMeasurement |
| struct | RBRDynamicCorrectionResult |
Macros | |
| #define | DCORR_MAX_LAG_ARRAY 20 |
| Define the maximum amount of lag permitted. | |
| #define | DCORR_T_DELAY 0.35f |
| Define the C-T lag adjustment delay (in seconds) | |
| #define | DCORR_ALPHA 0.041f |
| Define the magnitude of short-term thermal mass correction (unitless) | |
| #define | DCORR_ALPHA_A 0.00323f |
| Define the 'a' ascent-rate fit coefficient for alpha (unitless) | |
| #define | DCORR_ALPHA_E -1.03f |
| Define the 'e' ascent-rate fit coefficient for alpha (unitless) | |
| #define | DCORR_TAU 8.11f |
| Define the time constant of short-term thermal mass correction (seconds) | |
| #define | DCORR_TAU_A 4.93f |
| Define the 'a' ascent-rate fit coefficient for alpha (unitless) | |
| #define | DCORR_TAU_E -0.26f |
| Define the 'e' ascent-rate fit coefficient for alpha (unitless) | |
| #define | DCORR_CT_COEFF 0.97e-2f |
| Define the magnitude of long-term thermal mass correction (unitless) | |
| #define | DCORR_CT_COEFF_A 0.00139f |
| Define the 'a' ascent-rate fit coefficient for ctcoeff (unitless) | |
| #define | DCORR_CT_COEFF_E -1.00f |
| Define the 'e' ascent-rate fit coefficient for ctcoeff (unitless) | |
| #define | DCORR_VP_MIN 0.03f |
| Define the minimum for the range for ascent rate as pressure/time (dbar/sec) | |
| #define | DCORR_VP_MAX 0.45f |
| Define the minimum for the range for ascent rate as pressure/time (dbar/sec) | |
| #define | DCORR_VP_FC 0.04f |
| Define the filter cutoff frequency for ascent rate as pressure/time (Hz) | |
Enumerations | |
| enum | RBRDynamicCorrectionError { RBR_DCORR_SUCCESS = 0, RBR_DCORR_INVALID_SAMPLING_RATE, RBR_DCORR_NOT_VALID_YET, DYN_CORR_CORRUPTED, DYN_CORR_BAD_PARAMS, DYN_CORR_UNKNOWN_ERROR } |
| Errors which can be returned from dynamic correction algorithm. More... | |
Functions | |
| RBRDynamicCorrectionError | RBRDynamicCorrection_init (RBRDynamicCorrectionParams *params, float Fs, float t_delay, float alpha_a, float alpha_e, float tau_a, float tau_e, float ctcoeff_a, float ctcoeff_e, float Vp_min, float Vp_max, float Vp_fc) |
| Initialize the dynamic correction algorithm. More... | |
| RBRDynamicCorrectionError | RBRDynamicCorrection_update_Fs (RBRDynamicCorrectionParams *params, float Fs) |
| Change the sampling rate for the algorithm. More... | |
| RBRDynamicCorrectionError | RBRDynamicCorrection_addMeasurement (RBRDynamicCorrectionParams *params, const RBRDynamicCorrectionMeasurement *measIn, RBRDynamicCorrectionResult *corrMeasOut) |
| Feed a new measurement in the algorithm. More... | |
Library for salinity dynamic correction.
Errors which can be returned from dynamic correction algorithm.
Algorithm will return error codes in lieu of data values; data will be passed back to the caller via out pointers. This allows for predictable and consistent error checking by the caller.
| RBRDynamicCorrectionError RBRDynamicCorrection_addMeasurement | ( | RBRDynamicCorrectionParams * | params, |
| const RBRDynamicCorrectionMeasurement * | measIn, | ||
| RBRDynamicCorrectionResult * | corrMeasOut | ||
| ) |
Feed a new measurement in the algorithm.
Return a corrected output (with proper time delay to align with all correction results)
| params | Parameters for dynamic correction algorithm |
| measIn | Input measurements for algorithm |
| corrMeasOut | Output corrected measurements (time aligned) |
| RBRDynamicCorrectionError RBRDynamicCorrection_init | ( | RBRDynamicCorrectionParams * | params, |
| float | Fs, | ||
| float | t_delay, | ||
| float | alpha_a, | ||
| float | alpha_e, | ||
| float | tau_a, | ||
| float | tau_e, | ||
| float | ctcoeff_a, | ||
| float | ctcoeff_e, | ||
| float | Vp_min, | ||
| float | Vp_max, | ||
| float | Vp_fc | ||
| ) |
Initialize the dynamic correction algorithm.
Initialize the algorithm for the given sampling rate.
| params | Parameters for dynamic correction algorithm |
| Fs | sampling rate (Samples/sec) |
| t_delay | default value DCORR_T_DELAY used as input |
| alpha_a | default value DCORR_ALPHA_A used as input |
| alpha_e | default value DCORR_ALPHA_E used as input |
| tau_a | default value DCORR_TAU_A used as input |
| tau_e | default value DCORR_TAU_E used as input |
| ctcoeff_a | default value DCORR_COEFF_A used as input |
| ctcoeff_e | default value DCORR_COEFF_E used as input |
| Vp_min | default value DCORR_VP_MIN used as input |
| Vp_max | default value DCORR_VP_MAX used as input |
| Vp_fc | default value DCORR_VP_FC used as input |
| RBRDynamicCorrectionError RBRDynamicCorrection_update_Fs | ( | RBRDynamicCorrectionParams * | params, |
| float | Fs | ||
| ) |
Change the sampling rate for the algorithm.
| params | Parameters for dynamic correction algorithm |
| Fs | sampling rate (Samples/sec) |
1.8.17