diff --git a/.github/releaseBody.md b/.github/releaseBody.md index 37f85e0..90c99b8 100644 --- a/.github/releaseBody.md +++ b/.github/releaseBody.md @@ -1,6 +1,6 @@ -## Improved robustness of `quaternionNorm` +## Changed return status of `GaussNewton_Sens_Cal` **Improvements:** -- Improved robustness of `quaternionNorm`, including check on infinite and nan +- Changed return status of `GaussNewton_Sens_Cal` so that now it returns `UTILS_STATUS_TIMEOUT` when the maximum number of iterations is reached See [Changelog](Changelog.md) \ No newline at end of file diff --git a/Changelog.md b/Changelog.md index df91fc4..0966337 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,12 @@ # Changelog +## v1.7.2 + +**Improvements:** +- Changed return status of `GaussNewton_Sens_Cal` so that now it returns `UTILS_STATUS_TIMEOUT` when the maximum number of iterations is reached + +# Changelog + ## v1.7.1 **Improvements:** diff --git a/inc/numMethods.h b/inc/numMethods.h index a54a2b5..9fb3af2 100644 --- a/inc/numMethods.h +++ b/inc/numMethods.h @@ -181,7 +181,7 @@ void QuadProd(matrix_t* A, matrix_t* B, matrix_t* result); * \param[in] tol: stopping tolerance (1e-6 is generally fine) * \param[out] result: pointer to result matrix object S * - * \return UTILS_STATUS_SUCCESS if success, UTILS_STATUS_ERROR if errors + * \return UTILS_STATUS_SUCCESS if success, UTILS_STATUS_TIMEOUT if nmax is reached, UTILS_STATUS_ERROR if errors */ utilsStatus_t GaussNewton_Sens_Cal_9(matrix_t* Data, float k, matrix_t* X0, uint16_t nmax, float tol, matrix_t* result); @@ -203,7 +203,7 @@ utilsStatus_t GaussNewton_Sens_Cal_9(matrix_t* Data, float k, matrix_t* X0, uint * \param[in] tol: stopping tolerance (1e-6 is generally fine) * \param[out] result: pointer to result matrix object S * - * \return UTILS_STATUS_SUCCESS if success, UTILS_STATUS_ERROR if errors + * \return UTILS_STATUS_SUCCESS if success, UTILS_STATUS_TIMEOUT if nmax is reached, UTILS_STATUS_ERROR if errors */ utilsStatus_t GaussNewton_Sens_Cal_6(matrix_t* Data, float k, matrix_t* X0, uint16_t nmax, float tol, matrix_t* result); diff --git a/src/numMethods.c b/src/numMethods.c index 5196efd..b1ee962 100644 --- a/src/numMethods.c +++ b/src/numMethods.c @@ -427,7 +427,7 @@ utilsStatus_t GaussNewton_Sens_Cal_9(matrix_t* Data, float k, matrix_t* X0, uint matrixDelete(&res); matrixDelete(&delta); matrixDelete(&tmp1); - return UTILS_STATUS_SUCCESS; + return UTILS_STATUS_TIMEOUT; } /* ------------Gauss-Newton sensors calibration with 6 parameters--------------- */ @@ -494,7 +494,7 @@ utilsStatus_t GaussNewton_Sens_Cal_6(matrix_t* Data, float k, matrix_t* X0, uint matrixDelete(&res); matrixDelete(&delta); matrixDelete(&tmp1); - return UTILS_STATUS_SUCCESS; + return UTILS_STATUS_TIMEOUT; } /* ------------------Quadratic form (sort of)---------------------- */