如何解决卡在 Zumo 32U4 的偏航角方程上
我正在尝试从我的机器人(Zumo 32U4,使用 Arduino studio 进行编码)陀螺仪读取偏航,想知道是否有人可以帮助我弄清楚方程式的作用?我主要坚持为什么他们除以 1,000,000,但如果可以解释整个等式,我也将不胜感激。可以在 here 中找到有关函数的更多信息。
// Figure out how much time has passed since the last update.
static uint16_t lastUpdate = 0;
uint16_t m = micros(); //current microseconds
uint16_t dt = m - lastUpdate;
lastUpdate = m;
imu.readGyro(); //reads the gyro and puts measurements into imu.g.z (yaw)
// Calculate how much the angle has changed,in degrees,and
// add it to our estimation of the current angle. The gyro's
// sensitivity is 0.07 dps per digit.
angle += ((float)imu.g.z - gyroOffsetZ) * 70 * dt / 1000000000;
//gyroOffsetZ is the zero offset
这是我的第一篇文章,所以如果我做错了什么,请告诉我!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。