MTi姿态传感器学习篇
MTI测试与通信
1检查通信是否正常
上电,发送命令之前自动输出数据
消息结构:
PRE |
BID |
MID |
LEN |
DATA |
CS |
上电立即发送FA FF 30 00 D1进入config模式,
收到消息FA FF 31 00 D0
第二条命令(20 30指数据类型,01 20指频率)
SETOUPUTCONFIGRATION:
FA FF C0 04 20 30 01 20 CC
MTI回复:
FA FF C1 04 20 30 01 20 CC
GOTOMEASUREMENT:
FA FF 10 00 F1
消息以MTData2 输出
校验位的算法(参考【LLCP】)
Checksum
This field is used for communication error-detection. If all message bytes excluding the preamble are
summed and the lower byte value of the result equals zero, the message is valid and it may be
processed. The checksum value of the message should be included in the summation.
2 设置MT模式
在MTmanager中,通过命令设置其模式,然后在
中保存设置,即可得到MTData2的消息形式“FA FF 36 ......”
3 MT读数方式
通过串口得到数据
其中,20 30是数据类型,0C是数据长度,后面分别三个一组为ROLL,PITCH,YAW的数据,最后一位为校验位