Description

The MotionIntensityTrendStream command is used to enable or disable the streaming of the motion intensity trend. In the command mode, the user has to define the Update Time in seconds (say X), meaning that every X seconds, a data packet will be generated by Neblina summarizing the motion intensity trend over the past X seconds. The motion intensity trend data packet, streamed from Neblina, contains the following information:

Maximum Intensity is the maximum acceleration magnitude over the past X seconds. The range of the maximum intensity is equal to the range of the accelerometer. Mean Intensity is the average acceleration magnitude over the past X seconds. The range of the mean intensity is equal to the range of the accelerometer. Intensity Index is the time index in seconds corresponding to the occurence of the maximum intensity over the past X seconds. The Index value lies between 1 and X. For instance, if over the past X seconds from the current timestamp of T, the peak intensity occurs 2 seconds before T, then the returned Index value will be X-2. One can find the timestamp associated with the peak intensity occurence as (T - X + Index)

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 3
2 CRC uint8_t Calculated
3 Command uint8_t 0x26

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Disable) or 0x01 (Enable)
5 - 6 Update time (in seconds) uint16_t Varies

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 0x26

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 9
2 CRC uint8_t Calculated
3 Command uint8_t 0x26

Payload

Byte Name C Type Value
4 - 7 Timestamp uint32_t Varies
8 - 9 Intensity Max uint16_t Varies
10 - 11 Intensity Mean uint16_t Varies
12 Intensity Index uint8_t Varies