Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
The folder contains the relay client
It has three files
1. The rtkrcv.conf used by rtkrcv. The configuration file specifies that rtkrcv publish the received information over a tcp port (specified in the conf file)
2. The python code to relay the received information to an mqtt broker
3. The requirements.txt used to create the python environment.
## RTKRCV Installation
Please place the rtkrcv binary in this folder. The steps for creating the binary are as follows.
- Download the source repository of rtklib at https://github.com/tomojitakasu/RTKLIB
+ This code has been tested with RTKLIB version 2.4.3 b33
+ https://github.com/tomojitakasu/RTKLIB/archive/v2.4.3-b33.tar.gz
- Extract the tar ball. This should create a folder named in RTKLIB-2.4.3-b33
- Perform the following steps to create the rtkrcv binary.
```
cd RTKLIB-2.4.3-b33/app
make
cd -
```
- Note that the above steps requires build-essential packages (if it is not previously installed). Also you will notice some warning during the compilation phase.
- Create a link to the binary in this directory. This is done to avoid specifying the path of the rtkrcv.conf
```
ln -s RTKLIB-2.4.3-b33/app/rtkrcv/gcc/rtkrcv .
```
## Mosquitto Broker Installation
Install the mosquitto broker and disable the mosquitto service if we want to run it on a specifi port.
```
apt install mosquitto
systemctl disable mosquitto
```
## Python environment for rtcm3\_relay
Create a python environment where paho-mqtt is installed. This code was tested using python 3.8
Create a venv folder in this directory.
```
python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
- You might see some errors about bdist\_wheel which can be ignored.
Now open three terminals (as persistent screen [https://www.gnu.org/software/screen/] ) on the server.
- On one screen start the
./rtkrcv
> start - use this command if you want to start the rtkrcv
> stop - for stopping the rtkrcv
> shutdown - for quitting
- On the second screen start mosquitto -p <portnumber>. We use 8883 because that port is open on our server for incoming connections
```
mosquitto -p 8883
```
- On the third screen run rtcm\_relay.py
```
#> python rtcm_relay.py -r localhost -p 11235 -h localhost -b localhost -m 8883
```