===================================================================== AAAREADME.txt for /usr/local/rtklib - ON Linux x86s and Raspberry Pis ===================================================================== This directory contains all config and executable files to run RTKLIB on a Raspberry Pi (ARM) or x86_64 machine. It does not contain the files required for Windows. The Files ========= rtkrcv.2.4.2-arm-32 rtkrcv.2.4.2-x86-64 rtkrcv.2.4.3-arm-32 rtkrcv.2.4.3-x86-64 rtkrcv executables versions 2.4.2 or 2.4.3 for running on x86-64 machine or Raspberry Pi (arm-32). rtkrcv rtkrcv executable. Copy one of the above rtkrcv-* files into this file - depending on which machine type you are on and which version you want to run. str2str.2.4.2-arm-32 str2str.2.4.2-x86-64 str2str.2.4.3-arm-32 str2str.2.4.3-x86-64 str2str2 executable versions 2.4.3 for running on x86-64 machine str2str str2str executable. Copy one of the abone str2str-* files into this file - depending on what machine type you are on and which version you want to run. m8t_base_1hz.cmd The command file for the M8T on the base station. m8t_rover_5hz.cmd The command file for the M8T on the rover. m8t_nmea_only.cmd A U-BLOX command file for making the M8T produce NMEA only. This is just for testing and experimentation. m8t_reset.cmd A U-BLOX command file for resetting the M8T. This is just for testing and experimentation. m8n_base_1hz.cmd is the str2str configuration suggested by rtkexplorer (bear in mind, that is is for an M8N not an M8T). This is just for inspiration. rtkrcv.conf The preferred config files for rtkrcv for using base station and a rover. rtkrcv.conf.auscors Experimental config files for rtkrcv for using base station and a rover. str2str.service.BASE Copy this to /etc/systemd/system/str2str.service on the base station (and then run 'systemctl daemon-reload'). str2str.service.ROVER Copy this to /etc/systemd/system/str2str.service on the rover (and then run 'systemctl daemon-reload'). ubx_m8t_glo_raw_1hz.cmd Example configuration file from U-BLOX. Don't use this. It's just inspiration. ubx_m8t_glo_raw_5hz.cmd Example configuration file from U-BLOX. Don't use this. It's just inspiration. UBLOX_CMD_GUIDE An attempt to document, or at least make sense of, the commands which are (or could be) sent to the UBLOX devices on startup and shutdown. Scott. ========================================================= Directions for installing RTKLIB on Linux (Raspberry Pis) ========================================================= This configuration will get a base station and a rover (both Raspberry Pis with NEO-M8Ts attached to them) working with RTKLIB. This simply documents what has worked for me so far. Go to http://rtkexplorer.com and https://rtklibexplorer.wordpress.com for real knowledge of how these these things work. This configuration runs rtkrcv (the program which actually computes the position of the rover) on the rover itself. There is no particular reason why it must be done this way, but it is convenient. It makes the rover less dependent on other computers (kind of the spirit of autonomous robots), and reduces the required bandwidth between the rover and the rest of the network. 1. GET HARDWARE =============== You will need a) Raspberry Pi for the base station. I used an old Raspberry Pi B+ for this. It seems to work fine - the computational requirements are not very demanding. b) Raspberry Pi for the rover. You may need a Raspberry Pi 3 for this to work properly if you want to run rtkrcv on the rover, I don't know why. c) Two (preferably identical) GNSS (GPS) systems - one for the base, one for the rover. I used two of: "CSG CSGShop M8T U-BLOX", and these seem to work pretty well. d) Make sure the base has a good view of the sky. Set the rover GNSS up with the best possible view of the sky too. 2. CONFIGURE IT =============== a) Copy all the files in this directory to /usr/local/rtklib into both Raspberry Pis. b) On the BASE STATION Pi, plug in one of the GNSSes. Then $ sudo bash # cd /usr/local/rtklib # cp str2str-VERSION-ARCHITECTURE str2str (choose the appropriate VERSION and ARCHITECTURE) # chmod a+x str2str # cp str2str.service.BASE /etc/systemd/system/str2str.service # systemctl enable str2str.service # systemctl start str2str Test whether it works # telnet localhost 2831 You should see a stream of unreadable gobbledygook. This is good. use "control-]" to get out of telnet. c) On the ROVER Pi, plug in the other GNSS. Then $ sudo bash # cd /usr/local/rtklib # cp str2str-VERSION-ARCHITECTURE str2str (choose the appropriate VERSION and ARCHITECTURE) # chmod a+x str2str # cp str2str.service.ROVER /etc/systemd/system/str2str.service # systemctl enable str2str.service # systemctl start str2str Test whether it works # telnet localhost 2831 You should see a stream of unreadable gobbledygook. This is good. Use "Control-]" to get out of telnet. Edit /usr/local/rtklib/rtkrcv.conf and set ant2-pos1, ant2-pos2, ant2-pos3 to the exact(ish) position of your base station: ant2-pos1 =DEGREESNORTHOFEQUATORASADECIMAL # (deg|m) ant2-pos2 =DEGREESEASTOFEQUARTERASADECIMAL # (deg|m) ant2-pos3 =METERSABOVESEALEVELASADECIMAL # (m|m) The best way to determine the exact location of your base station is to average the uncorrected GPS positions over time - say a week. Or if you are in a hurry, you could just get the best measurement you can using Google maps. Configure the IP addresses to enable rtkrcv to read from the str2str processes on the rover and base station. (127.0.0.1 is probably already correct, just change the other one to point to the base station) inpstr1-path =127.0.0.1:2831 inpstr2-path =192.168.1.132:2831 # cp rtkrcv-VERSION-ARCHITECTURE rtkrcv (choose the appropriate VERSION and ARCHITECTURE) # chmod a+x rtkrcv # cp rtkrcv.service /etc/systemd/system/ # systemctl enable rtkrcv.service # systemctl start rtkrcv Test whether it works: # telnet localhost 2833 You should get one line per second of readable numbers like 2017/02/18 03:01:11.000 -16.4745 23.1705 -3.8062 2 7 0.0314 0.0233 0.0429 -0.0080 0.0266 -0.0115 0.00 1.3 Which should accurately tell you where you are (in this case (-16.4745, 23.1705, -3.8062) from the base station, with FLOAT solution (the '2') with seven satellites. Use "Control-]" to get out of telnet. Now you need to write your robot software to connect to the localhost via TCP port 2833 and interpret the stream of numbers. You could also write your robot software to connect to port 2832 on the rover and read the original GNSS data, which has useful stuff in it, like heading and speed. However be warned that the 2832 port has a mixture of (readable) NMEA and (unreadable) binary packets, so you will need a filter to take out the binary UBX packets to cleanly parse the NMEA. TO MONITOR THE RTK OUTPUT ========================= % telnet rover-r 2833 and watch the pretty display, which will look something like this: 2016/03/13 06:41:09.999 -17.0612 32.3142 -3.7877 2 7 0.0203 0.0097 0.0411 0.0067 -0.0091 -0.0053 0.00 2.0 2016/03/13 06:41:10.999 -17.0617 32.3151 -3.7871 2 7 0.0203 0.0096 0.0410 0.0067 -0.0090 -0.0053 0.00 2.0 2016/03/13 06:41:11.999 -17.0604 32.3143 -3.7849 2 7 0.0203 0.0097 0.0410 0.0067 -0.0091 -0.0053 0.00 2.0 2016/03/13 06:41:12.999 -17.0574 32.3148 -3.7804 2 7 0.0203 0.0097 0.0412 0.0067 -0.0089 -0.0052 1.00 2.0 2016/03/13 06:41:13.999 -17.0592 32.3129 -3.7838 2 7 0.0203 0.0097 0.0412 0.0067 -0.0090 -0.0052 1.00 1.9 2016/03/13 06:41:14.999 -17.0574 32.3135 -3.7755 2 7 0.0203 0.0097 0.0412 0.0067 -0.0089 -0.0052 1.00 1.9 2016/03/13 06:41:15.999 -17.0551 32.3125 -3.7763 2 7 0.0203 0.0097 0.0411 0.0067 -0.0089 -0.0052 1.00 1.9 The fields are: GPST EAST(m) NORTH(m) UP(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio To get that into a CSV file % telnet rover-r |& sed 's/ /,/g' | sed 's/,,/,/g' | sed 's/,,/,/g' | sed 's/,,/,/g' | sed 's/,,/,/g' | sed 's/,,/,/g' | tail -n +4 | sed 's/\//-/g' | sed 's/,/ /' > myoutput.csv And use this as the header: gpst,lat,lon,heightM,q,ns,sdnM,sdeM,sduM,sdneM,sdeuM,sdunM,ageS,ratio (to do: write a fancy ack script to do this). Scott 2016-12-20 12:20:12 2016-12-31 17:55:38 2017-02-14 12:12:04 2017-02-18 15:51:02 ===================== UNRESOLVED RTK ISSUES ===================== The system works: I get results ('solutions') which are better than standard GPS (GNSS). However I am not getting the consistently-one-inch accuracy which some others on the internet seem to enjoy. 1. FIX AND FLOAT The system goes to FLOAT solution quite quickly, but only seldom goes to FIX. This is not a problem in itself, but others seem to be able to get the system to FIX, and have pretty much stay there. I have not achieved this. 2. ACCURACY and CONSISTENCY. The rover has a programmed test-path which takes it around the house, and around a meter away from various solid obstacles along the way. Sometimes it completes without rescue, and sometimes it 'drifts' and needs rescuing. Sometimes it goes quite berserk and just starts wandering away in a seemingly random direction, as it follows a completely inaccurate solution. 3. CONCLUSIONS None really, except that this will get a good solution for the price, but not get truly high-precision RTK positioning - you simply need more expensive (multi frequency) GNSS receivers to do that. Also buying combined NEO-M8T and antenna (ie the M8T is mounted on a PC board which acts as an antenna) seemed like a good idea at the time, but it's kind of inflexible. It would be nice to be able to swap around the antennas to try to find combinations that might work better. Scott 2018-03-04 01:30:06