From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- docs/DSP/html/group__SinCos.html | 241 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 docs/DSP/html/group__SinCos.html (limited to 'docs/DSP/html/group__SinCos.html') diff --git a/docs/DSP/html/group__SinCos.html b/docs/DSP/html/group__SinCos.html new file mode 100644 index 0000000..d4f812c --- /dev/null +++ b/docs/DSP/html/group__SinCos.html @@ -0,0 +1,241 @@ + + + + + +Sine Cosine +CMSIS-DSP: Sine Cosine + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-DSP +  Version 1.5.2 +
+
CMSIS DSP Software Library
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + +

+Functions

void arm_sin_cos_f32 (float32_t theta, float32_t *pSinVal, float32_t *pCosVal)
 Floating-point sin_cos function. More...
 
void arm_sin_cos_q31 (q31_t theta, q31_t *pSinVal, q31_t *pCosVal)
 Q31 sin_cos function. More...
 
+

Description

+

Computes the trigonometric sine and cosine values using a combination of table lookup and linear interpolation. There are separate functions for Q31 and floating-point data types. The input to the floating-point version is in degrees while the fixed-point Q31 have a scaled input with the range [-1 0.9999] mapping to [-180 +180] degrees.

+

The floating point function also allows values that are out of the usual range. When this happens, the function will take extra time to adjust the input value to the range of [-180 180].

+

The result is accurate to 5 digits after the decimal point.

+

The implementation is based on table lookup using 360 values together with linear interpolation. The steps used are:

+
    +
  1. Calculation of the nearest integer table index.
  2. +
  3. Compute the fractional portion (fract) of the input.
  4. +
  5. Fetch the value corresponding to index from sine table to y0 and also value from index+1 to y1.
  6. +
  7. Sine value is computed as *psinVal = y0 + (fract * (y1 - y0)).
  8. +
  9. Fetch the value corresponding to index from cosine table to y0 and also value from index+1 to y1.
  10. +
  11. Cosine value is computed as *pcosVal = y0 + (fract * (y1 - y0)).
  12. +
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void arm_sin_cos_f32 (float32_t theta,
float32_tpSinVal,
float32_tpCosVal 
)
+
+
Parameters
+ + + + +
[in]thetainput value in degrees
[out]*pSinValpoints to the processed sine output.
[out]*pCosValpoints to the processed cos output.
+
+
+
Returns
none.
+ +

References FAST_MATH_TABLE_SIZE, and sinTable_f32.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void arm_sin_cos_q31 (q31_t theta,
q31_tpSinVal,
q31_tpCosVal 
)
+
+
Parameters
+ + + + +
[in]thetascaled input value in degrees
[out]*pSinValpoints to the processed sine output.
[out]*pCosValpoints to the processed cosine output.
+
+
+
Returns
none.
+

The Q31 input value is in the range [-1 0.999999] and is mapped to a degree value in the range [-180 179].

+ +

References clip_q63_to_q31(), CONTROLLER_Q31_SHIFT, and sinTable_q31.

+ +
+
+
+
+ + + + -- cgit