DriveWorks SDK Reference
5.8.83 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 = 1 << 0,
63 DW_GPS_LON = 1 << 1,
64 DW_GPS_ALT = 1 << 2,
65 DW_GPS_COURSE = 1 << 3,
66 DW_GPS_SPEED = 1 << 4,
67 DW_GPS_CLIMB = 1 << 5,
68 DW_GPS_HDOP = 1 << 6,
69 DW_GPS_VDOP = 1 << 7,
70 DW_GPS_HACC = 1 << 8,
71 DW_GPS_VACC = 1 << 9,
72 DW_GPS_MODE = 1 << 10,
74
79typedef enum dwGPSMode {
100 DW_GPS_MODE_FORCE32 = 0x7FFFFFFF
102
107typedef struct dwGPSFrame
108{
111
114
117
120
123
126
129
131 char utcTime[16];
132
134 char utcDate[16];
135
138
141
144
147
149 uint32_t flags;
150
153} dwGPSFrame;
154
156typedef enum dwGPSFixStatus {
163 DW_GPS_FIX_STATUS_FORCE32 = 0x7FFFFFFF
165
175
179typedef struct dwGPSFrameNew
180{
181 struct
182 {
202
208
214
220
226
232
238
244
250
256
262
268
274
280
287
299
311
314
315 uint8_t reserved[508];
317
336dwStatus dwSensorGPS_readFrame(dwGPSFrame* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor);
337
353dwStatus dwSensorGPS_processRawData(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor);
354
369
388dwStatus dwSensorGPS_readFrameNew(dwGPSFrameNew* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor);
389
405dwStatus dwSensorGPS_processRawDataNew(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor);
406
421
422#ifdef __cplusplus
423}
424#endif
426#endif // DW_SENSORS_GPS_GPS_H_
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
#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:171
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
double float64_t
Definition: Types.h:71
float64_t vacc
Vertical accuracy [m].
Definition: GPS.h:146
float64_t pdop
Definition: GPS.h:261
dwGPSMode gpsMode
GPS mode.
Definition: GPS.h:152
char utcTime[16]
UTC time as provided in the GPS package [hhmmss.sss] (null terminated).
Definition: GPS.h:131
float64_t latitude
Definition: GPS.h:213
float64_t hacc
Horizontal accuracy [m].
Definition: GPS.h:143
float64_t hacc
Definition: GPS.h:267
dwGPSMode gpsMode
GPS mode.
Definition: GPS.h:313
dwTime_t timestamp_us
Timestamp of the message when first received [usec].
Definition: GPS.h:110
float64_t latitude
Latitude [degree].
Definition: GPS.h:113
float64_t longitude
Definition: GPS.h:219
char utcDate[16]
UTC date as provided in the GPS package [ddmmyy] (null terminated).
Definition: GPS.h:134
float64_t vdop
Vertical dilution of precision (VDOP).
Definition: GPS.h:140
float64_t course
Course relative to true north [degree].
Definition: GPS.h:122
float64_t altitude
Altitude over WGS84 ellipsoid [m].
Definition: GPS.h:119
float64_t course
Definition: GPS.h:231
struct dwGPSFrameNew::@3 validityInfo
float64_t hdop
Definition: GPS.h:249
dwTime_t timestamp_us
Definition: GPS.h:207
float64_t vacc
Definition: GPS.h:273
float64_t speed
Definition: GPS.h:237
float64_t longitude
Longitude [degree].
Definition: GPS.h:116
dwGPSTimestampQuality timestampQuality
Definition: GPS.h:310
dwGPSFixStatus fixStatus
Definition: GPS.h:298
uint8_t satelliteCount
Definition: GPS.h:286
float64_t climb
Definition: GPS.h:243
float64_t altitude
Definition: GPS.h:225
float64_t vdop
Definition: GPS.h:255
uint8_t reserved[508]
Definition: GPS.h:315
float64_t speed
Horizontal speed [m/s].
Definition: GPS.h:125
uint32_t flags
The flags to show which values are valid in this GPS frame.
Definition: GPS.h:149
float64_t hdop
Horizontal dilution of precision (HDOP).
Definition: GPS.h:137
float64_t climb
Vertical speed [m/s].
Definition: GPS.h:128
dwTime_t utcTime
Definition: GPS.h:279
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:156
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:79
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
Definition: GPS.h:166
@ DW_GPS_ALT
Value of dwGPSFrame.altitude is valid.
Definition: GPS.h:64
@ DW_GPS_LAT
Value of dwGPSFrame.latitude is valid.
Definition: GPS.h:62
@ DW_GPS_MODE
Value of dwGPSFrame.gpsMode is valid.
Definition: GPS.h:72
@ DW_GPS_LON
Value of dwGPSFrame.longitude is valid.
Definition: GPS.h:63
@ DW_GPS_VDOP
Value of dwGPSFrame.vdop is valid.
Definition: GPS.h:69
@ DW_GPS_COURSE
Value of dwGPSFrame.course is valid.
Definition: GPS.h:65
@ DW_GPS_VACC
Value of dwGPSFrame.vacc is valid.
Definition: GPS.h:71
@ DW_GPS_HACC
Value of dwGPSFrame.hacc is valid.
Definition: GPS.h:70
@ DW_GPS_SPEED
Value of dwGPSFrame.speed is valid.
Definition: GPS.h:66
@ DW_GPS_HDOP
Value of dwGPSFrame.hdop is valid.
Definition: GPS.h:68
@ DW_GPS_CLIMB
Value of dwGPSFrame.climb is valid.
Definition: GPS.h:67
@ DW_GPS_FIX_STATUS_2D_FIX
2D fix
Definition: GPS.h:160
@ DW_GPS_FIX_STATUS_NO_FIX
No fix.
Definition: GPS.h:158
@ DW_GPS_FIX_STATUS_3D_FIX
3D fix
Definition: GPS.h:162
@ DW_GPS_FIX_STATUS_FORCE32
Definition: GPS.h:163
@ DW_GPS_MODE_STAND_ALONE
GPS mode stand alone. No RTK or PPP correction.
Definition: GPS.h:87
@ 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:97
@ DW_GPS_MODE_INVALID_GPS
GPS mode invalid. This GPS data cannot be used.
Definition: GPS.h:83
@ DW_GPS_MODE_DEAD_RECKONING
GPS mode dead reckoning. Device relying on IMU alone for updates.
Definition: GPS.h:85
@ DW_GPS_MODE_RTK_FLOAT
GPS mode RTK float.
Definition: GPS.h:93
@ DW_GPS_MODE_CODE_DIFFERENTIAL
GPS mode code differential. No RTK or PPP correction.
Definition: GPS.h:91
@ DW_GPS_MODE_FORCE32
Definition: GPS.h:100
@ DW_GPS_MODE_RTK_FIXED
GPS mode RTK fixed. This is the highest accuracy mode.
Definition: GPS.h:95
@ DW_GPS_MODE_UNKNOWN
GPS mode unknown. The device cannot or has not reported the mode.
Definition: GPS.h:81
@ DW_GPS_MODE_PRECISE_POINT
GPS mode precise point. No RTK or PPP correction.
Definition: GPS.h:89
@ DW_GPS_MODE_PPP_CONVERGED
GPS mode PPP converged. Most accurate mode for using PPP.
Definition: GPS.h:99
@ DW_GPS_TIMESTAMP_QUALITY_FORCE32
Definition: GPS.h:173
@ DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST
Synchronization lost.
Definition: GPS.h:172
@ DW_GPS_TIMESTAMP_QUALITY_NOT_INIT
Not Initialized. still initializing.
Definition: GPS.h:168
@ DW_GPS_TIMESTAMP_QUALITY_OK
Normal Operation. Functional and Electrical Checks Passed.
Definition: GPS.h:170
A GPS packet containing localization information.
Definition: GPS.h:108
This structure contains one frame of data from an GPS/GNSS sensor.
Definition: GPS.h:180
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:86