This commit is contained in:
2025-04-11 21:59:06 +03:00
parent 64c0637e6a
commit bac52d315b
12 changed files with 933 additions and 145 deletions

View File

@ -15,18 +15,24 @@ namespace DroneData {
public enum class DataType : unsigned short
{
None = 0, Head = 1,
DataIMU = 1001, DataPos = 1002,
DataMotor4 = 2001, DataMotor6 = 2002
None = 0, Head = 1,
// Output
DataAcc = 1001, DataGyr = 1002, DataMag = 1003, DataRange = 1004, DataLocal = 1005,
// Input
DataMotor4 = 2001, DataMotor6 = 2002
};
public value struct DataHead
{
public:
int Size;
long Size;
DataMode Mode;
DataType Type;
unsigned long Time;
static const int StrLen = sizeof(DataHead);
};
@ -36,30 +42,65 @@ namespace DroneData {
float X, Y, Z;
};
public value struct DataIMU
public value struct DataAcc
{
public:
DataHead Head;
XYZ Acc, Gyr, Mag;
XYZ Acc;
static const int StrLen = sizeof(DataIMU);
unsigned long Time;
static const int StrLen = sizeof(DataAcc);
};
public value struct DataPos
public value struct DataGyr
{
public:
DataHead Head;
XYZ Gyr;
unsigned long Time;
static const int StrLen = sizeof(DataGyr);
};
public value struct DataMag
{
public:
DataHead Head;
XYZ Mag;
unsigned long Time;
static const int StrLen = sizeof(DataMag);
};
public value struct DataRange
{
public:
DataHead Head;
XYZ Local;
float LiDAR;
static const int StrLen = sizeof(DataPos);
unsigned long Time;
static const int StrLen = sizeof(DataRange);
};
public value struct DataLocal
{
public:
DataHead Head;
XYZ Local;
unsigned long Time;
static const int StrLen = sizeof(DataLocal);
};
public value struct DataMotor4
{
public:
DataHead Head;
unsigned long long Count;
float UL, UR, DL, DR;
static const int StrLen = sizeof(DataMotor4);
@ -69,7 +110,6 @@ namespace DroneData {
{
public:
DataHead Head;
unsigned long long Count;
float UL, UR, LL, RR, DL, DR;
static const int StrLen = sizeof(DataMotor6);