GNSS Logger Unitwith RTKLIB
Tiphat Areeyapinun
Shizuoka University
1

GNSS Logger Unit with RTKLIB
Objective• To record GNSS RAW data directly from areceiver module for post processing• Small footprint and easy to use• Use RTKLIB as base software2Complement of Logger•Raspberry Pi (B+, 2 and 3)•Ublox M8T•LCD Monitor•USB cable•Antenna•USB Drive (Fat32)

3

Complement of Logger (2)Antenna
Tallysman 2410
Tallysman 2710

4USB Drive

Raspberry PI withLCD monitor

Ublox NEO M8T

How to build?

5How to build
1. Raspberry Pi preparation
2. Receiver preparation
3. Software preparation

6

Raspberry Pi preparation• You can install aRaspberry Piboard on anycase.
• On this project
we used a clear
case fromAmazon.com
Case for Raspberry Pi 3 Model B/ Raspberry Pi 2 Model B/ Pi Model B+
https://www.amazon.co.jp/dp/B01CDUM3D6/ref=pe_492632_227730602_TE_item
Price at 790Yen/case7

Raspberry Pi preparation

8• LCD Screen for displaying a log information, weused Adafruit 2.4” 320x240 TFT• Soldering a 40 female pin with LCD board toconnect to Raspberry Pihttps://www.amazon.co.jp/dp/B019IBEMK0
Price at 5527yen/unit
http://www.marutsu.co.
jp/pc/i/574345/
Price at 4350yen + tax

Raspberry Pi preparation• Connect LCD board to Raspberry Piboard by 40 GPIO Pin

9

Receiver preparation• Check the firmware ofM8T, update to the newversion (Current 3.01,support Galileo satellite)• In this project, we used 4
GNSS satellites, GPS, QZSS,
Beidou and Galileo

UBLOX NEO‐M8T TIME & RAW receiver board with SMA (RTK ready)
http://www.csgshop.com/product.php?id_product=205 Price at 74.99USD/Unit10

Receiver preparation• The settings in receiver depend on whatkind of data you want to output and record• In this project, we used those settings
below• NMEA and RAW output via USB• GPS, Galileo, QZSS and Beidou• 5Hz data output

11

Software preparation• Pre OS configuration• RTKLIB software installation• CLI mode configuration• LCD monitor setup• USB drive configuration• Auto‐start script configuration• Trigger OS shutdown by USB

12Software preparation
Pre Operating System configuration• Expand a disk file system• Open Menu  Preferences  Raspberry PiConfiguration• Select “Expand Filesystem” then restart thesystem

13Software preparation
RTKLIB software installation• Download RTKLIB software from GITHUB(Branch: master, Version 2.4.2)• Unzip and go to “RTKLIB‐Master¥app” directory• Execute this command below
sudo chmod 755 makeall.sh• Then execute this command and wait until its
completedsudo ./makeall.sh

14

Software preparation
CLI mode configuration• Open Menu  Preferences
 Raspberry Pi Configuration• From the “System” tab,
you can simply click the radio
button of “To CLI”, to change
the boot preference• Then reboot the system

15Software preparation
LCD Monitor Setup• At terminal console, install an LCD kernel bytype those commands below$curl ‐SLs https://apt.adafruit.com/add‐pin | sudo bash
$sudo apt‐get install raspberrypi‐bootloader$sudo apt‐get install adafruit‐pitft‐helper

16Software preparation
LCD Monitor Setup (2)• Enable & Configure the LCD by this command$sudo adafruit‐pitft‐helper ‐t 28r• At the end of process, you will be prompted onwhether you want the text console to appearon the LCD Screen• Answer “Y” to continue

17Software preparation
USB Drive Configuration• Prepare a USB drive in FAT32 file format• Create a mount point on Raspberry Pi by thosecommands below$ sudo mkdir /media/usb$ sudo chown ‐R pi:pi /media/usb

18

Software preparation

19

Auto‐start script configuration
This step will allow STR2STR to start automaticallywhen system booted• Edit “rc.local” by typethis command below$ sudo nano /etc/rc.local

Software preparation20

Auto‐start script configuration (2)• After an initial comments (lines beginning with '#'),
add those commands below.
sudo mount /dev/sda1 /media/usb ‐o uid=pi,gid=pi
cd /home/pi/RTKLIB‐master/app/str2str/gcc/
sudo ./str2str ‐in serial://ttyACM0:57600#ubx >//media/usb/$(date +%Y%m%d‐%H%M%S).ubx• First command will mount USB drive• Second command will change directory to /STR2STR• Last command will start STR2STR and write an output
to USB driveSoftware preparation
Trigger OS shutdown by USB• As the logger unit has no keyboard whenoperating outside.
• We add more script that can be trigger a
shutdown process. By disconnect the receiverfrom Raspberry Pi.
• To protect an output file from EOF problem.

21

Software preparation
Trigger OS shutdown by USB (2)1. At terminal console, get an information about USB
device via "lsusb"• The third field labelled ID is the vendor and model idseparated by a colon

2. Create a file in /etc/udev/rules.d• The file must end in .rules and all files in this directory areprocessed lexicographically. Such as 00‐XXX.rules

22Software preparation
Trigger OS shutdown by USB (3)3. Edit the created file as below
ACTION=="remove", ENV{ID_VENDOR_ID}=="XXXX",ENV{ID_MODEL_ID}=="XXXX", RUN+="/sbin/shutdown ‐hnow"Create a file in /etc/udev/rules.d

4. Run this command below to take effect.
udevadm control ‐‐reload‐rules

5. System is now ready to use as Logger unit.

23

How to use?

24

How to use?
1. Prepare and Start system
2. Shutdown system
3. Access the record file25

Prepare and Start system• Plug Ublox Neo‐M8T receiver unit (via USB)
and USB drive to logger unit

26

Prepare and Start system• Plug a micro USB power cable to logger unit

27

Prepare and Start system

28• Logger system will start automatically as picturebelow.

(In case of system cannot
start or boot to terminal
prompt, please check thatreceiver and USB drive areplug to the systemcorrectly or not, thenreboot the system again)

Shutdown system• When you done an experiment, please unplug
the Ublox Neo‐M8T from logger unit and system
will start to shutdown automatically29

Shutdown system

30• The last state of shutdown system is “Reached target
Shutdown”, then you can remove power cableAccess the record file
• When you shutdown the logger unit,
record file will available in the USB drive.
• Filename will be written by the time of
Raspberry PI system, you need to checkthe actual time again in RAW data (GPST)

31

Access the record file32

• Recorded file UBX can be review from u‐center
application provided by Ublox.
• From here, you can briefly review data and positionin map view

Contact point•Professor Tomoya Kitanit‐kitani@kitanilab.org•Tiphat Areeyapinun
tiphat‐a@kitanilab.org• Kitani Laboratory, Department of Informatics,
Shizuoka University33