forked from CPL/Simulator
update
This commit is contained in:
parent
21b60b7f4c
commit
6aeb99968e
@ -1,67 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace DroneData
|
|
||||||
{
|
|
||||||
public enum DataMode : ushort
|
|
||||||
{
|
|
||||||
None = 0, Response = 1, Request = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
public enum DataType : ushort
|
|
||||||
{
|
|
||||||
None = 0, Head = 1,
|
|
||||||
|
|
||||||
// Output
|
|
||||||
DataIMU = 1001, DataPos = 1002,
|
|
||||||
|
|
||||||
// Input
|
|
||||||
DataMotor4 = 2001, DataMotor6 = 2002
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataHead
|
|
||||||
{
|
|
||||||
public int Size;
|
|
||||||
|
|
||||||
public DataMode Mode;
|
|
||||||
public DataType Type;
|
|
||||||
|
|
||||||
static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataHead));
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct XYZ { public float X, Y, Z; }
|
|
||||||
|
|
||||||
public struct DataIMU
|
|
||||||
{
|
|
||||||
public DataHead Head;
|
|
||||||
public XYZ Acc, Gyr, Mag;
|
|
||||||
|
|
||||||
static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataIMU));
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct DataPos
|
|
||||||
{
|
|
||||||
public DataHead Head;
|
|
||||||
public XYZ Local; // Ëîêàëüíûå êîîðäèíàòû
|
|
||||||
public float LiDAR; // Äàò÷èê ïîñàäêè
|
|
||||||
|
|
||||||
static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataPos));
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct DataMotor4
|
|
||||||
{
|
|
||||||
public DataHead Head;
|
|
||||||
public ulong Count;
|
|
||||||
public float UL, UR, DL, DR;
|
|
||||||
|
|
||||||
static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataMotor4));
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct DataMotor6
|
|
||||||
{
|
|
||||||
public DataHead Head;
|
|
||||||
public ulong Count;
|
|
||||||
public float UL, UR, LL, RR, DL, DR;
|
|
||||||
|
|
||||||
static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataMotor6));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
namespace DroneData
|
|
||||||
{
|
|
||||||
enum class StructType : unsigned long
|
|
||||||
{
|
|
||||||
// Output
|
|
||||||
DataIMU = 1, DataPos = 2,
|
|
||||||
|
|
||||||
// Input
|
|
||||||
DataMotor4 = 1001, DataMotor6 = 1002
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataInfo
|
|
||||||
{
|
|
||||||
StructType Type;
|
|
||||||
unsigned long Size;
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataXYZ { float X, Y, Z; };
|
|
||||||
|
|
||||||
public struct DataIMU
|
|
||||||
{
|
|
||||||
DataXYZ Acc, Gyr, Mag;
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataPos
|
|
||||||
{
|
|
||||||
DataXYZ Local; // Ëîêàëüíûå êîîðäèíàòû
|
|
||||||
float LiDAR; // Äàò÷èê ïîñàäêè
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataMotor4
|
|
||||||
{
|
|
||||||
ulong Count;
|
|
||||||
float M1, M2, M3, M4;
|
|
||||||
};
|
|
||||||
|
|
||||||
public struct DataMotor6
|
|
||||||
{
|
|
||||||
ulong Count;
|
|
||||||
float M1, M2, M3, M4, M5, M6;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user