PDR/1.Software/PDR 1.05/include/AHRS.h

49 lines
1.5 KiB
C
Raw Permalink Normal View History

2022-10-17 20:33:46 +08:00
#ifndef _PDR_AHRS_H_
#define _PDR_AHRS_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Header File Including ------------------------------------------------------------------------ */
#include "pdr_sensor.h"
/* Macro Declaration ---------------------------------------------------------------------------- */
#define AHRS_SAMPLE_FREQ 100 // ARHS<48><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
#define IMU_SAMPLING_FREQUENCY 100
#define AHRS_KP 0.500
#define AHRS_TYPE_GYRO 4
#define AHRS_TYPE_ACCE 1
#define AHRS_TYPE_MAGN 2
#define AHRS_STATUS_RESET_PHASE_0 0x80
#define AHRS_STATUS_RESET_PHASE_1 0x40
#define AHRS_STATUS_RESET (AHRS_STATUS_RESET_PHASE_0|AHRS_STATUS_RESET_PHASE_1)
#define AHRS_STATUS_STABLE 0x20
/* Struct Declaration --------------------------------------------------------------------------- */
/* Function Declaration ------------------------------------------------------------------------- */
void AHRS_Init(void);
void ResetARHS(void);
/**---------------------------------------------------------------------
* Function : fv3Norm
* Description : <EFBFBD><EFBFBD>ά<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>
* Date : 2021/01/26 yuanlin@vivocom &&
*
*
*---------------------------------------------------------------------**/
void fv3Norm(float* vx, float* vy, float* vz);
int UpdateAHRS(IMU_t* imu);
#ifdef __cplusplus
}
#endif
#endif // for __AHRS_H