216 static inline void ONECALIB_CalculateDiff(
void);
217 static inline void ONECALIB_AngleUncalibDiffCalculate(
void);
222 static inline void ONECALIB_CalibCalculateOrtho(
CALIB_DATA_t *calib_param);
275 sample_store->
X45 = 0.00;
276 sample_store->
X135 = 0.00;
278 sample_store->
Y45 = 0.00;
279 sample_store->
Y135 = 0.00;
322 static inline void ONECALIB_CalculateDiff(
void) {
333 static inline void ONECALIB_AngleUncalibDiffCalculate(
void) {
359 return (atan2(ortho_Y, corr_X));
376 ONECALIB_CalculateDiff();
379 angle = (ONECALIB_ONECALIBDiffCalculate(calib_param)) *
RAD2DEGFACTOR;
382 ONECALIB_AngleUncalibDiffCalculate();
398 ONECALIB_CalculateDiff();
399 ONECALIB_AngleUncalibDiffCalculate();
415 ONECALIB_CalculateDiff();
416 return (ONECALIB_ONECALIBDiffCalculate(calib_param)) *
RAD2DEGFACTOR;
473 ONECALIB_CalculateDiff();
474 ONECALIB_AngleUncalibDiffCalculate();
479 ONECALIB_CalculateDiff();
480 ONECALIB_AngleUncalibDiffCalculate();
489 ONECALIB_CalibCalculateOrtho(calib_param);
507 ONECALIB_CalibFindMinMax(rotation_data_store);
535 ONECALIB_CalibCalculateOneDirection(rotation_data_store);
623 static inline void ONECALIB_CalibCalculateOrtho(
CALIB_DATA_t *calib_param) {
float64_t ONECALIB_GetUncalibAngle(void)
Calculates the uncalibrated angle.
ROTATION_DATA_STORE_t rotation_data_CCW
void ONECALIB_CalibrationFindParam(CALIB_DATA_t *calib_param, bool rotate_CW, bool rotate_CCW)
This function is used to extract the calibration parameters. It should called until calib_param...
float64_t ONECALIB_GetAngle(const CALIB_DATA_t *calib_param)
Calculates the calibrated angle if calibration has been performed, else the uncalibrated angle...
float64_t mean_amplitudeY
float64_t ONECALIB_GetCalibAngle(const CALIB_DATA_t *calib_param)
Calculates the calibrated angle.
void ONECALIB_InitSensorData(uint32_t sinP_in_LSB, uint32_t cosP_in_LSB, uint32_t sinN_in_LSB, uint32_t cosN_in_LSB)
Function used for ANALOG_SENSOR_DATA_t data assignment.
ROTATION_DATA_STORE_t rotation_data_CW
float64_t mean_amplitudeX
void ONECALIB_InitCalibData(CALIB_DATA_t *calib_param)
Function used for CALIB_DATA_t data initialization. The pointer of type CALIB_DATA_t will be used to ...
bool full_calibration_performed
float64_t uncalibratedAngle