Skip to content

Commit

Permalink
Changed return status of GaussNewton_Sens_Cal
Browse files Browse the repository at this point in the history
  • Loading branch information
Tellicious committed Feb 17, 2024
1 parent 7c46d0f commit 431b704
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/releaseBody.md
Original file line number Diff line number Diff line change
@@ -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)
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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:**
Expand Down
4 changes: 2 additions & 2 deletions inc/numMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/numMethods.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--------------- */
Expand Down Expand Up @@ -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)---------------------- */
Expand Down

0 comments on commit 431b704

Please sign in to comment.