Hi, all
I am learning the uavtalk protocol, but I can not understand the "Data" field, could you help me please?
For example, the message of "mag sensor" as followed, there are 26 bytes in the "Data" filed:
*******************************************************
--- Mag Sensor Structure ---
Sync(1): 3c
MsgType(1): 22
Length(2): 26
ObjID(4): 70dad456
InstID(2): 0
Data(26): 00 00 39 c3 00 00 c8 42 00 00 55 43 00 00 00 00 2c 23 0d 3f b9 1f 23 40 ca 6b
Crc(1): 46
*******************************************************
--- Mag Sensor Structure ---
Sync(1): 3c
MsgType(1): 22
Length(2): 26
ObjID(4): 70dad456
InstID(2): 0
Data(26): 00 00 35 c3 00 00 e0 42 00 00 5b 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Crc(1): 35
But in the soure code file "magsensor.h", I found the different data structure definition, it has 16 bytes only:
typedef struct {
float x;
float y;
float z;
float temperature;
} __attribute__((packed)) MagSensorDataPacked;
Then, I noticed that there may be eight bytes of metadata in this message, but 16 plus 8 equals 24, it is also two bytes less...
Also, I do not know which is the mag of data bytes, which bytes of data are mata...
Could give me some suggestion please? Looking forward to your reply.
Best Regards!