#ifndef __GPS_H
#define __GPS_H	

#include "headfile.h"

#define USART_REC_LEN			200	
#define EN_USART2_RX			1  //使能接收 --- 1 反之 0

#define GPS_DMA_RX_BUF_LEN		200 //可根据NMEA数据跳匝


// 对于gps结构体
#define GPS_Buffer_Length 80
#define UTCTime_Length 11
#define latitude_Length 11
#define N_S_Length 2
#define longitude_Length 12
#define E_W_Length 2 

typedef struct GPSData 
{
	char GPS_Buffer[GPS_Buffer_Length];
	char isGetData;		//是否获取到GPS数据
	char isParseData;	//是否解析完成
	char UTCTime[UTCTime_Length];		//UTC时间
	char latitude[latitude_Length];		//纬度
	char N_S[N_S_Length];		//N/S
	char longitude[longitude_Length];		//经度
	char E_W[E_W_Length];		//E/W
	char isUsefull;		//定位信息是否有效
} _GPSData;

extern _GPSData GPS;
extern uint8_t GPS_DMA_RX_BUF[GPS_DMA_RX_BUF_LEN];

void gps_thread_entry(ULONG thread_input);


#endif