# Add GPS

{% embed url="<https://www.rdforum.org/threads/107511/post-1568774>" %}

<mark style="color:green;">`sudo bash -c "$(curl -L -o - https://jbv1.cc/carputer/jbv1-carputer-gps.sh)"`</mark>

<mark style="color:green;">`sudo systemctl edit --full gpsd.socket`</mark>

Insert a # before ListenStream=127.0.0.1:2947, and then add a new ListenStream line right below it:

```
#ListenStream=127.0.0.1:2947
ListenStream=0.0.0.0:2947
```

Type Ctrl-X, Y, and then Enter to save your changes.

*<mark style="color:orange;">NTP changes go here</mark>*

Plug in the GPS module to one of your carputer's USB ports, and then:

<mark style="color:green;">`sudo reboot`</mark>

After 30 seconds or so, reconnect with ssh and test your GPS:

<mark style="color:green;">`cgps -s`</mark>

It might take a while to get the first fix on a brand-new GPS module, so give it some time.  Eventually you should see something like this:

```
┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2021-02-23T17:52:18.250Z   ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    xx.xxxxxxxx N             ││   3    06    216    36      Y   │
│    Longitude:   xx.xxxxxxxx W             ││   4    68    215    37      Y   │
│    Altitude:   470.144 ft                 ││   7    22    302    26      Y   │
│    Speed:      0.07 mph                   ││   8    38    182    35      Y   │
│    Heading:    0.0 deg (true)             ││   9    51    296    29      Y   │
│    Climb:      0.00 ft/min                ││  16    55    036    29      Y   │
│    Status:     3D DIFF FIX (18 secs)      ││  27    61    127    40      Y   │
│    Longitude Err:   +/- 7 ft              ││  31    08    105    18      Y   │
│    Latitude Err:    +/- 9 ft              ││ 133    23    244    39      Y   │
│    Altitude Err:    +/- 34 ft             ││ 138    39    223    30      Y   │
│    Course Err:      n/a                   ││  18    02    054    00      N   │
│    Speed Err:       +/- 51 mph            ││  26    28    054    00      N   │
│    Time offset:     0.058                 ││                                 │
│    Grid Square:     AB01xy                ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘
```

When you see the time changing at the top of the box on the left, your GPS is working!
