GeekIMU/4.Software/GeekIMU Manager GUI 1.2/GeekIMUDriver 1.2/Src/SensorImpl.h

57 lines
969 B
C
Raw Normal View History

2024-11-09 21:39:20 +08:00
#ifndef _SENSORIMPL_H_
#define _SENSORIMPL_H_
#include "quaternion.h"
#ifdef __cplusplus
extern "C"{
Quaternion GetPoseQuat(void);
void UnpackSensor(const UCHAR* buffer, long* x, long* y, long* z);
void GetControllerSensor(unsigned char usb_input_buffer[]);
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȡƫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Yaw
*/
float DM_GetYaw(void);
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Pitch
*/
float DM_GetPitch(void);
/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Roll
*/
float DM_GetRoll(void);
float invSqrt(float x) ;
void ResetAHRS();
void AHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz,char useMag,int Dtime);
Vector3 GetMagData();
int ResetHeading(void);
}
#else
void UnpackSensor(const UCHAR* buffer, long* x, long* y, long* z);
void GetControllerSensor(unsigned char usb_input_buffer[]);
__declspec(dllexport) float GetLocX(void);
__declspec(dllexport) float GetLocY(void);
__declspec(dllexport) float GetLocZ(void);
#endif
#endif