PDR/1.Software/PDR 1.04/include/pdr_api.h

152 lines
5.5 KiB
C
Raw Normal View History

2022-10-07 23:49:43 +08:00
/******************** (C) COPYRIGHT 2020 Geek************************************
* File Name : pdr_api.h
* Department : Sensor Algorithm Team
* Current Version : V2.0(compare QCOM SAP 5.0)
* Author : logzhan
* Date of Issued : 2021.01.26
* Comments : PDR <EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>ӿ<EFBFBD>
********************************************************************************/
#ifndef _PDR_API_H_
#define _PDR_API_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Header File Including -----------------------------------------------------*/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "pdr_sensor.h"
2024-12-06 21:30:26 +08:00
#include "PDRBase.h"
2022-10-07 23:49:43 +08:00
#include "Utils.h"
/* Macro Definition ----------------------------------------------------------*/
#define IMU_LAST_COUNT 10
typedef struct _PosFusion{
double lat;
double lon;
double gpsLat;
double gpsLon;
double t;
int vaild;
}PosFusion;
/* Function Declaration ------------------------------------------------------*/
/**---------------------------------------------------------------------
* Function : Algorithm_Init
2022-10-07 23:49:43 +08:00
* Description : PDR<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PDR<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵij<EFBFBD>ʼ<EFBFBD><EFBFBD>
* Date : 2022/10/15 logzhan
2022-10-07 23:49:43 +08:00
*---------------------------------------------------------------------**/
void Algorithm_Init(void);
/**---------------------------------------------------------------------
* Function : PDRLocationMainLoop
2022-10-07 23:49:43 +08:00
* Description : PDR<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵij<EFBFBD>ʼ<EFBFBD><EFBFBD>
* Date : 2022/10/16 logzhan
2022-10-07 23:49:43 +08:00
*---------------------------------------------------------------------**/
int PDRLocationMainLoop(IMU_t* ImuData, Nmea_t* NmeaData, LctFs_t* LocFusion);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_locationMainLoopStr
* Description : PDR<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵij<EFBFBD>ʼ<EFBFBD><EFBFBD>
* Date : 2020/07/03 logzhan
* 2020/02/02 logzhan : <EFBFBD><EFBFBD><EFBFBD>Ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>
*---------------------------------------------------------------------**/
int ParseDataAndUpdate(char* line, LctFs_t* result);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_initRmc
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>RMC<EFBFBD><EFBFBD><EFBFBD>
* Input : rmc<EFBFBD><EFBFBD> RMC<EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/7/3 logzhan
*---------------------------------------------------------------------**/
void RMC_Init(NmeaRMC_t * rmc);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_initNmeaFlg
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD>NMEAЭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>־λ
* Input : ln<EFBFBD><EFBFBD> NMEA<EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/7/3 logzhan
*---------------------------------------------------------------------**/
void NmeaFlag_Init(Nmea_t * ln);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : clearNmeaFlg
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Nmea<EFBFBD><EFBFBD>־λ,<EFBFBD><EFBFBD><EFBFBD>ܺ<EFBFBD>init<EFBFBD><EFBFBD>ͬ
* Date : 2020/7/4 logzhan
*---------------------------------------------------------------------**/
void ClearNmeaFlg(Nmea_t * ln);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_saveGnssInfo
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* Date : 2020/7/3 logzhan
*---------------------------------------------------------------------**/
void SaveGnssInfo(Nmea_t* nmea_data, LctFs_t* result, FILE* fp_gps);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : GetPDRVersion
* Description : <EFBFBD><EFBFBD>ȡpdr<EFBFBD><EFBFBD><EFBFBD>
* Date : 2022/10/15 logzhan
2022-10-07 23:49:43 +08:00
*---------------------------------------------------------------------**/
const char* GetPDRVersion(void);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : pdr_closeAlgorithm
* Description : <EFBFBD>ر<EFBFBD>PDR<EFBFBD>,<EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>Դ
* Date : 2020/8/3 logzhan
*---------------------------------------------------------------------**/
void Algorithm_DeInit();
#ifdef _WIN32 // <20><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>win32<33><32><EFBFBD><EFBFBD>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>dll<6C>ӿڵ<D3BF><DAB5><EFBFBD>
/**----------------------------------------------------------------------
* Function : LibPDR_Init
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>PDR<EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2020/8/3 logzhan
*---------------------------------------------------------------------**/
__declspec(dllexport) void LibPDR_Init();
/**----------------------------------------------------------------------
* Function : PDR_StepUpdateGPS
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2022/9/16 logzhan
*---------------------------------------------------------------------**/
__declspec(dllexport) PosFusion LibPDR_StepUpdateGPS(int useGpsFlg);
/**----------------------------------------------------------------------
* Function : setSimulatorFileCsvPath
* Description : <EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2020/8/3 logzhan
*---------------------------------------------------------------------**/
__declspec(dllexport) void setSimulatorFileCsvPath(char* path);
/**----------------------------------------------------------------------
* Function : LibPDR_DeInit
* Description : <EFBFBD>ر<EFBFBD>pdr<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>dll<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2020/8/3 logzhan
*---------------------------------------------------------------------**/
__declspec(dllexport) void LibPDR_DeInit();
/**----------------------------------------------------------------------
* Function : setRefGpsYaw
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD>ο<EFBFBD><EFBFBD>Ƕ<EFBFBD>
* Date : 2020/8/3 logzhan
*---------------------------------------------------------------------**/
__declspec(dllexport) void setRefGpsYaw();
#endif
#ifdef __cplusplus
}
#endif
#endif