PDR/3.BackUp/PDR-Origin-Version/include/pdr_api.h

158 lines
5.9 KiB
C
Raw Normal View History

2022-09-15 16:35:25 +08:00
/******************** (C) COPYRIGHT 2020 VIVO************************************
* File Name : pdr_api.h
* Department : Sensor Algorithm Team
* Current Version : V2.0(compare QCOM SAP 5.0)
* Author : yuanlin_rjyb@vivo.com & zhanli@vivo.com
* 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"
#include "pdr_base.h"
#include "pdr_util.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 : pdr_algorithmInit
* 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 : 2020/7/3 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
void pdr_initAlgorithm(void);
/**---------------------------------------------------------------------
* Function : pdr_locationMainLoop
* 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>
* Input : ss_data<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
nmea_data, NMEA<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
result<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Output : int, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ
* Date : 2020/7/3 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
int pdr_locationMainLoop(imu *ss_data, lct_nmea *nmea_data, lct_fs *result,
FILE *fp_gps);
/**---------------------------------------------------------------------
* 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 yuanlin_rjyb@vivo.com
* 2020/02/02 zhanli@vivo.com : <EFBFBD><EFBFBD><EFBFBD>Ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>
*---------------------------------------------------------------------**/
int pdr_locationMainLoopStr(char* line, lct_fs* result);
/**---------------------------------------------------------------------
* Function : pdr_initRmc
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>RMC<EFBFBD><EFBFBD><EFBFBD>
* Input : rmc<EFBFBD><EFBFBD> RMC<EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/7/3 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
void pdr_initRmc(lct_nmea_rmc * rmc);
/**---------------------------------------------------------------------
* 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 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
void pdr_initNmeaFlg(lct_nmea * ln);
/**---------------------------------------------------------------------
* Function : clearNmeaFlg
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Nmea<EFBFBD><EFBFBD>־λ,<EFBFBD><EFBFBD><EFBFBD>ܺ<EFBFBD>init<EFBFBD><EFBFBD>ͬ
* Date : 2020/7/4 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
void clearNmeaFlg(lct_nmea * ln);
/**---------------------------------------------------------------------
* Function : pdr_saveGnssInfo
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* Date : 2020/7/3 yuanlin_rjyb@vivo.com
*---------------------------------------------------------------------**/
void pdr_saveGnssInfo(lct_nmea* nmea_data, lct_fs* result, FILE* fp_gps);
/**----------------------------------------------------------------------
* Function : pdr_libVersion
* Description : pdr<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/8/3 zhanli@vivo.com
*---------------------------------------------------------------------**/
const char* pdr_libVersion(void);
/**----------------------------------------------------------------------
* Function : pdr_closeAlgorithm
* Description : <EFBFBD>ر<EFBFBD>PDR<EFBFBD>,<EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>Դ
* Date : 2020/8/3 zhanli@vivo.com
*---------------------------------------------------------------------**/
void pdr_closeAlgorithm();
#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 : initPdrAlgo
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>PDR<EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2020/8/3 zhanli@vivo.com
*---------------------------------------------------------------------**/
__declspec(dllexport) void initPdrAlgo();
/**----------------------------------------------------------------------
* Function : pdrSumulatorUpdateGpsStep
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD>(DLL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* Date : 2020/8/3 zhanli@vivo.com
*---------------------------------------------------------------------**/
__declspec(dllexport) PosFusion pdrSumulatorUpdateGpsStep(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 zhanli@vivo.com
*---------------------------------------------------------------------**/
__declspec(dllexport) void setSimulatorFileCsvPath(char* path);
/**----------------------------------------------------------------------
* Function : closePdrAlgo
* 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 zhanli@vivo.com
*---------------------------------------------------------------------**/
__declspec(dllexport) void closePdrAlgo();
/**----------------------------------------------------------------------
* Function : setRefGpsYaw
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<EFBFBD>ο<EFBFBD><EFBFBD>Ƕ<EFBFBD>
* Date : 2020/8/3 zhanli@vivo.com
*---------------------------------------------------------------------**/
__declspec(dllexport) void setRefGpsYaw();
#endif
#ifdef __cplusplus
}
#endif
#endif