# MSG_DCM_ORIEN
MSG_DCM_ORIEN | |||||
---|---|---|---|---|---|
Packet ID | 0x65 | ||||
Length | 36 | ||||
Read / Write | Read | ||||
Offset | Size | Format | Field | Unit | Description |
0 | 4 | float32_t | DCM[0][0] | 方向余弦矩阵 | |
4 | 4 | float32_t | DCM[0][1] | 方向余弦矩阵 | |
8 | 4 | float32_t | DCM[0][2] | 方向余弦矩阵 | |
12 | 4 | float32_t | DCM[1][0] | 方向余弦矩阵 | |
16 | 4 | float32_t | DCM[1][1] | 方向余弦矩阵 | |
20 | 4 | float32_t | DCM[1][2] | 方向余弦矩阵 | |
24 | 4 | float32_t | DCM[2][0] | 方向余弦矩阵 | |
28 | 4 | float32_t | DCM[2][1] | 方向余弦矩阵 | |
32 | 4 | float32_t | DCM[2][2] | 方向余弦矩阵 |
DCM公式如下:
DCM[0][0] = cos(heading) * cos(pitch)
DCM[0][1] = sin(heading) * cos(pitch)
DCM[0][2] = -sin(pitch)
DCM[1][0] = -sin(heading) * cos(roll) + cos(heading) * sin(pitch) * sin(roll)
DCM[1][1] = cos(heading) * cos(roll) + sin(heading) * sin(pitch) * sin(roll)
DCM[1][2] = cos(pitch) * sin(roll)
DCM[2][0] = sin(heading) * sin(roll) + cos(heading) * sin(pitch) * cos(roll)
DCM[2][1] = -cos(heading) * sin(roll) + sin(heading) * sin(pitch) * cos(roll)
DCM[2][2] = cos(pitch) * cos(roll)