GNSS

wonderful introduction on GNSS

stations that broadcast real time RTCM (protocol) Radio Technical Commission for Maritime

ubxtool examples

NEO-M9N

ZED-F9P

ntrip caster

https://gitlab.com/ihfazhillah/simple-ntrip-caster/-/tree/master

test caster, must return source table

curl http://192.168.2.50:2101

ntrip base station

configure ublox

systemctl stop gpsd
systemctl stop gpsd.socket
DEVICE=/dev/gps0
ubxtool -f $DEVICE -p RESET
ubxtool -f $DEVICE -e BINARY
# set automotive model
ubxtool -f $DEVICE -p MODEL,4
ubxtool -f $DEVICE -p SAVE

ntrip source

str2str -in serial://ttyACM0:115200:8:n:1:#stq -out ntrips://:mev@localhost:2101/AB0#rtcm2 -p 45.4935250 011.1068889 421 -msg "1004,1006,1019,1033,1012,1030"
str2str -in serial://ttyACM0:115200#ubx -out ntrips://:PASSWORD@rtk2go.com:2101/MEV0#rtcm3 -p 45.4935250 011.1068889 421

GPS

gpsd -N -n -D3 /dev/gps0 # no -b option
# with DGPS
gpsd -N -n -D3 /dev/gps0 ntrip://NTRIP.itsware.net:2101/AB50_RTCM3
psd -N -n -D1 /dev/gps0 ntrip://rtk2go.com:2101/MEV0

ubxtool -p MON-VER
UBX-MON-VER:
swVersion EXT CORE 1.00 (61b2dd)
hwVersion 00190000
extension ROM BASE 0x118B2060
extension FWVER=HPG 1.12
extension PROTVER=27.11
extension MOD=ZED-F9P
extension GPS;GLO;GAL;BDS
extension QZSS
export UBXOPTS="-P 27.11 -v 2"
ubxtool -p RESET
ubxtool -e BINARY
ubxtool -d NMEA

get current dynamic mode

ubxtool -p CFG-NAV5
...
dynModel (Portable)
...
# or
ubxtool -p CFG-NAV5 | grep dynModel

switch model to automotive

ubxtool -p MODEL,4

udev

#SUBSYSTEMS=="usb", DRIVERS=="usb", ACTION=="add", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a9", SYMLINK+="gps0", MODE="0666" ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a9", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"
START_DAEMON="false" # binary mode for ublox GPSD_OPTIONS="-b" DEVICES="" USBAUTO="true"

test

https://gpsd.gitlab.io/gpsd/ppp-howto.html

gpsd -b -N /dev/ttyACM0
gpspipe -r | nc -l 29999

yay -S qt5-location

qml

import QtQuick 2.1
import QtQuick.Window 2.0
import QtPositioning 5.5
import QtLocation 5.6
Window {
id:page
width: 1024
height: 1024
visible: true
Map {
id:myMap
anchors.fill: parent
plugin: mapPlugin
zoomLevel: 23
property MapCircle circle
function update(pos) {
removeMapItem(circle);
circle = Qt.createQmlObject('import QtLocation 5.3; MapCircle {}', page);
circle.radius = 2;
circle.color = "transparent";
circle.border.color = "red"
circle.border.width = 3;
myMap.addMapItem(circle);
circle.center = pos.coordinate;
myMap.center = pos.coordinate;
//console.log("Coordinates: ", pos.coordinate.latitude, pos.coordinate.longitude);
}
}
Plugin {
id: mapPlugin
name: "osm"
}
PositionSource {
id: gpsPos
updateInterval: 500
active: true
nmeaSource: "socket://localhost:29999"
onPositionChanged: {
myMap.update(position);
}
}
}