Gnss monitor: Difference between revisions
| Line 102: | Line 102: | ||
max_logging_minutes = 60.0 | max_logging_minutes = 60.0 | ||
log_service = true | log_service = true | ||
[mqttin] | [mqttin] | ||
broker = tcp:// | broker = tcp://localhost:1883 | ||
context = | context = ublox9/ | ||
clientid = ublox9_in | clientid = ublox9_in | ||
function = nmea/ | function = nmea/ | ||
| Line 112: | Line 112: | ||
print = false | print = false | ||
use = false | use = false | ||
[gnss] | [gnss] | ||
;input = /dev/ttyACM0 | |||
input = ../../../log/log_24h_asta_mqtt.txt | |||
input_use = true | input_use = true | ||
log = false | log = false | ||
interval_sec = 0 | |||
[ | logtime = false | ||
[ini] | |||
; set 'saveconfig' to 'false' to avoid autosave = | ; set 'saveconfig' to 'false' to avoid autosave = | ||
saveconfig = | saveconfig = true | ||
version = 2285 2025-06-26 07:20:46 | version = 2285 2025-06-26 07:20:46 | ||
[mqttinw] | |||
broker = tcp://192.168.2.216:1883 | |||
context = not used | |||
clientid = weather_in | |||
function = | |||
system = weather7/ | |||
log = true | |||
print = false | |||
use = true | |||
There are two input alternatives: | There are two input alternatives: | ||
* From a file (default may be '/dev/ttyACM0') or a logfile generated by the MQTT streamer for NMEA messages. Set 'input_use = true' to use this alternative. | * From a file (default may be '/dev/ttyACM0') or a logfile generated by the MQTT streamer for NMEA messages. Set 'input_use = true' to use this alternative. | ||
* From a MQTT server that streams the NMEA messages. Change the IP in the [mqttin] group and change to 'use=true'. The NMEA messages are assumed to be in the payload of the message, and the subject as described (subscribing to 'ublox9/nmea/#'). | * From a MQTT server that streams the NMEA messages. Change the IP in the [mqttin] group and change to 'use=true'. The NMEA messages are assumed to be in the payload of the message, and the subject as described (subscribing to 'ublox9/nmea/#'). | ||
Revision as of 14:38, 3 August 2025
Experiments to extract and display GNSS live or recorded data
Screenshot
Left: Satellite movement in the sky above. Mid: Reported movement of the stationary antenna. Right: Number of tracked satellites over the last ~20 hours.
Required packages
Some of the packages are merely for convenience, but most are required to run the intended applications.
libreadline-dev libopencv-dev libgpiod-dev gpiod cmake subversion aptitude apt-file telnet ntp ntpdate nmap lsof libpaho-mqtt-dev libpaho-mqttpp-dev (if not available, then not needed) python3-paho-mqtt python3-opencv python3-setproctitle mosquito mosquitto-dev mosquitto-clients libusb-dev libcli11-dev (maybe not available) libgeographiclib-dev libpaho-mqttpp-dev qt6-base-dev qt6-tools-dev libxkbcommon-dev sudo apt install libreadline-dev libopencv-dev libgpiod-dev gpiod cmake subversion aptitude apt-file telnet ntp ntpdate nmap lsof python3- paho-mqtt libpaho-mqtt-dev python3-opencv python3-setproctitle mosquitto mosquitto-dev mosquitto-clients libusb-dev libcli11-dev libgeographiclib-dev libpaho-mqttpp-dev qt6-base-dev qt6-tools-dev libxkbcommon-dev
For Python install
pip install geographiclib
or
sudo apt install python3-geographiclib
Build
Code is found here (on SVN)
svn co svn://repos.gbar.dtu.dk/jcan/svnjca/projekter/gnss_receiver
The C++ code is then in qt/gnss_qt
Build by
cd gnss_receiver/qt/gnss_qt mkdir -p build cd build cmake .. make -j3
Run to create a configuration file
./gnss_qt
CMake problem
GeographicLibConfig.cmake
The find package
find_package(GeographicLib REQUIRED)
in cmake fails, as the file GeographicLibConfig.cmake is not found.
This can be fixed by renaming the provided file FindGeographicLib.cmake by
cd /usr/share/cmake/geographiclib sudo ln -s FindGeographicLib.cmake GeographicLibConfig.cmake
XKB
Missing library, and CMake complains:
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
The solution was to install
sudo apt install libxkbcommon-dev
This occurred on Raspberry Pi 4-5 using the 64-bit default OS.
Configure
After the gnss_qt is run the first time, there should be a default configuration file
[service] logpath = log_%d/ ; the '%d' will be replaced with date and timestamp (must end with a '/'). = max_logging_minutes = 60.0 log_service = true
[mqttin] broker = tcp://localhost:1883 context = ublox9/ clientid = ublox9_in function = nmea/ system = ublox9/ log = true print = false use = false
[gnss] ;input = /dev/ttyACM0 input = ../../../log/log_24h_asta_mqtt.txt input_use = true log = false interval_sec = 0 logtime = false
[ini] ; set 'saveconfig' to 'false' to avoid autosave = saveconfig = true version = 2285 2025-06-26 07:20:46
[mqttinw] broker = tcp://192.168.2.216:1883 context = not used clientid = weather_in function = system = weather7/ log = true print = false use = true
There are two input alternatives:
- From a file (default may be '/dev/ttyACM0') or a logfile generated by the MQTT streamer for NMEA messages. Set 'input_use = true' to use this alternative.
- From a MQTT server that streams the NMEA messages. Change the IP in the [mqttin] group and change to 'use=true'. The NMEA messages are assumed to be in the payload of the message, and the subject as described (subscribing to 'ublox9/nmea/#').