From 61389ad6165c4855240770ab82c0e476d7c194fd Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Tue, 30 Mar 2021 18:30:30 +0200 Subject: [PATCH] libdsp: update some comments --- libs/libdsp/Kconfig | 5 +++-- libs/libdsp/lib_misc.c | 12 +++++------- libs/libdsp/lib_misc_b16.c | 12 +++++------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/libs/libdsp/Kconfig b/libs/libdsp/Kconfig index 39e1e0fc0a..65bdaae86f 100644 --- a/libs/libdsp/Kconfig +++ b/libs/libdsp/Kconfig @@ -26,8 +26,9 @@ config LIBDSP_PRECISION ---help--- With this option we can select libdsp precision for some of calculations. There are 3 available options: - 0 - the fastest calculation but the lowest precision - 1 - a little better precision than above, but slowest + 0 - the fastest calculation but the lowest precision, + 1 - increased precision than for option 0 at the expense + of a longer execution time, 2 - the most accuracte but the slowest one, use standard math functions. config LIBDSP_FOC_VABC diff --git a/libs/libdsp/lib_misc.c b/libs/libdsp/lib_misc.c index a931635da0..402113b17e 100644 --- a/libs/libdsp/lib_misc.c +++ b/libs/libdsp/lib_misc.c @@ -169,8 +169,6 @@ void dq_saturate(FAR dq_frame_f32_t *dq, float max) * Description: * Fast sin calculation * - * Reference: http://lab.polygonal.de/?p=205 - * * Input Parameters: * angle - (in) * @@ -228,12 +226,11 @@ float fast_cos(float angle) * Name: fast_sin2 * * Description: - * Fast sin calculation with better accuracy - * - * Reference: http://lab.polygonal.de/?p=205 + * Fast sin calculation with better accuracy (quadratic curve + * approximation) * * Input Parameters: - * angle + * angle - (in) * * Returned Value: * Return estimated sine value @@ -287,7 +284,8 @@ float fast_sin2(float angle) * Name:fast_cos2 * * Description: - * Fast cos calculation with better accuracy + * Fast cos calculation with better accuracy (quadratic curve + * approximation) * * Input Parameters: * angle - (in) diff --git a/libs/libdsp/lib_misc_b16.c b/libs/libdsp/lib_misc_b16.c index 66be946735..c2e8911db0 100644 --- a/libs/libdsp/lib_misc_b16.c +++ b/libs/libdsp/lib_misc_b16.c @@ -196,8 +196,6 @@ void dq_saturate_b16(FAR dq_frame_b16_t *dq, b16_t max) * Description: * Fast sin calculation * - * Reference: http://lab.polygonal.de/?p=205 - * * Input Parameters: * angle - (in) * @@ -261,12 +259,11 @@ b16_t fast_cos_b16(b16_t angle) * Name: fast_sin2_b16 * * Description: - * Fast sin calculation with better accuracy - * - * Reference: http://lab.polygonal.de/?p=205 + * Fast sin calculation with better accuracy (quadratic curve + * approximation) * * Input Parameters: - * angle + * angle - (in) * * Returned Value: * Return estimated sine value @@ -282,7 +279,8 @@ b16_t fast_sin2_b16(b16_t angle) * Name:fast_cos2_b16 * * Description: - * Fast cos calculation with better accuracy + * Fast cos calculation with better accuracy (quadratic curve + * approximation) * * Input Parameters: * angle - (in)