PDR/1.Software/PDR 1.02/include/pdr_location.h

100 lines
3.5 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef __PDR_LOCATION_H__
#define __PDR_LOCATION_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "pdr_base.h"
#define HIST_GPS_NUM 8
#define ACCURACY_THRES 0.6f // 精度阈值
#define YAW_THRES 10.0f // Yaw角范围阈值
/**---------------------------------------------------------------------
* Function : NavSys_Init
* Description : PDR导航系统初始化
* Date : 2022/9/16
*---------------------------------------------------------------------**/
void NavSys_Init(void);
/**---------------------------------------------------------------------
* Function : InsLocation
* Description : PDR 惯性导航定位
* Date : 2022/09/16 logzhan
*---------------------------------------------------------------------**/
int InsLocation(imu *ss_data, KfPara_t *kf);
/**----------------------------------------------------------------------
* Function : pdr_noGpsPredict
* Description : 在没有gps信息时预测GPS位置最多预测10个点
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void NoGnssInfoPredict(KfPara_t* kf, lct_fs* result, PDR* g_pdr);
/**----------------------------------------------------------------------
* Function : Nmea2Gnss
* Description : nmea数据结构转gnss数据
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void Nmea2Gnss(lct_nmea* nmea_data, GNSS_t* pgnss);
/**----------------------------------------------------------------------
* Function : pdr_detectFixMode
* Description : 检测当前PDR处于的模式如果是车载和静止模式,根据情况选择输出
* 原始GPS或者不输出
* Date : 2020/07/08 logzhan
* 2020/02/08 logzhan : 修改-1为INVAILD_GPS_YAW提高
* 代码的可读性
*---------------------------------------------------------------------**/
int DetectFixMode(GNSS_t* pgnss, KfPara_t* kf, PDR* g_pdr, lct_fs* result);
/**----------------------------------------------------------------------
* Function : GnssCalHeading
* Description : 获取GPS偏航角(0 - 360°)
* Date : 2022/09/16 logzhan
* 代码的可读性
*---------------------------------------------------------------------**/
double GnssCalHeading(GNSS_t* pgnss);
/**----------------------------------------------------------------------
* Function : calPdrHeadingOffset
* Description : 利用GPS信号较好时的偏航角修正磁力计计算方向键的偏移
* Date : 2020/07/08 logzhan
*---------------------------------------------------------------------**/
void CalPdrHeadingOffset(lct_nmea* nmea_data, PDR* p_pdr);
/**---------------------------------------------------------------------
* Function : pdr_resetSysStatus
* Description : PDS 重设系统状态
* Date : 2020/2/1 logzhan
*---------------------------------------------------------------------**/
void ResetSystemStatus(KfPara_t* kf);
/**----------------------------------------------------------------------
* Function : pdr_gnssInsLocation
* Description : PDR GPS融合INS惯性定位
* Date : 2021/01/29 logzhan
*---------------------------------------------------------------------**/
int GnssInsFusionLocation(lct_nmea* nmea_data, KfPara_t* kf, lct_fs* result);
/**---------------------------------------------------------------------
* Function : pdr_initGnssInfo
* Description : PDS GNSS定位信息初始化
* Date : 2020/2/1 logzhan
*---------------------------------------------------------------------**/
void InitGnssInfo(void);
void GnssUpdate(GNSS_t* gps, lct_nmea* nmea);
#ifdef __cplusplus
}
#endif
#endif