Description

The TrajectoryInfoStream command is used to enable or disable the streaming of the orientation trajectory information. The trajectory information includes pattern count, i.e., how many times a pre-recorded reference motion pattern has been repeated, as well as the real-time error (distance) in Yaw, Pitch, and Roll compared to the reference orientation trajectory. The trajectory information also includes how much of the track has been covered so far (0% to 100%). Whenever the full trajectory is covered, the pattern counter is increased by 1, and the progress percentage is reset to 0%. The reference motion pattern can be a workout exercise for example.

Protocol

This command uses the Command-Ack-Response-Data protocol.

Command

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x41 ( 0b010 / 0b00001 )
1 Payload Length uint8_t 1
2 CRC uint8_t Calculated
3 Command uint8_t 0x09

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Disable) or 0x01 (Enable)

Response

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x01 ( 0b000 / 0b00001 )
1 Payload Length uint8_t 4
2 CRC uint8_t Calculated
3 Command uint8_t 0x09

Payload

Byte Name C Type Value
4 - 5 Downsample uint16_t Varies
6 - 7 Rate uint16_t Varies

Data

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x61 ( 0b011 / 0b00001 )
1 Payload Length uint8_t 13
2 CRC uint8_t Calculated
3 Command uint8_t 0x09

Payload

Byte Name C Type Value
4 - 7 Timestamp uint32_t Varies
8 - 9 Yaw Error int16_t Varies
10 - 11 Pitch Error int16_t Varies
12 - 13 Roll Error int16_t Varies
14 - 15 Pattern Repeat Counter uint16_t Varies
16 Progress Percentage uint8_t Varies