硬件


USB接口姿态仪/水平仪

产品特点:

● 六轴/九轴动态姿态传感器
● MEMS传感器+MahonyAHRS+卡尔曼滤波算法
● USB串口接口

软件

串口通讯常见问题
C语言编程常见问题

串口指令:

测量指令:
=>measure --help
usage: measure [-c ] [-i ] [-v ] [-V ]
options:
 -c/--cmd        info|start|stop|reg|kf|temp|rate|acc|gyo|mag|all|cal[_(a|g|m)]|mon
 -i/--idx        index param
 -v/--val        value param
 -V/--fval       float value param
=> 

示例:

打印当前测量值:
=>m
2.14 30.35 -18.29
=>
分别为横滚/俯仰/偏航角

Shell Lab 测试台软件


USB虚拟串口驱动(Windows)


应用

在Shell Lab软件中监测
# runs in ShellLab Testbench Application
s = ShellLabSensorTilt(PORT)
s.measureStart()
s.measure('kf',value=1)  # kalman filter enable

p = getPlotPanel()
p.addPlot( 'roll', 311, label_y='roll' )
p.addPlot( 'pitch', 312, label_y='pitch' )
p.addPlot( 'yaw', 313, label_y='yaw' )

while True:
    roll, pitch, yaw = s.getAngle()
    p.addData( 'roll', roll )
    p.addData( 'pitch', pitch )
    p.addData( 'yaw', yaw )
    msg = 'roll=%.2f pitch=%.2f yaw=%.2f'% (roll, pitch, yaw)
    logAdd(msg,'raw')
    info(msg)


加速度校准补偿

角速度零位校准补偿

磁场校准补偿