tips:gnss

GNSS

Use gpsd as ntrip client on ublox device

pygnssutils

Configure ublox as base station and run an rtrip server with PyGPSClient

sourcetable.dat

CAS;rtcm-ntrip.org;2101;NtripInfoCaster;BKG;0;DEU;50.12;8.69;http://www.rtcm-ntrip.org/home
STR;castagne;Verona;RTCM3;none;1;none;TEST;ITA;45.4935250;11.1068889;421;0;receiver5;none;B;N;3600;none

test caster, must return source table

curl http://192.168.2.50:2101

configure ublox in NMEA

systemctl stop gpsd
systemctl stop gpsd.socket

DEVICE=/dev/gps0
ubxtool -f $DEVICE -p RESET
ubxtool -f $DEVICE -e NMEA
ubxtool -f $DEVICE -d BINARY
ubxtool -f $DEVICE -p SAVE

ntrip source

str2str -in 'serial://ttyACM0:115200#stq' -out 'ntrips://:mev@localhost:2101/castagne#rtcm2' -p 45.4935250 011.1068889 421 -msg "1004,1006,1019,1033,1012,1030"

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 -e 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
ubxtool -p SAVE
/etc/udev/rules.d/91-ubox.rules
#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"
/etc/default/gpsd
START_DAEMON="false"
# binary mode for ublox
GPSD_OPTIONS="-b"
DEVICES=""
USBAUTO="true"
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);
    }
  }
}

  • tips/gnss.txt
  • Last modified: 2022/08/25 23:03
  • by sscipioni