智能车制作
标题:
清华方案的疑问:GRAVITY_ADJUST_TIME_CONSTANT和GYROSCOPE_ANGLE_SIGMA_FREQUENCY
[打印本页]
作者:
caofeng
时间:
2015-4-29 21:50
标题:
清华方案的疑问:GRAVITY_ADJUST_TIME_CONSTANT和GYROSCOPE_ANGLE_SIGMA_FREQUENCY
清华方案的疑问:角度计算函数中的GRAVITY_ADJUST_TIME_CONSTANT和GYROSCOPE_ANGLE_SIGMA_FREQUENCY是怎么求得??请大神指点
void AngleCalculate(void) {
float fDeltaValue;
g_fGravityAngle = (VOLTAGE_GRAVITY - GRAVITY_OFFSET) *
GRAVITY_ANGLE_RATIO;
// g_fGravityAngle = 0;
g_fGyroscopeAngleSpeed = (VOLTAGE_GYRO - GYROSCOPE_OFFSET) *
GYROSCOPE_ANGLE_RATIO;
g_fCarAngle = g_fGyroscopeAngleIntegral;
fDeltaValue = (g_fGravityAngle - g_fCarAngle) /
GRAVITY_ADJUST_TIME_CONSTANT;
g_fGyroscopeAngleIntegral += (g_fGyroscopeAngleSpeed + fDeltaValue) /
GYROSCOPE_ANGLE_SIGMA_FREQUENCY;
}
欢迎光临 智能车制作 (http://dns.znczz.com/)
Powered by Discuz! X3.2