DriveWorks SDK Reference
5.10.90 Release
For Test and Development only

GPS.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
47#ifndef DW_SENSORS_GPS_GPS_H_
48#define DW_SENSORS_GPS_GPS_H_
49
50#include <dw/core/base/Config.h>
52#include <dw/core/base/Types.h>
53
54#include <dw/sensors/Sensors.h>
55
56#ifdef __cplusplus
57extern "C" {
58#endif
59
61typedef enum dwGPSFlags {
62 DW_GPS_LAT DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.latitude instead") = 1 << 0,
63 DW_GPS_LON DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.longitude instead") = 1 << 1,
64 DW_GPS_ALT DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.altitude instead") = 1 << 2,
65 DW_GPS_COURSE DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.course instead") = 1 << 3,
66 DW_GPS_SPEED DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.speed instead") = 1 << 4,
67 DW_GPS_CLIMB DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.climb instead") = 1 << 5,
68 DW_GPS_HDOP DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.hdop instead") = 1 << 6,
69 DW_GPS_VDOP DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.vdop instead") = 1 << 7,
70 DW_GPS_HACC DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.hacc instead") = 1 << 8,
71 DW_GPS_VACC DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.vacc instead") = 1 << 9,
72 DW_GPS_MODE DW_DEPRECATED_ENUM("Use dwGPSFrame.validityInfo.mode instead") = 1 << 10,
73 DW_GPS_FORCE32 = 0x7FFFFFFF,
75 DW_DEPRECATED("dwGPSFlags is deprecated and will be removed soon. Please use members in struct dwGPSSignalValidityInfo instead");
76
81typedef enum dwGPSMode {
102 DW_GPS_MODE_FORCE32 = 0x7FFFFFFF
104
106typedef enum dwGPSFixStatus {
113 DW_GPS_FIX_STATUS_FORCE32 = 0x7FFFFFFF
115
126
132{
141 // Validity of course signal
170
175typedef struct dwGPSFrame
176{
179
185
191
197
203
209
215
221
227
233
239
245
251
257
264
276
288
307
309 char utcTime[16] DW_DEPRECATED("utcTime is deprecated and will be removed soon. Please use utcTime instead");
310
312 char utcDate[16] DW_DEPRECATED("utcDate is deprecated and will be removed soon. Please use utcTime instead");
313
315 uint32_t flags
316 DW_DEPRECATED("flags is deprecated and will be removed soon. Please use struct validityInfo and APIs introduced in GPSGetterSetter.h instead");
317
320 DW_DEPRECATED("gpsMode is deprecated and will be removed soon. Please use mode instead");
321
323 uint8_t reserved[468];
324} dwGPSFrame;
325
329typedef struct dwGPSFrameNew
330{
333
339
345
351
357
363
369
375
381
387
393
399
405
411
418
430
442
461
463 uint8_t reserved[508];
465 DW_DEPRECATED("dwGPSFrameNew is deprecated and will be removed soon. Please use dwGPSFrame instead");
466
485dwStatus dwSensorGPS_readFrame(dwGPSFrame* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor);
486
502dwStatus dwSensorGPS_processRawData(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor);
503
518
536#pragma GCC diagnostic push // TODO(pshu): Remove in next major release
537#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
539dwStatus dwSensorGPS_readFrameNew(dwGPSFrameNew* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
540 DW_DEPRECATED("dwSensorGPS_readFrameNew() is deprecated and will be removed soon. Please use dwSensorGPS_readFrame() instead");
541#pragma GCC diagnostic pop
542
558dwStatus dwSensorGPS_processRawDataNew(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor)
559 DW_DEPRECATED("dwSensorGPS_processRawDataNew() is deprecated and will be removed soon. Please use dwSensorGPS_processRawData() instead");
560
573#pragma GCC diagnostic push // TODO(pshu): Remove in next major release
574#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
577 DW_DEPRECATED("dwSensorGPS_popFrameNew() is deprecated and will be removed soon. Please use dwSensorGPS_popFrame() instead");
578#pragma GCC diagnostic pop
579
580#ifdef __cplusplus
581}
582#endif
583#endif // DW_SENSORS_GPS_GPS_H_
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:63
double float64_t
Definition: BasicTypes.h:58
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
#define DW_API_PUBLIC
Definition: Exports.h:54
uint8_t dwSignalValidity
The type of the encoded status field.
Definition: SignalStatus.h:57
dwStatus
Status definition.
Definition: Status.h:173
dwSignalValidity longitude
Validity of longitude signal.
Definition: GPS.h:138
dwSignalValidity altitude
Validity of altitude signal.
Definition: GPS.h:140
float64_t vacc
Definition: GPS.h:250
float64_t pdop
Definition: GPS.h:392
dwGPSMode gpsMode
GPS mode.
Definition: GPS.h:320
char utcTime[16]
UTC time as provided in the GPS package [hhmmss.sss] (null terminated).
Definition: GPS.h:309
float64_t pdop
Definition: GPS.h:238
float64_t latitude
Definition: GPS.h:344
dwSignalValidity latitude
Validity of latitude signal.
Definition: GPS.h:136
float64_t hacc
Definition: GPS.h:244
dwGPSFixStatus fixStatus
Definition: GPS.h:275
float64_t hacc
Definition: GPS.h:398
dwSignalValidity satelliteCount
Validity of satellite count signal.
Definition: GPS.h:160
dwSignalValidity timestamp_us
Validity of timestamp signal.
Definition: GPS.h:134
dwSignalValidity course
Definition: GPS.h:142
dwTime_t timestamp_us
Definition: GPS.h:184
uint8_t reserved[468]
Reserved space.
Definition: GPS.h:323
dwSignalValidity fixStatus
Validity of 2D or 3D fix status signal.
Definition: GPS.h:162
float64_t latitude
Definition: GPS.h:190
float64_t longitude
Definition: GPS.h:350
char utcDate[16]
UTC date as provided in the GPS package [ddmmyy] (null terminated).
Definition: GPS.h:312
dwSignalValidity climb
Validity of climb signal.
Definition: GPS.h:146
float64_t vdop
Definition: GPS.h:232
dwSignalValidity pdop
Validity of positional dilusion of precision signal.
Definition: GPS.h:152
dwGPSMode mode
Definition: GPS.h:306
dwSignalValidity vacc
Validity of vertical accuracy of solution signal.
Definition: GPS.h:156
float64_t course
Definition: GPS.h:208
float64_t altitude
Definition: GPS.h:202
dwSignalValidity mode
Validity of GPS mode signal.
Definition: GPS.h:166
dwGPSSignalValidityInfo validityInfo
Signal validity information.
Definition: GPS.h:332
dwSignalValidity hacc
Validity of horizontal accuracy of solution signal.
Definition: GPS.h:154
dwSignalValidity vdop
Validity of vertical dilusion of precision signal.
Definition: GPS.h:150
float64_t course
Definition: GPS.h:362
dwSignalValidity reserved[63]
Reserved space.
Definition: GPS.h:168
float64_t hdop
Definition: GPS.h:380
dwSignalValidity speed
Validity of speed signal.
Definition: GPS.h:144
dwTime_t timestamp_us
Definition: GPS.h:338
float64_t vacc
Definition: GPS.h:404
float64_t speed
Definition: GPS.h:368
float64_t longitude
Definition: GPS.h:196
dwGPSTimestampQuality timestampQuality
Definition: GPS.h:287
dwGPSTimestampQuality timestampQuality
Definition: GPS.h:441
dwGPSSignalValidityInfo validityInfo
Signal validity information.
Definition: GPS.h:178
dwGPSMode mode
Definition: GPS.h:460
dwGPSFixStatus fixStatus
Definition: GPS.h:429
uint8_t satelliteCount
Definition: GPS.h:417
float64_t climb
Definition: GPS.h:374
float64_t altitude
Definition: GPS.h:356
dwSignalValidity utcTimeUs
Validity of UTC time signal.
Definition: GPS.h:158
dwTime_t utcTimeUs
Definition: GPS.h:256
uint8_t satelliteCount
Definition: GPS.h:263
float64_t vdop
Definition: GPS.h:386
dwSignalValidity timestampQuality
Validity of timestamp quality signal.
Definition: GPS.h:164
uint8_t reserved[508]
Reserved space.
Definition: GPS.h:463
float64_t speed
Definition: GPS.h:214
dwSignalValidity hdop
Validity of horizontal dilusion of precision signal.
Definition: GPS.h:148
uint32_t flags
The flags to show which values are valid in this GPS frame.
Definition: GPS.h:316
float64_t hdop
Definition: GPS.h:226
float64_t climb
Definition: GPS.h:220
dwTime_t utcTime
Definition: GPS.h:410
dwGPSFlags
Each flag shows if that value is valid in this GPS frame.
Definition: GPS.h:61
DW_API_PUBLIC dwStatus dwSensorGPS_processRawDataNew(uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
Decodes RAW data previously read.
DW_API_PUBLIC dwStatus dwSensorGPS_readFrame(dwGPSFrame *const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads the next GPS packet with a given timeout.
dwGPSFixStatus
GPS satellite fix status.
Definition: GPS.h:106
DW_API_PUBLIC dwStatus dwSensorGPS_popFrame(dwGPSFrame *const frame, dwSensorHandle_t const sensor)
Returns any GPS frame previously processed through RAW data stream.
DW_API_PUBLIC dwStatus dwSensorGPS_processRawData(uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
Decodes RAW data previously read.
DW_API_PUBLIC dwStatus dwSensorGPS_popFrameNew(dwGPSFrameNew *const frame, dwSensorHandle_t const sensor)
Returns any GPS frame New previously processed through RAW data stream.
dwGPSMode
The GPS mode gives the status of the GNSS data.
Definition: GPS.h:81
DW_API_PUBLIC dwStatus dwSensorGPS_readFrameNew(dwGPSFrameNew *const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads the next GPS packet with a given timeout.
dwGPSTimestampQuality
GPS timestamp quality.
Definition: GPS.h:117
@ DW_DEPRECATED_ENUM
Value of dwGPSFrame.latitude is valid.
Definition: GPS.h:62
@ DW_GPS_FORCE32
Definition: GPS.h:73
@ DW_GPS_FIX_STATUS_2D_FIX
2D fix
Definition: GPS.h:110
@ DW_GPS_FIX_STATUS_NO_FIX
No fix.
Definition: GPS.h:108
@ DW_GPS_FIX_STATUS_3D_FIX
3D fix
Definition: GPS.h:112
@ DW_GPS_FIX_STATUS_FORCE32
Definition: GPS.h:113
@ DW_GPS_MODE_STAND_ALONE
GPS mode stand alone. No RTK or PPP correction.
Definition: GPS.h:89
@ DW_GPS_MODE_PPP_CONVERGING
GPS mode PPP converging. Using PPP, but solution has not finished converging, so the data is not yet ...
Definition: GPS.h:99
@ DW_GPS_MODE_INVALID_GPS
GPS mode invalid. This GPS data cannot be used.
Definition: GPS.h:85
@ DW_GPS_MODE_DEAD_RECKONING
GPS mode dead reckoning. Device relying on IMU alone for updates.
Definition: GPS.h:87
@ DW_GPS_MODE_RTK_FLOAT
GPS mode RTK float.
Definition: GPS.h:95
@ DW_GPS_MODE_CODE_DIFFERENTIAL
GPS mode code differential. No RTK or PPP correction.
Definition: GPS.h:93
@ DW_GPS_MODE_FORCE32
Definition: GPS.h:102
@ DW_GPS_MODE_RTK_FIXED
GPS mode RTK fixed. This is the highest accuracy mode.
Definition: GPS.h:97
@ DW_GPS_MODE_UNKNOWN
GPS mode unknown. The device cannot or has not reported the mode.
Definition: GPS.h:83
@ DW_GPS_MODE_PRECISE_POINT
GPS mode precise point. No RTK or PPP correction.
Definition: GPS.h:91
@ DW_GPS_MODE_PPP_CONVERGED
GPS mode PPP converged. Most accurate mode for using PPP.
Definition: GPS.h:101
@ DW_GPS_TIMESTAMP_QUALITY_FORCE32
Definition: GPS.h:124
@ DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST
Synchronization lost.
Definition: GPS.h:123
@ DW_GPS_TIMESTAMP_QUALITY_NOT_INIT
Not Initialized. still initializing.
Definition: GPS.h:119
@ DW_GPS_TIMESTAMP_QUALITY_OK
Normal Operation. Functional and Electrical Checks Passed.
Definition: GPS.h:121
A GPS packet containing localization information.
Definition: GPS.h:176
This structure contains one frame of data from an GPS/GNSS sensor.
Definition: GPS.h:330
This structure contains validity of each signal provided by GPS sensors.
Definition: GPS.h:132
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:86