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

138 lines
5.4 KiB
C
Raw Normal View History

2022-10-07 23:49:43 +08:00
#ifndef __PDR_LOCATION_H__
#define __PDR_LOCATION_H__
#ifdef __cplusplus
extern "C" {
#endif
2024-12-06 21:30:26 +08:00
#include "PDRBase.h"
2022-10-07 23:49:43 +08:00
#define HIST_GPS_NUM 8
#define ACCURACY_THRES 0.6f // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
#define YAW_THRES 10.0f // Yaw<61>Ƿ<EFBFBD>Χ<EFBFBD><CEA7>ֵ
/**---------------------------------------------------------------------
* Function : NavSys_Init
* Description : PDR<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
* Date : 2022/9/16
*---------------------------------------------------------------------**/
void PDR_Init(void);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
2024-12-06 21:30:26 +08:00
* Function : InsLocationUpdate
2022-10-07 23:49:43 +08:00
* Description : PDR <EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
* Date : 2022/09/16 logzhan
*---------------------------------------------------------------------**/
2024-12-06 21:30:26 +08:00
int InsLocationUpdate(IMU_t *ss_data, EKFPara_t *kf);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : pdr_noGpsPredict
* Description : <EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>gps<EFBFBD><EFBFBD>ϢʱԤ<EFBFBD><EFBFBD>GPSλ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD>10<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void NoGnssInfoPredict(EKFPara_t* kf, LctFs_t* result, PDR_t* g_pdr);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : Nmea2Gnss
* Description : nmea<EFBFBD><EFBFBD><EFBFBD>ݽתgnss<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void Nmea2Gnss(Nmea_t* nmea_data, GNSS_t* pgnss);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : pdr_detectFixMode
* Description : <EFBFBD><EFBFBD><EFBFBD>ǰPDR<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><EFBFBD>غ;<EFBFBD>ֹģʽ,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* ԭʼGPS<EFBFBD><EFBFBD><EFBFBD>߲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/07/08 logzhan
* 2020/02/08 logzhan : <EFBFBD>޸<EFBFBD>-1ΪINVAILD_GPS_YAW<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀɶ<EFBFBD><EFBFBD><EFBFBD>
*---------------------------------------------------------------------**/
int DetectFixMode(GNSS_t* pgnss, EKFPara_t* kf, PDR_t* g_pdr, LctFs_t* result);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : GnssCalHeading
* Description : <EFBFBD><EFBFBD>ȡGPSƫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(0 - 360<EFBFBD><EFBFBD>)
* Date : 2022/09/16 logzhan
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀɶ<EFBFBD><EFBFBD><EFBFBD>
*---------------------------------------------------------------------**/
double GnssCalHeading(GNSS_t* pgnss);
/**----------------------------------------------------------------------
* Function : calPdrHeadingOffset
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPS<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>
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void CalPdrHeadingOffset(Nmea_t* nmea_data, PDR_t* p_pdr);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_resetSysStatus
* Description : PDS <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ״̬
* Date : 2020/2/1 logzhan
*---------------------------------------------------------------------**/
void ResetSystemStatus(EKFPara_t* kf);
/**----------------------------------------------------------------------
* Function : pdr_gnssInsLocation
* Description : PDR GPS<EFBFBD>ں<EFBFBD>INS<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>λ
* Date : 2021/01/29 logzhan
*---------------------------------------------------------------------**/
int GnssInsFusionLocation(Nmea_t* nmea_data, EKFPara_t* kf, LctFs_t* result);
2022-10-07 23:49:43 +08:00
/**---------------------------------------------------------------------
* Function : pdr_initGnssInfo
* Description : PDS GNSS<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
* Date : 2020/2/1 logzhan
*---------------------------------------------------------------------**/
void InitGnssInfo(void);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : GnssUpdate
* Description : nmea<EFBFBD><EFBFBD><EFBFBD>ݽתgnss<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Date : 2020/07/08 logzhan
* 2020/02/09 logzhan : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧԭpdr_gpsUpdate<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD>GPS<EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><EFBFBD><EFBFBD>gnss<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>nmea<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵû
* ʲô<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*---------------------------------------------------------------------**/
void GnssUpdate(GNSS_t* gps, Nmea_t* nmea);
/**----------------------------------------------------------------------
* Function : OutputRawGnssPos
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPSλ<EFBFBD><EFBFBD>
* Date : 2022/10/15 logzhan
*---------------------------------------------------------------------**/
void OutputRawGnssPos(GNSS_t* pgnss, LctFs_t* result);
/**----------------------------------------------------------------------
* Function : ResetOutputLoction
* Description : 1<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>
* 2<EFBFBD><EFBFBD>GPSֵ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>result
* Date : 2022/09/19 logzhan
*---------------------------------------------------------------------**/
int ResetOutputLoction(GNSS_t* pgnss, PDR_t* g_pdr, EKFPara_t* kf, LctFs_t* result);
/**----------------------------------------------------------------------
* Function : EkfGnssInsLocFusion
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>EKF<EFBFBD><EFBFBD>GNSS<EFBFBD><EFBFBD>INS<EFBFBD>ں϶<EFBFBD>λ
* Date : 2022/09/21 logzhan
*---------------------------------------------------------------------**/
void EkfGnssInsLocFusion(GNSS_t* pgnss, PDR_t* g_pdr, Classifer_t* sys, double yaw_bias,
EKFPara_t* kf, LctFs_t* res);
2022-10-07 23:49:43 +08:00
/**----------------------------------------------------------------------
* Function : PDRInitialAlignment
* Description : PDR<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>׼
* Date : 2022/09/19 logzhan
*---------------------------------------------------------------------**/
int GnssInsInitialAlignment(GNSS_t* pgnss, EKFPara_t* kf, PDR_t* g_pdr, LctFs_t* result);
2022-10-07 23:49:43 +08:00
#ifdef __cplusplus
}
#endif
#endif