Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
sensor::imu::msp Namespace Reference

Multiwii Serial Protocal Interface. More...

Classes

struct  MspIdent
 Board identity structure. More...
 

Variables

static const char *const MspPreamble = "$M"
 message preamble
 
static const char *const MspDirTo = "<"
 to imu
 
static const char *const MspDirFrom = ">"
 from imu
 
static const char *const MspCmdPreamble = "$M<"
 command preamble
 
static const char *const MspRspPreamble = "$M>"
 response preamble
 
static const int MspFieldPosDir = 3
 dir field position
 
static const int MspFieldPosSize = 3
 data size field position
 
static const int MspFieldPosCmdId = 4
 command id field position
 
static const int MspFieldPosDataStart = 5
 data start field position
 
static const int MspCmdHdrLen = 5
 command header len
 
static const int MspCmdMinLen = 6
 MspCmdHdrLen+1 command min len.
 
static const int MspCmdMaxLen = 32
 response max len
 
static const int MspRspHdrLen = 5
 response header len
 
static const int MspRspMinLen = 6
 MspRspHdrLen+1 response min len.
 
static const int MspRspMaxLen = 32
 response max len
 
static const uint_t MspCmdIdIdent = 100
 read board/sensor idents
 
static const uint_t MspCmdIdRawImu = 102
 read raw imu data
 
static const uint_t MspCmdIdAttitude = 108
 read raw attitude data
 
static const double MspGToMPerSec2 = 9.80665
 standard g in m/s^2
 
static const double MspMpu6050RawToG = 1.0 / 512.0
 MPU-6050 acceleration raw value to g's.
 
static const double MspMpu6050RawToDegPerSec = 1.0 / 4.096
 MPU-6050 rotation raw value to degrees/second.
 
static const double MspAttitudeRawToDeg = 0.1
 board computed attitude raw value to degreess
 

Detailed Description

Multiwii Serial Protocal Interface.

Several IMU boards use the MSP interface.

Command: <preamble>MspDirTo<size><cmdid>[<data>]<crc>

Response: <preamble>MspDirFrom<size><cmdid>[<data>]<crc>