Site Tools


GPS Feature

The GPS Signal can be obtained and used via different ways:

  • Webinterface
  • GPS over IP
  • cli status interface
  • inside of SDK Skripts
  • SNMP

Webinterface

The Webinterface gives you access to the GPS Data. This can be suitable to have a quick look on the current status of a vehicle.

Status Page

Via Status→GNSS you will see this Overview

Interface Page

Via Interfaces→GNSS you will see this Map

Data format NMEA-0183

source: http://freenmea.net/docs

NMEA-0183 prefixes (Talker IDs) NMEA protocol can be sent by different equipment. It can be identified by so called Talker Id. Most known one is, of course $GP_ - GPS.

  • GA - Galileo
  • GL - GLONASS Receiver
  • GP - Global Positioning System (GPS)
  • GN - Global Navigation Satellite System (GNSS), combined services

GPS over IP

We use version 3.9 of gpsd as a GPS via IP Daemon

We support the following modes:

  • on request (clients must send R after connect to get NMEA frames)
  • in raw mode (clients are served directly with NMEA frames after connection)
  • in super raw mode (clients are served directly with NMEA frames after connection)
  • in JSON mode (the new JSON interface is provided to clients after connection)
// get JSON
?WATCH={'enable':true,'json':true}
// get NMEA
?WATCH={'enable':true,'json':false}
?WATCH={'enable':true,'nmea':true}
?WATCH={'enable':true}

For more information on the new JSON interface see http://www.catb.org/gpsd/client-howto.html

… “”“”“”“”“”“”“”“” “”“” “”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“” “”“”“”“”“”“”“”“”“”“” “” “”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“” “”“”“”“”“”“”“”“”“”“”

Clients

Linux clients are cgps, gpsmon and gpspipe. You can install them via apt-get install gpsd-clients

To see the NMEA Data you can also use any telnet emulator of your choice: putty, hyperterminal etc.

cli status interface

The Command Line Interface can be used via telnet, ssh or serial terminal access.

With the command “cli status gnss” you will seethe current gps data.

To have it in the right format for using inside of scripts (bash, python etc.) you can use the parameter “-s”

“” “” “” “” “” “” “” “” “” “” “” “” “” “” “”

SDK Scripts

Within the SDK you can reach the gps data by requesting the status parameter as in the cli example or you can retrieve the data from the gps over IP daemon to distribute it further.

Cli data can be retrieved as follows:

status=nb_status("gnss");
dump(status);

Result:

struct(15): {
  .GNSS1_MODULE_TYPE = string[5]: "me909"
  .GNSS1_MODULE_INFO = string[126]: "Manufacturer: Huawei Technologies Co., Ltd.  Model: ME909u-521  Revision: 11.235.07.00.00  IMEI: 860461024127634  +GCAP: +CGSM"
  .GNSS1_LONGITUDE = string[8]: "8.572821"
  .GNSS1_HDOP = string[4]: "6.00"
  .GNNS1_SYSTEM = string[3]: "GPS"
  .GNSS1_VDOP = string[4]: "0.90"
  .GNSS1_LATITUDE = string[9]: "50.134294"
  .GNNS1_LAST_FIX = string[19]: "2016-05-08 03:42:16"
  .GNSS1_ALTITUDE = string[6]: "146.90"
  .GNSS1_PDOP = string[4]: "6.00"
  .GNSS1_SATELLITES_USED = string[1]: "4"
  .GNSS1_VERTICAL_SPEED = string[5]: "0.000"
  .GNSS1_SATELLITES_INVIEW = string[2]: "12"
  .GNSS1_SIGNAL = string[7]: "present"
  .GNSS1_HORIZONTAL_SPEED = string[5]: "0.000"
}

SNMP

It's possible to poll the postition via SNMP. You will find the entries “gnssLat” latitude and “gnssLon” longitude in the private MIB. Please be aware that the update interval will be 3s.

Example Scripts