ODZ-UJF-AV-CR / CRREAT_cars

Scripts for parsing data from measurement devices mounted on cars for thunderstorm chasing.
GNU General Public License v3.0
0 stars 0 forks source link

Parsing data from moving-baseline RTK GPS #2

Open kaklik opened 4 years ago

kaklik commented 4 years ago

Sources compiled the gpsd from http://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-3.21.tar.gz The process was smooth until the moment when I want to decode the UBX-NAV-RELPOSNED message from my NEO-M8P receiver. I am constantly getting the following error from ubxtool.

UBX-NAV-RELPOSNED:
  Bad Length 40

An interesting fact is that the source code contains a little different failure message format string. The def nav_relposned(self, buf): from ubxtool source contains the following:

        else:
            # WTF?
            return "  Bad Length %d version %u combination" % (m_len, u[0])

There is also an condition check for message lenght smaller or exactly 40 bytes length elif (0 == u[0] and 40 <= m_len):

Screenshot from 2020-08-08 09-40-27

kaklik commented 3 years ago

I just tested if the new release fix that.

Unfortunately do not. https://gitlab.com/gpsd/gpsd/-/issues/140

kaklik commented 3 years ago

Pokusil jsem se vytvořit skript, který má z GNSS přijímačů na střeše

Vytvořit výpis podle kterého by bylo možné rozpoznat, že celý systém funguje správně. Base přijímač je totiž potřeba zinicializovat použitím

export PYTHONPATH=/usr/local/lib/python3/dist-packages/
ubxtool -d SURVEYIN3 -f /dev/ttyACM0

Pak je možné pomocí příkazů

$ ubxtool -f /dev/ttyACM2
UBX-NAV-RELPOSNED:
  version 0 reserved1 0 refStationId 0 iTOW 152612000
  relPosN -414 relPosE -213 relPosD -88
  relPosHPN -40 relPosHPE -74 relPosHPD -21 reserved2 0
  accN 104729 accE 40727 accD 114204 flags x27

$ ubxtool -f /dev/ttyACM1
UBX-NAV-RELPOSNED:
  version 0 reserved1 0 refStationId 0 iTOW 152705250
  relPosN -878 relPosE -320 relPosD -125
  relPosHPN -73 relPosHPE -71 relPosHPD -93 reserved2 0
  accN 54452 accE 39194 accD 113055 flags x27

Zkontrolovat, že výpisy jsou nenulové. Problém je v tom, že je to pro konstrolu přístorů v terénu dost náročný proces. Bohužel při pokusu o filtraci výstupu a zápis obou příkazů permanentně do jednoho skriptu jsem narazil na problém, že gpsd python knihovna je nedopsána a aktuálně neumožňuje filtraci podle typu zprávy z GNSS přijímače.