Go grab a coffee, it's gonna take a while. The script will install the needed software, and if you use a Usb-connected U-Blox ZED-F9P receiver, it'll be detected and set to work as a base station. If you don't use a F9P, you will have to configure your receiver manually (see step 7 in manual installation), and choose the correct port from the settings page.
Open a web browser to http://ip_of_your_sbc (the script will try to show you this ip address). Default password is admin. The settings page allows you to enter your own settings for the base coordinates, ntrip credentials and so on...
If you don't already know your base precise coordinates, it's time to read one of these tutorials:
The install.sh script can be used without the --all option to split the installation process into several different steps:
$ ./install.sh --help
################################
RTKBASE INSTALLATION HELP
################################
Bash script to install a simple gnss base station with a web frontend.
* Before install, connect your gnss receiver to raspberry pi/orange pi/.... with usb or uart.
* Running install script with sudo
sudo ./install.sh
Options:
--all
Install all dependencies, Rtklib, last release of Rtkbase, gpsd, chrony, services,
crontab jobs, detect your GNSS receiver and configure it.
--dependencies
Install all dependencies like git build-essential python3-pip ...
--rtklib
Clone RTKlib 2.4.3 from github and compile it.
https://github.com/tomojitakasu/RTKLIB/tree/rtklib_2.4.3
--rtkbase-release
Get last release of RTKBASE:
https://github.com/Stefal/rtkbase/releases
--rtkbase-repo
Clone RTKBASE from github:
https://github.com/Stefal/rtkbase/tree/web_gui
--unit-files
Deploy services.
--gpsd-chrony
Install gpsd and chrony to set date and time
from the gnss receiver.
--detect-usb-gnss
Detect your GNSS receiver.
--configure-gnss
Configure your GNSS receiver.
--start-services
Start services (rtkbase_web, str2str_tcp, gpsd, chrony)
So, if you really want it, let's go for a manual installation with some explanations:
Install dependencies with sudo ./install.sh --dependencies, or do it manually with:
Install the systemd services with sudo ./install.sh --unit-files, or do it manually with:
Edit them (rtkbase/unit/) to replace {user} with your username.
If you log the raw data inside the base station, you may want to compress these data and delete the too old archives. archive_and_clean.sh will do it for you. The default settings compress the previous day data and delete all archives older than 90 days. To automate these 2 tasks, enable the rtkbase_archive.timer. The default value runs the script every day at 04H00.
Copy these services to /etc/systemd/system/ then enable the web server, str2str_tcp and rtkbase_archive.timer:
Edit the chrony unit file. You should set After=gpsd.service
Install a gpsd release >= 3.2 or it won't work with a F9P. Its conf file should contains:
# Devices gpsd should connect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="tcp://127.0.0.1:5015"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n -b"
Edit the gpsd unit file. You should have something like this in the "[Unit]" section:
Connect your gnss receiver to raspberry pi/orange pi/.... with usb or uart, and check which com port it uses (ttyS1, ttyAMA0, something else...). If it's a U-Blox usb receiver, you can use sudo ./install.sh --detect-usb-gnss. Write down the result, you may need it later.
If you didn't have already configure your gnss receiver, you must set it to output raw data:
Everything should be ready, now you can open a web browser to your base station ip address.
How it works:
RTKBase use several RTKLIB str2str instances started with run_cast.sh as systemd services. run_cast.sh gets its settings from settings.conf
str2str_tcp.service is the main instance. It is connected to the gnss receiver and broadcast the raw data on TCP for all the others services.
str2str_ntrip.service get the data from the main instance, convert the data to rtcm and stream them to a Ntrip caster.
str2str_local_ntrip_caster.service get the data from the main instance, convert the data to rtcm, and act as a local Ntrip caster.
str2str_rtcm_svr.service get the data from the main instance, convert the data to rtcm and stream them to clients
str2str_rtcm_serial.service get the data from the main instance, convert the data to rtcm and stream them to a serial port (radio link, or other peripherals)
str2str_file.service get the data from the main instance, and log the data to files.
The web GUI is available when the rtkbase_web service is running.
Advanced:
Aerial images:
The default map background is OpenStreetMap, but you can switch to a worldwide aerial layer if you have a Maptiler key. To enable this layer, create a free account on Maptiler, create a key and add it to settings.conf inside the [general] section:
maptiler_key=your_key
Receiver options: str2str accept some receiver dependent options. If you use a U-Blox, the -TADJ=1 parameter is recommended as a workaround to non-rounded second values in Rtcm and Ntrip outputs. You can enter this parameter inside the settings forms. More information here and here.
Development release:
If you want to install RTKBase from the dev branch, you can do it with these commands:
A gnss receiver with a timepulse output is a very accurate stratum 0 clock thus, your gnss base station could act as a stratum 1 ntp peer for your local network and/or the ntp pool. There are a few steps to do this:
Connect the timepulse output + GND to some GPIO inputs on your SBC.
Configure this input as PPS in your operating system.
Raspberry Pi example:
Inside /boot/config.txt, add dtoverlay=pps-gpio,gpiopin=18 on a new line. '18' is the input used for timepulse.
Inside /etc/modules, add pps-gpio on a new line, if it is not already present.
Orange Pi Zero example, inside /boot/armbianEnv.txt:
Add pps-gpio to the overlays line.
One a new line, add param_pps_pin=PA19 <- change 'PA19' to your input.
Set gpsd and chrony to use PPS
gpsd: comment the DEVICE line in /etc/defaut/gpsd and uncomment #DEVICES="tcp:\\127.0.0.1:5015 \dev\pps0
chrony: inside /etc/chrony/chrony.conf uncomment the refclock pps line and add noselect to the 'refclock SHM 0`. You should have something like this:
请发表评论