您的位置:首页 > 房产 > 家装 > 微信怎么创建微信公众号_seo服务公司排名_域名查询工具_天津seo优化

微信怎么创建微信公众号_seo服务公司排名_域名查询工具_天津seo优化

2025/5/4 11:37:46 来源:https://blog.csdn.net/MOS_JBET/article/details/147089075  浏览:    关键词:微信怎么创建微信公众号_seo服务公司排名_域名查询工具_天津seo优化
微信怎么创建微信公众号_seo服务公司排名_域名查询工具_天津seo优化

01 理论原理

见arm_cos_f32.c 代码分析文章Odrive0.5.1-FOC电机控制 arm_cos_f32.cpp arm_sin_f32.cpp代码实现(一)-CSDN博客

02 float32_t our_arm_sin_f32(float32_t x)

float32_t our_arm_sin_f32(float32_t x)
{float32_t sinVal, fract, in;                           /* Temporary variables for input, output */uint16_t index;                                        /* Index variable */float32_t a, b;                                        /* Two nearest output values */int32_t n;float32_t findex;/* input x is in radians *//* Scale the input to [0 1] range from [0 2*PI] , divide input by 2*pi */in = x * 0.159154943092f;/* Calculation of floor value of input */n = (int32_t) in;/* Make negative values towards -infinity */if (x < 0.0f){n--;}/* Map input value to [0 1] */in = in - (float32_t) n;/* Calculation of index of the table */findex = (float32_t)FAST_MATH_TABLE_SIZE * in;index = (uint16_t)findex;/* when "in" is exactly 1, we need to rotate the index down to 0 */if (index >= FAST_MATH_TABLE_SIZE) {index = 0;findex -= (float32_t)FAST_MATH_TABLE_SIZE;}/* fractional value calculation */fract = findex - (float32_t) index;/* Read two nearest values of input value from the sin table */a = sinTable_f32[index];b = sinTable_f32[index+1];/* Linear interpolation process */sinVal = (1.0f-fract)*a + fract*b;/* Return the output value */return (sinVal);
}/*** @} end of sin group*/

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com