You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.6 KiB
77 lines
3.6 KiB
#ifndef __XA1110_I2C_GPS_HEADER__
|
|
#define __XA1110_I2C_GPS_HEADER__
|
|
|
|
#include "../../../components/base/basicSettingsProvider.h"
|
|
#include "../../../components/base/basicLogCollection.h"
|
|
#include "../../../components/object/objectPathfinderBinaryLog.h"
|
|
#include "../../../hardware/i2c/i2cPort.h"
|
|
#include "../../../pathfinder/pathfinderDBConnector.h"
|
|
|
|
#define GPS_SYSTEM 0
|
|
#define GLONASS_SYSTEM 1
|
|
|
|
#define PF_GPS_FIX_1D 1
|
|
#define PF_GPS_FIX_2D 2
|
|
#define PF_GPS_FIX_3D 3
|
|
|
|
class sensorXA1110: public basicThread {
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
config_setting_t * m_pSettings;
|
|
i2cPort * m_pBus;
|
|
PATHFINDER_DBC * m_pDBC;
|
|
|
|
objectPathfinderBinaryLog * m_pBLOG;
|
|
|
|
CSTR m_pDevicePath;
|
|
uint8_t m_bDeviceAddress;
|
|
uint32_t m_nSampleDelay;
|
|
uint8_t m_bInitStage;
|
|
uint16_t m_bIssuedCommand;
|
|
bool m_bIsReady;
|
|
/* NMEA Update Settings */
|
|
GPS_SETTINGS m_sSettings;
|
|
GPS_EVTREC m_sRECORD;
|
|
//uint8_t GPS_CHANELS[12];
|
|
//uint8_t GLONASS_CHANELS[12];
|
|
/* Functionality */
|
|
void parsePackage( char * ptr );
|
|
uint16_t finishupPackage( char * ptr );
|
|
void parse_GGA( uint8_t SYS, char * ptr );
|
|
void parse_GLL( char * ptr );
|
|
void parse_GSA( uint8_t SYS, char * ptr );
|
|
void parse_GSV( uint8_t SYS, char * ptr );
|
|
void parse_RMC( uint8_t SYS, char * ptr );
|
|
void parse_VTG( uint8_t SYS, char * ptr );
|
|
|
|
bool request_Cold_Start();
|
|
bool request_Clear_ClearEPO();
|
|
bool request_Full_Cold_Start();
|
|
bool request_Hot_Start();
|
|
bool request_Warm_Start();
|
|
bool request_EASY_Status();
|
|
bool request_GNSS_SearchMode();
|
|
bool request_Version();
|
|
|
|
bool set_UpdateRate( uint16_t msec = 100 );
|
|
bool set_ConfigDEE( uint8_t SatVisible = 1, uint8_t SignalNoiseRatio = 30, uint32_t threshold = 180000, uint32_t gap = 60000 );
|
|
bool set_ConfigDGPS( uint8_t mode = 2 );
|
|
bool set_ConfigDR( uint16_t cnt = 0 );
|
|
bool set_ConfigMinimumElevation( uint8_t elv = 5 );
|
|
bool set_ConfigMinimumSNR( uint8_t mode = 9 );
|
|
bool set_ConfigNMEA( uint8_t GLL=1, uint8_t RMC=1, uint8_t VTG=1, uint8_t GGA=5, uint8_t GSA=5, uint8_t GSV=0, uint8_t ZDA=5 );
|
|
bool set_ConfigSBAS( bool mode = false );
|
|
bool set_DebugMode( bool enabled = false );
|
|
|
|
protected:
|
|
void m_fThreadProc( void );
|
|
public:
|
|
explicit sensorXA1110( config_setting_t *Settings = NULL, PATHFINDER_DBC *DBC = NULL );
|
|
virtual ~sensorXA1110();
|
|
bool create();
|
|
bool isDead();
|
|
float getCurrentAlt( void );
|
|
uint8_t getCurrentFixType( void );
|
|
};
|
|
|
|
#endif
|