Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.8.83 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

    Defines the GPS sensor.

    Data Structures

    struct  dwGPSFrame
     A GPS packet containing localization information. More...
     
    struct  dwGPSFrameNew
     This structure contains one frame of data from an GPS/GNSS sensor. More...
     
    struct  dwGPSFrameNew.validityInfo
     

    Enumerations

    enum  dwGPSFixStatus {
      DW_GPS_FIX_STATUS_NO_FIX = 0 ,
      DW_GPS_FIX_STATUS_2D_FIX = 1 ,
      DW_GPS_FIX_STATUS_3D_FIX = 2 ,
      DW_GPS_FIX_STATUS_FORCE32 = 0x7FFFFFFF
    }
     GPS satellite fix status. More...
     
    enum  dwGPSFlags {
      DW_GPS_LAT = 1 << 0 ,
      DW_GPS_LON = 1 << 1 ,
      DW_GPS_ALT = 1 << 2 ,
      DW_GPS_COURSE = 1 << 3 ,
      DW_GPS_SPEED = 1 << 4 ,
      DW_GPS_CLIMB = 1 << 5 ,
      DW_GPS_HDOP = 1 << 6 ,
      DW_GPS_VDOP = 1 << 7 ,
      DW_GPS_HACC = 1 << 8 ,
      DW_GPS_VACC = 1 << 9 ,
      DW_GPS_MODE = 1 << 10
    }
     Each flag shows if that value is valid in this GPS frame. More...
     
    enum  dwGPSMode {
      DW_GPS_MODE_UNKNOWN = 0 ,
      DW_GPS_MODE_INVALID_GPS = 1 ,
      DW_GPS_MODE_DEAD_RECKONING = 2 ,
      DW_GPS_MODE_STAND_ALONE = 3 ,
      DW_GPS_MODE_PRECISE_POINT = 4 ,
      DW_GPS_MODE_CODE_DIFFERENTIAL = 5 ,
      DW_GPS_MODE_RTK_FLOAT = 6 ,
      DW_GPS_MODE_RTK_FIXED = 7 ,
      DW_GPS_MODE_PPP_CONVERGING = 8 ,
      DW_GPS_MODE_PPP_CONVERGED = 9 ,
      DW_GPS_MODE_FORCE32 = 0x7FFFFFFF
    }
     The GPS mode gives the status of the GNSS data. More...
     
    enum  dwGPSTimestampQuality {
      DW_GPS_TIMESTAMP_QUALITY_NOT_INIT = 0 ,
      DW_GPS_TIMESTAMP_QUALITY_OK = 1 ,
      DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST = 2 ,
      DW_GPS_TIMESTAMP_QUALITY_FORCE32 = 0x7FFFFFFF
    }
     

    Functions

    DW_API_PUBLIC dwStatus dwSensorGPS_popFrame (dwGPSFrame *const frame, dwSensorHandle_t const sensor)
     Returns any GPS frame previously processed through RAW data stream. More...
     
    DW_API_PUBLIC dwStatus dwSensorGPS_popFrameNew (dwGPSFrameNew *const frame, dwSensorHandle_t const sensor)
     Returns any GPS frame New previously processed through RAW data stream. More...
     
    DW_API_PUBLIC dwStatus dwSensorGPS_processRawData (uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
     Decodes RAW data previously read. More...
     
    DW_API_PUBLIC dwStatus dwSensorGPS_processRawDataNew (uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
     Decodes RAW data previously read. More...
     
    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. More...
     
    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. More...
     

    Data Structure Documentation

    ◆ dwGPSFrame

    struct dwGPSFrame
    Data Fields
    float64_t altitude Altitude over WGS84 ellipsoid [m].
    float64_t climb Vertical speed [m/s].
    float64_t course Course relative to true north [degree].
    uint32_t flags The flags to show which values are valid in this GPS frame.
    dwGPSMode gpsMode GPS mode.
    float64_t hacc Horizontal accuracy [m].
    float64_t hdop Horizontal dilution of precision (HDOP).
    float64_t latitude Latitude [degree].
    float64_t longitude Longitude [degree].
    float64_t speed Horizontal speed [m/s].
    dwTime_t timestamp_us Timestamp of the message when first received [usec].
    char utcDate[16] UTC date as provided in the GPS package [ddmmyy] (null terminated).
    char utcTime[16] UTC time as provided in the GPS package [hhmmss.sss] (null terminated).
    float64_t vacc Vertical accuracy [m].
    float64_t vdop Vertical dilution of precision (VDOP).

    ◆ dwGPSFrameNew

    struct dwGPSFrameNew
    Data Fields
    float64_t altitude
    Note
    ID VS-91040
    description Altitude over WGS-84 ellipsoid.
    min nan max nan
    freq 4 unit m
    float64_t climb
    Note
    ID VS-91070
    description Vertical speed.
    min nan max nan
    freq 4 unit m/s
    float64_t course
    Note
    ID VS-91050
    description Course relative to true north.
    min nan max nan
    freq 4 unit deg
    dwGPSFixStatus fixStatus
    Note
    ID VS-91150
    description 2D or 3D fix.
    TODO: Backend not yet implemented
    min nan max nan
    freq 4 unit -
    *** valid values**: { DW_GPS_FIX_STATUS_NO_FIX, DW_GPS_FIX_STATUS_2D_FIX, DW_GPS_FIX_STATUS_3D_FIX }
    dwGPSMode gpsMode GPS mode.
    float64_t hacc
    Note
    ID VS-91110
    description Horizontal Accuracy of Solution.
    min nan max nan
    freq 4 unit m
    float64_t hdop
    Note
    ID VS-91080
    description Horizontal Dilution of Precision.
    min nan max nan
    freq 4 unit unitless
    float64_t latitude
    Note
    ID VS-91020
    description Latitude in WGS-84.
    min nan max nan
    freq 4 unit deg
    float64_t longitude
    Note
    ID VS-91030
    description Longitude in WGS-84.
    min nan max nan
    freq 4 unit deg
    float64_t pdop
    Note
    ID VS-91100
    description Position Dilution of Precision.
    min nan max nan
    freq 4 unit unitless
    uint8_t reserved[508]
    uint8_t satelliteCount
    Note
    ID VS-91140
    description Number of satellites in view.
    TODO: Backend not yet implemented
    min nan max nan
    freq 4 unit unitless
    float64_t speed
    Note
    ID VS-91060
    description Horizontal speed.
    min nan max nan
    freq 4 unit m/s
    dwTime_t timestamp_us
    Note
    ID VS-91010
    description Timestamp of the message when first received.
    min nan max nan
    freq 4 unit us
    dwGPSTimestampQuality timestampQuality
    Note
    ID VS-91170
    description GNSS Timestamp Quality.
    TODO: Backend not yet implemented
    min nan max nan
    freq 4 unit -
    *** valid values**: { DW_GPS_TIMESTAMP_QUALITY_NOT_INIT, DW_GPS_TIMESTAMP_QUALITY_OK, DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST, }
    dwTime_t utcTime
    Note
    ID VS-91130
    description UTC time.
    min nan max nan
    freq 4 unit us
    float64_t vacc
    Note
    ID VS-91120
    description Vertical Accuracy of Solution.
    min nan max nan
    freq 4 unit m
    struct dwGPSFrameNew.validityInfo validityInfo
    float64_t vdop
    Note
    ID VS-91090
    description Vertical Dilution of Precision.
    min nan max nan
    freq 4 unit unitless

    ◆ dwGPSFrameNew.validityInfo

    struct dwGPSFrameNew.validityInfo

    Enumeration Type Documentation

    ◆ dwGPSFixStatus

    GPS satellite fix status.

    Enumerator
    DW_GPS_FIX_STATUS_NO_FIX 

    No fix.

    DW_GPS_FIX_STATUS_2D_FIX 

    2D fix

    DW_GPS_FIX_STATUS_3D_FIX 

    3D fix

    DW_GPS_FIX_STATUS_FORCE32 

    Definition at line 156 of file GPS.h.

    ◆ dwGPSFlags

    enum dwGPSFlags

    Each flag shows if that value is valid in this GPS frame.

    Enumerator
    DW_GPS_LAT 

    Value of dwGPSFrame.latitude is valid.

    DW_GPS_LON 

    Value of dwGPSFrame.longitude is valid.

    DW_GPS_ALT 

    Value of dwGPSFrame.altitude is valid.

    DW_GPS_COURSE 

    Value of dwGPSFrame.course is valid.

    DW_GPS_SPEED 

    Value of dwGPSFrame.speed is valid.

    DW_GPS_CLIMB 

    Value of dwGPSFrame.climb is valid.

    DW_GPS_HDOP 

    Value of dwGPSFrame.hdop is valid.

    DW_GPS_VDOP 

    Value of dwGPSFrame.vdop is valid.

    DW_GPS_HACC 

    Value of dwGPSFrame.hacc is valid.

    DW_GPS_VACC 

    Value of dwGPSFrame.vacc is valid.

    DW_GPS_MODE 

    Value of dwGPSFrame.gpsMode is valid.

    Definition at line 61 of file GPS.h.

    ◆ dwGPSMode

    enum dwGPSMode

    The GPS mode gives the status of the GNSS data.

    Note that modes 1-7 are increasing in accuracy. Modes 8 and 9 are not quite as good as 6 and 7, respectively.

    Enumerator
    DW_GPS_MODE_UNKNOWN 

    GPS mode unknown. The device cannot or has not reported the mode.

    DW_GPS_MODE_INVALID_GPS 

    GPS mode invalid. This GPS data cannot be used.

    DW_GPS_MODE_DEAD_RECKONING 

    GPS mode dead reckoning. Device relying on IMU alone for updates.

    DW_GPS_MODE_STAND_ALONE 

    GPS mode stand alone. No RTK or PPP correction.

    DW_GPS_MODE_PRECISE_POINT 

    GPS mode precise point. No RTK or PPP correction.

    DW_GPS_MODE_CODE_DIFFERENTIAL 

    GPS mode code differential. No RTK or PPP correction.

    DW_GPS_MODE_RTK_FLOAT 

    GPS mode RTK float.

    DW_GPS_MODE_RTK_FIXED 

    GPS mode RTK fixed. This is the highest accuracy mode.

    DW_GPS_MODE_PPP_CONVERGING 

    GPS mode PPP converging. Using PPP, but solution has not finished converging, so the data is not yet as accurate as it can be.

    DW_GPS_MODE_PPP_CONVERGED 

    GPS mode PPP converged. Most accurate mode for using PPP.

    DW_GPS_MODE_FORCE32 

    Definition at line 79 of file GPS.h.

    ◆ dwGPSTimestampQuality

    Enumerator
    DW_GPS_TIMESTAMP_QUALITY_NOT_INIT 

    Not Initialized. still initializing.

    DW_GPS_TIMESTAMP_QUALITY_OK 

    Normal Operation. Functional and Electrical Checks Passed.

    DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST 

    Synchronization lost.

    DW_GPS_TIMESTAMP_QUALITY_FORCE32 

    Definition at line 166 of file GPS.h.

    Function Documentation

    ◆ dwSensorGPS_popFrame()

    DW_API_PUBLIC dwStatus dwSensorGPS_popFrame ( dwGPSFrame *const  frame,
    dwSensorHandle_t const  sensor 
    )

    Returns any GPS frame previously processed through RAW data stream.

    This happens on the CPU thread where the function is called, incurring an additional load on that thread.

    Parameters
    [out]framePointer to an GPS frame structure to be filled with new data.
    [in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid.
    DW_INVALID_ARGUMENTS - if given arguments are invalid.
    DW_NOT_AVAILABLE - if no more data is available
    DW_SUCCESS

    ◆ dwSensorGPS_popFrameNew()

    DW_API_PUBLIC dwStatus dwSensorGPS_popFrameNew ( dwGPSFrameNew *const  frame,
    dwSensorHandle_t const  sensor 
    )

    Returns any GPS frame New previously processed through RAW data stream.

    This happens on the CPU thread where the function is called, incurring an additional load on that thread.

    Parameters
    [out]framePointer to an GPS frame New structure to be filled with new data.
    [in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid.
    DW_INVALID_ARGUMENTS - if given arguments are invalid.
    DW_NOT_AVAILABLE - if no more data is available
    DW_SUCCESS

    ◆ dwSensorGPS_processRawData()

    DW_API_PUBLIC dwStatus dwSensorGPS_processRawData ( uint8_t const *const  data,
    size_t const  size,
    dwSensorHandle_t const  sensor 
    )

    Decodes RAW data previously read.

    Any processed messages can be picked up using the dwSensorGPS_popMessage() method. This happens on the CPU thread where the function is called, incurring on additional load on that thread.

    Parameters
    [in]dataUndecoded gps data.
    [in]sizeSize in bytes of the raw data.
    [in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid,
    DW_INVALID_ARGUMENTS - if given arguments are invalid,
    DW_NOT_READY - if more data needs to be passed in (loop while it returns 'DW_NOT_READY').
    DW_SUCCESS

    ◆ dwSensorGPS_processRawDataNew()

    DW_API_PUBLIC dwStatus dwSensorGPS_processRawDataNew ( uint8_t const *const  data,
    size_t const  size,
    dwSensorHandle_t const  sensor 
    )

    Decodes RAW data previously read.

    Any processed messages can be picked up using the dwSensorGPS_popMessageNew() method. This happens on the CPU thread where the function is called, incurring on additional load on that thread.

    Parameters
    [in]dataUndecoded gps data.
    [in]sizeSize in bytes of the raw data.
    [in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid,
    DW_INVALID_ARGUMENTS - if given arguments are invalid,
    DW_NOT_READY - if more data needs to be passed in (loop while it returns 'DW_NOT_READY').
    DW_SUCCESS

    ◆ dwSensorGPS_readFrame()

    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.

    The method blocks until either a new valid frame is received from the sensor or the given timeout exceeds.

    Parameters
    [out]frameA pointer to a GPS frame structure to be filled with new localization data.
    [in]timeoutUsSpecifies the timeout in us to wait for a new message. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
    [in]sensorSpecifies the sensor handle of the GPS sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid.
    DW_INVALID_ARGUMENTS - if given arguments are invalid.
    DW_TIME_OUT - if operation has timeout.
    DW_NOT_AVAILABLE - if sensor has not been started or data is not available in polling mode.
    DW_END_OF_STREAM - if end of stream reached (virtual sensor only).
    DW_SAL_SENSOR_ERROR - if there was an i/o or bus error.
    DW_SUCCESS

    ◆ dwSensorGPS_readFrameNew()

    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.

    The method blocks until either a new valid frame is received from the sensor or the given timeout exceeds.

    Parameters
    [out]frameA pointer to a GPS frame New structure to be filled with new localization data.
    [in]timeoutUsSpecifies the timeout in us to wait for a new message. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
    [in]sensorSpecifies the sensor handle of the GPS sensor previously created with 'dwSAL_createSensor()'.
    Returns
    DW_INVALID_HANDLE - if given sensor handle is invalid.
    DW_INVALID_ARGUMENTS - if given arguments are invalid.
    DW_TIME_OUT - if operation has timeout.
    DW_NOT_AVAILABLE - if sensor has not been started or data is not available in polling mode.
    DW_END_OF_STREAM - if end of stream reached (virtual sensor only).
    DW_SAL_SENSOR_ERROR - if there was an i/o or bus error.
    DW_SUCCESS
    人人超碰97caoporen国产