![]() |
no-OS
|
POWRMS data processing source file for POWRMS project. More...
Functions | |
| void | update_values_of_digit (struct powrms_variables *input_var, uint8_t increment_pos) |
| Update the value of a specific digit in the input variable. | |
| void | update_values_from_new_value (struct powrms_variables *input_var, double new_value) |
| Update the digits array based on a new value. | |
| void | sync_all_digits_from_values (void) |
| Synchronize all input variables' digits arrays with their current values. | |
| int | _calc_interpolating_values (double *x_values, double *y_values, double *x_values_rev, double *y_values_rev, uint8_t freq_index, uint32_t local_frequency_MHz, float *position) |
| int | _calc_temp_coefficients (float *temp_coeffs, uint8_t freq_index) |
| int32_t | _cubic_function (float v_tmp, float a1, float a2, float a3) |
| double | _Lagrange_interpolaiton (double *x_values, double *y_values, uint8_t points_number, double x_input) |
| double | _correct_newtone (double newtone_meas, int32_t freq_MHz) |
| double | _correct_newtone_3rd_order (double newtone_meas, int32_t freq_MHz, bool reverse) |
| int | calculate_power () |
POWRMS data processing source file for POWRMS project.
Copyright 2025(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| int _calc_interpolating_values | ( | double * | x_values, |
| double * | y_values, | ||
| double * | x_values_rev, | ||
| double * | y_values_rev, | ||
| uint8_t | freq_index, | ||
| uint32_t | local_frequency_MHz, | ||
| float * | position ) |
| int _calc_temp_coefficients | ( | float * | temp_coeffs, |
| uint8_t | freq_index ) |
| double _correct_newtone | ( | double | newtone_meas, |
| int32_t | freq_MHz ) |
| double _correct_newtone_3rd_order | ( | double | newtone_meas, |
| int32_t | freq_MHz, | ||
| bool | reverse ) |
| int32_t _cubic_function | ( | float | v_tmp, |
| float | a1, | ||
| float | a2, | ||
| float | a3 ) |
| double _Lagrange_interpolaiton | ( | double * | x_values, |
| double * | y_values, | ||
| uint8_t | points_number, | ||
| double | x_input ) |
| int calculate_power | ( | ) |
| void sync_all_digits_from_values | ( | void | ) |
Synchronize all input variables' digits arrays with their current values.
This function updates the digits array for all input variables based on their current value field. Useful after loading values from EEPROM or other external sources that modify the value but not the digits.
| void update_values_from_new_value | ( | struct powrms_variables * | input_var, |
| double | new_value ) |
Update the digits array based on a new value.
| input_var | Pointer to the variable structure to update |
| new_value | The new value to set (will be clamped to valid range) |
| void update_values_of_digit | ( | struct powrms_variables * | input_var, |
| uint8_t | increment_pos ) |
Update the value of a specific digit in the input variable.
Update the value of an input variable based on digit increment.
| volatile struct adc_data adc_data_input |
| uint32_t frequency_MHz_ranges[FREQUENCY_RANGE_NR] |
| struct powrms_variables input_variables[VARIABLE_NUMBER] |
| double poly_5000MHz_c_f = 0 |
| double poly_5000MHz_c_f2 = 0 |
| double poly_5000MHz_c_f2_reverse = 0 |
| double poly_5000MHz_c_f3 = 0 |
| double poly_5000MHz_c_f3_reverse = 0 |
| double poly_5000MHz_c_f_reverse = 0 |
| double poly_5000MHz_c_x = 0 |
| double poly_5000MHz_c_x2 = 0 |
| double poly_5000MHz_c_x2_reverse = 0 |
| double poly_5000MHz_c_x2f = 0 |
| double poly_5000MHz_c_x2f_reverse = 0 |
| double poly_5000MHz_c_x3 = 0 |
| double poly_5000MHz_c_x3_reverse = 0 |
| double poly_5000MHz_c_x_reverse = 0 |
| double poly_5000MHz_c_xf = 0 |
| double poly_5000MHz_c_xf2 = 0 |
| double poly_5000MHz_c_xf2_reverse = 0 |
| double poly_5000MHz_c_xf_reverse = 0 |
| double poly_5000MHz_intercept = 0 |
| double poly_5000MHz_intercept_reverse = 0 |
| int32_t precision_values[PRECISION_ARRAY_SIZE] |
| int32_t precision_values_reverse[PRECISION_ARRAY_SIZE] |
| int32_t temperature_compensation_value |
| double temperature_precision_values[TEMPERATURE_CORRECTION_COEFFS * FREQUENCY_RANGE_NR] |
| int32_t use_eeprom_calibration_data = 0 |