24#include <GNSSPositionData.h>
107 SpInterval_10Hz = 100,
108 SpInterval_8Hz = 125,
109 SpInterval_5Hz = 200,
110 SpInterval_4Hz = 250,
111 SpInterval_2Hz = 500,
112 SpInterval_1Hz = 1000,
277 int begin(Stream& debugOut) { DebugOut = debugOut;
return begin(); }
337 unsigned long getPositionDataSize(
void);
342 unsigned long getPositionData(
char *pBinaryBuffer);
344#ifdef CONFIG_CXD56_GNSS_ADDON
345 unsigned long getPositionData(GnssPositionData2 *pData);
357 int setPosition(
double latitude,
double longitude,
double altitude = 0);
488 unsigned long SatelliteSystem;
491 unsigned long inquireSatelliteType(
void);
494 static Stream& DebugOut;
496 inline static void printMessage(
SpPrintLevel level,
const char* str)
498 if (level <= DebugPrintLevel)
503#ifdef CONFIG_CXD56_GNSS_ADDON
504class SpGnssAddon :
public SpGnss {
507 int begin(Stream& debugOut) { DebugOut = debugOut;
return begin(); }
Time acquired from the satellite at the time of positioning.
Definition GNSS.h:124
unsigned char minute
Definition GNSS.h:130
unsigned char hour
Definition GNSS.h:129
unsigned char sec
Definition GNSS.h:131
unsigned short year
Definition GNSS.h:126
unsigned char month
Definition GNSS.h:127
unsigned long usec
Definition GNSS.h:132
unsigned char day
Definition GNSS.h:128
GNSS controller.
Definition GNSS.h:248
int setInterval(long interval=1)
Set the pos interval time.
int unuseGlonass(void)
[Obsolete] Unuse Glonass for positioning
Definition GNSS.h:446
int setInterval(SpIntervalFreq interval)
Set the pos interval time.
int removeEphemeris(void)
Remove the backup data stored in the Flash.
int end(void)
Inactivate GNSS device.
int isSelecting(SpSatelliteType sattype)
Returns whether the specified satellite system is selecting.
int useGps(void)
[Obsolete] Use GPS for positioning
Definition GNSS.h:422
int begin(void)
Activate GNSS device.
SpGnss()
Create SpGnss object.
int setTime(SpGnssTime *time)
Set the current time for hot start.
int setPosition(double latitude, double longitude, double altitude=0)
Set the current position for hot start.
int saveEphemeris(void)
Save the data stored in the backup RAM to Flash.
int begin(Stream &debugOut)
Activate GNSS device.
Definition GNSS.h:277
int waitUpdate(long timeout=-1)
Wait for position information to be updated.
int isUpdate(void)
Check position information is updated and return immediately.
void setDebugMode(SpPrintLevel level)
Set debug mode.
int unuseGps(void)
[Obsolete] Unuse GPS for positioning
Definition GNSS.h:428
void * getDCReport(void)
Get the QZQSM DC report data.
void start1PPS(void)
Start 1PPS output.
int isGlonass(void)
[Obsolete] Returns whether Glonass is used as satellite system
Definition GNSS.h:434
int isGps(void)
[Obsolete] Returns whether GPS is used as satellite system
Definition GNSS.h:416
~SpGnss()
Destroy SpGnss object.
int useGlonass(void)
[Obsolete] Use Glonass for positioning
Definition GNSS.h:440
int select(SpSatelliteType sattype)
Add specified satellite system to selection for positioning.
void stop1PPS(void)
Stop 1PPS output.
void getNavData(SpNavData *navData)
Get updated positioning information from GNSS.
int stop(void)
Stop positioning.
int deselect(SpSatelliteType sattype)
Remove specified satellite system to selection for positioning.
int start(SpStartMode mode=HOT_START)
Start positioning.
GNSS positioning data.
Definition GNSS.h:157
int isSatelliteTypeGlonass(unsigned long index)
[Obsolete] Check if the specified satellite is Glonass
Definition GNSS.h:197
unsigned char posFixMode
Definition GNSS.h:162
unsigned char getSatelliteElevation(unsigned long index)
Get satellite elevation.
SpSatelliteType getSatelliteType(unsigned long index)
Get satellite type.
unsigned short satelliteType
Definition GNSS.h:165
double longitude
Definition GNSS.h:168
double altitude
Definition GNSS.h:169
SpGnssTime time
Definition GNSS.h:159
float direction
Definition GNSS.h:171
float hdop
Definition GNSS.h:173
int isSatelliteType(unsigned long index, SpSatelliteType sattype)
Check if the specified satellite is GPS.
unsigned char type
Definition GNSS.h:160
unsigned short posSatelliteType
Definition GNSS.h:166
float pdop
Definition GNSS.h:172
float getSatelliteSignalLevel(unsigned long index)
Get satellite signal level(C/N)
SpSatellite satellite[24]
Definition GNSS.h:176
float tdop
Definition GNSS.h:175
unsigned char getSatelliteId(unsigned long index)
Get satellite ID(SVID)
int isSatelliteTypeGps(unsigned long index)
[Obsolete] Check if the specified satellite is GPS
Definition GNSS.h:191
float vdop
Definition GNSS.h:174
unsigned char posDataExist
Definition GNSS.h:163
float velocity
Definition GNSS.h:170
unsigned char numSatellites
Definition GNSS.h:161
unsigned char numSatellitesCalcPos
Definition GNSS.h:164
signed short getSatelliteAzimuth(unsigned long index)
Get satellite azimuth.
double latitude
Definition GNSS.h:167
Satellite information using positioning.
Definition GNSS.h:141
unsigned char svid
Definition GNSS.h:145
signed short azimuth
Definition GNSS.h:147
float sigLevel
Definition GNSS.h:148
unsigned short type
Definition GNSS.h:143
unsigned char elevation
Definition GNSS.h:146
SpPvtType
Set the GNSS positioning type.
Definition GNSS.h:80
SpStartMode
Mode to set to GNSS at the start of positioning.
Definition GNSS.h:59
SpSatelliteType
Satellite system type.
Definition GNSS.h:91
SpIntervalFreq
Interval frequency.
Definition GNSS.h:106
SpPrintLevel
Set the debug log output level.
Definition GNSS.h:69
SpFixMode
status of pos fix
Definition GNSS.h:45
@ SpPvtTypeReserv
Definition GNSS.h:83
@ SpPvtTypeUsers
Definition GNSS.h:84
@ SpPvtTypeNone
Definition GNSS.h:81
@ SpPvtTypeGnss
Definition GNSS.h:82
@ WARM_START
Definition GNSS.h:61
@ HOT_START
Definition GNSS.h:62
@ COLD_START
Definition GNSS.h:60
Definition GNSSPositionData.h:26