# gnss

Source: [https://docs.qualcomm.com/doc/80-41102-4/topic/gnss.html](https://docs.qualcomm.com/doc/80-41102-4/topic/gnss.html)

Use the GLobal Navigation Satellite System (GNSS) `gnss` tool to monitor and debug a GNSS target device.

## Usage

`gnss [commands]`

    gnss <enable/disable>
    gnss <start/stop>
    gnss restart <RestartType>
    gnss fix [FixTime in seconds]
    gnss get <parameter>
    gnss get posInfo
    gnss set constellation <ConstellationType>
    gnss set agpsMode <ModeType>
    gnss set acqRate <acqRate in milliseconds>
    gnss set nmeaSentences <nmeaMask>
    gnss watch [WatchPeriod in seconds]
    gnss helpCopy to clipboard

- `gnss <enable/disable>`
          
    Enable/disable gnss device.
- `gnss <start/stop>`
          
    Start/stop gnss device.
- `gnss restart <RestartType>`
          
Restart gnss device. Allowed when device in 'active' state. Restart type can be:
    - hot
    - warm
    - cold
    - factory
- `gnss fix [FixTime in seconds]`
          
    Loop for certain time for first position fix. FixTime is optional. Default time (60s) will be used if not specified.
- `gnss get <parameter>`
          
Used to get different gnss parameters:
    - ttff: Time to First Fix (milliseconds)
    - acqRate: Acquisition Rate (unit milliseconds)
    - agpsMode: Agps Mode
    - nmeaSentences: Enabled NMEA sentences (bit mask)
    - constellation: GNSS constellation
    - posState: Position fix state(no fix, 2D, 3D etc)
    - loc2d: 2D location (latitude, longitude, horizontal accuracy)
    - alt: Altitude (Altitude, Vertical accuracy)
    - loc3d: 3D location (latitude, longitude, altitude, horizontal accuracy, vertical accuracy)
    - gpsTime: Get last updated gps time
    - time: Time of the last updated location
    - timeAcc: Time accuracy in milliseconds
    - date: Date of the last updated location
    - hSpeed : Horizontal speed(Horizontal Speed, Horizontal Speed accuracy)
    - vSpeed : Vertical speed(Vertical Speed, Vertical Speed accuracy)
    - motion: Motion data (Horizontal Speed, Horizontal Speed accuracy, Vertical Speed, Vertical Speed accuracy)
    - direction: Direction indication
    - satInfo: Satellites Vehicle information
    - satStat: Satellites Vehicle status
    - dop: Dilution Of Precision for the fixed position
    - posInfo: Get all current position info of the device.
    - status: Get gnss device's current status.
- `gnss set constellation <ConstellationType>`
          
    Used to set constellation. Allowed when device in 'ready' state. May require platform reboot.

ConstellationType can be:
    - 1: GPS
    - 2: GLONASS
    - 4: BEIDOU
    - 8: GALILEO

    Use sum of the values to set multiple constellation, e.g., 3 for GPS+GLONASS 15 for GPS+GLONASS+BEIDOU+GALILEO.
- `gnss set agpsMode <ModeType>`
          
Used to set agps mode. ModeType can be:
    - alone: Standalone agps mode
    - msBase: MS-based agps mode
    - msAssist: MS-assisted agps mode
- `gnss set acqRate <acqRate in milliseconds>`
          
    Used to set acquisition rate. Available when device is 'ready' state.
- `gnss set nmeaSentences <nmeaMask>`
          
    Used to set the enabled NMEA sentences. Bit mask should be set with hexadecimal values (e.g., 7FFF).
- `gnss watch [WatchPeriod in seconds]`
          
    Used to monitor all gnss information (position, speed, satellites used, etc.). WatchPeriod is optional. Default time (600s) will be used if not specified.
- `gnss help`
          
    Display help.

Note: Some commands require the gnss target to be in specific state (and platform reboot).

**Parent Topic:** [Target Tools](https://docs.qualcomm.com/doc/80-41102-4/topic/Target-Tools.html)

Last Published: Jan 13, 2025

[Previous Topic
inspect](https://docs.qualcomm.com/bundle/publicresource/80-41102-4/topics/inspect.md) [Next Topic
log](https://docs.qualcomm.com/bundle/publicresource/80-41102-4/topics/log.md)