This Docker image provides a convenient setup for running RTKLIB and NTRIPSERVER with support for ONOCOY and RTKDIRECT services.
The image follows the guides we created for the individual services. If you'd like to do this manually, without Docker, please read the articles listed below:
- ONOCOY GPS/GNSS Receiver Basestation on a Budget
- DIY RTKDirect Reference Station Guide
- Triple Mining Geodnet, Onocoy, and RTKDirect GPS Revolution
Follow the instructions below to use this image effectively.
Before using this Docker image, make sure you have the following prerequisites installed on your system:
- Docker: Install Docker
- Docker Compose (optional): Install Docker Compose if you prefer using Docker Compose for managing containers.
For recommended hardware for this project please read the following:
- Triple Mining Geodnet, Onocoy, and RTKDirect GPS Revolution - Hardware Requirements
- Unveiling the Best GPS Antennas for Onocoy and Geodnet
- Affordable Precision Positioning GNSS Modules
-
Pull the Docker Image
Pull the latest version of the Docker image from Docker Hub:
docker pull simeononsecurity/docker-rtklib-onocoy-rtkdirect:latest
-
Run the Docker Container
Run the Docker container, ensuring that you provide the necessary environment variables and parameters:
You don't have to specify both Onocoy and RTKDirect credentials. The backend script is smart and looks to see if they have been set. You can use one or both and this should function perfectly.
If the environment variable
ONOCOY_USE_NTRIPSERVER
orRTKDIRECT_USE_NTRIPSERVER
is specified, the docker container will use NTRIPSERVER for Onocoy or RTKDirect respectively, otherwise it'll use RTKLIB for the connection to Onocoy and/or RTKDirect. The container will still use RTKLIB for the splitting of the feed no matter what.LAT
,LONG
,ELEVATION
,INSTRAMENT
, andANTENNA
are all optional and are only used if RTKLIB is being used and NTRIPSERVER is not.You may specify
TCP_OUTPUT_PORT
to change the tcp server's output port if using docker's host networking mode. Otherwise use the appropriate docker port mappings.You can host any RTKLIB or tcp server instance on another machine and retreive the data using our dockers tcp client mode by defining
TCP_INPUT_IP
andTCP_INPUT_PORT
. In which you'll specify your tcp servers ip and port.Note: Always consult your receiver manufactures documentation to get the correct serial connection information such as
baud rate
,data bits
,partity
, andstop bits
.Known Default Serial Settings for the Following GPS Receivers
GPS Receiver Baud Rate (bps) Data Bits Parity Stop Bits UM980 115200 8 None 1 UM982 115200 8 None 1 Bynav M20 115200 8 None 1 Bynav M21 115200 8 None 1 Ublox F9P 38400 8 None 1 Ublox M8* 9600 8 None 1 docker run \ -td \ --restart unless-stopped \ --name sosrtk \ --device=/dev/<YOUR_USB_PORT> \ -e USB_PORT=<YOUR_USB_PORT> \ -e BAUD_RATE=<YOUR_SERIAL_BAUD_RATE> \ -e DATA_BITS=<YOUR_SERIAL_DATA_BITS> \ -e PARITY=<YOUR_SERIAL_PARITY> \ -e STOP_BITS=<YOUR_SERIAL_STOP_BITS> \ -e ONOCOY_USERNAME=<YOUR_ONOCOY_MOUNTPOINT_USERNAME> \ -e ONOCOY_PASSWORD=<YOUR_ONOCOY_MOUNTPOINT_PASSWORD> \ -e RTKDIRECT_MOUNTPOINT=<YOUR_RTKDIRECT_MOUNTPOINT> \ -e RTKDIRECT_USERNAME=<YOUR_RTKDIRECT_MOUNTPOINT_USERNAME> \ -e RTKDIRECT_PASSWORD=<YOUR_RTKDIRECT_MOUNTPOINT_PASSWORD> \ -e LAT=<OPTIONAL_YOUR_LATITUDE> \ -e LONG=<OPTIONAL_YOUR_LONGITUDE> \ -e ELEVATION=<OPTIONAL_YOUR_ELEVATION_FROM_SEA_LEVEL_IN_METERS> \ -e INSTRUMENT=<OPTIONAL_YOUR_GPS_RECEIVER_DESCRIPTION> \ -e ANTENNA=<OPTIONAL_YOUR_ANTENNA_DESCRIPTION> \ simeononsecurity/docker-rtklib-onocoy-rtkdirect:latest
Ensure you replace the placeholder values (
<...>
) with your specific configuration.Ex.
docker run \ -td \ --restart unless-stopped \ --name sosrtk \ --device=/dev/ttyUSB0 \ -e USB_PORT=ttyUSB0 \ -e BAUD_RATE=921600 \ -e DATA_BITS=8 \ -e PARITY=n \ -e STOP_BITS=1 \ -e ONOCOY_MOUNTPOINT=YOUR_ONOCOY_MOUNTPOINT \ -e ONOCOY_USERNAME=YOUR_ONOCOY_MOUNTPOINT_USERNAME \ -e ONOCOY_PASSWORD=YOUR_ONOCOY_MOUNTPOINT_PASSWORD \ -e RTKDIRECT_MOUNTPOINT=YOUR_RTKDIRECT_MOUNTPOINT \ -e RTKDIRECT_USERNAME=YOUR_RTKDIRECT_MOUNTPOINT_USERNAME \ -e RTKDIRECT_PASSWORD=YOUR_RTKDIRECT_MOUNTPOINT_PASSWORD \ -e LAT=37.7749 \ -e LONG=-122.4194 \ -e ELEVATION=50 \ -e INSTRUMENT="Your GPS Receiver" \ -e ANTENNA="Your Antenna" \ --log-driver json-file \ --log-opt max-file=5 \ --log-opt max-size=10m \ simeononsecurity/docker-rtklib-onocoy-rtkdirect:latest
-
Monitor Logs
Monitor the container logs to check for any issues or to observe the RTKLIB operation:
docker logs sosrtk
-
Customize Configuration
If needed, you can customize the
docker-init.sh
script and rebuild the Docker image with your changes.
If you prefer using Docker Compose, create a docker-compose.yml
file with your desired configuration and run:
docker-compose up -d
This will start the container in detached mode.
- Ensure that your system allows access to the specified USB port and that the necessary permissions are set.
- Adjust environment variables according to your specific requirements.
Now you have a Dockerized RTKLIB setup with ONOCOY and RTKDIRECT support. Customize the configuration based on your needs and enjoy precise real-time kinematic positioning!
This script sets up environment variables, configures str2str
commands based on specified parameters, and runs them in the background.
Feel free to customize the script and Dockerfile to meet your specific RTKLIB configuration requirements.