Transclusion: IOT-GATE-iMX8: GPS

From Compulab Mediawiki
Jump to: navigation, search

Optional GPS interface is implemented with the cellular modem module.
The cgps client can be used to display the GPS information. The cgps client utility depends on the gpsd daemon (starts automatically).

  • Select the GPS interface:
root@iot-gate-imx8:~# sed -i "/^DEVICES=.*/c\DEVICES=\"/dev/ttyUSB1\"" /etc/default/gpsd
  • Enable the GPS with the following AT commands:
root@iot-gate-imx8:~# echo AT+CGPS=0,1 | socat - /dev/ttyUSB3,crnl
root@iot-gate-imx8:~# echo AT+CGPS=1,1 | socat - /dev/ttyUSB3,crnl
  • Start the cgps client to display GPS information.

The synchronization process might take a few minutes.

root@iot-gate-imx8:~# cgps
┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2020-05-04T14:13:30.000Z   ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    32.65985123 N             ││  71    29    123    22      Y   │
│    Longitude:   35.10027205 E             ││  85    27    047    22      Y   │
│    Altitude:   102.700 m                  ││                                 │
│    Speed:      0.00 kph                   ││                                 │
│    Heading:    128.7 deg (true)           ││                                 │
│    Climb:      6.00 m/min                 ││                                 │
│    Status:     3D FIX (53 secs)           ││                                 │
│    Longitude Err:   n/a                   ││                                 │
│    Latitude Err:    n/a                   ││                                 │
│    Altitude Err:    +/- 18 m              ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       n/a                   ││                                 │
│    Time offset:     -3.682                ││                                 │
│    Grid Square:     KM72np                ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘