在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)
加速度校准补偿
角速度零位校准补偿
磁场校准补偿
|