Skip to content

Manual configuration

klopezal edited this page Jul 18, 2016 · 7 revisions

Managing the configuration file

As you may have seen RTKLIB's configuration file is everything except user-friendly.

drotek_rtk_gnss_conf

The configuration files are located at /usr/drotek/config This document with list all the relevant parameters of this configuration file.

pos1-posmode =

  • single for single positioning
  • dgps to use SBAS
  • kinematic is for RTK with fixed base
  • static is for RTK with fixed base and rover
  • movingbase is for RTK with both base and rover moving
  • fixed is for rover fixed
  • ppp-kine PPP algorithm in kinematic mode
  • ppp-static PPP algorithm in static mode

PPP (Precise Point Positoning) differs fom RTK because it uses precise orbit data instead of double-difference algorithm in order to compute a position. Its precision is generally less good than RTK. But it can be used without base corrections and can potentially output a submeter position.

pos1-navsys =

  • 1 to use only GPS satellites
  • +2 to add SBAS
  • +4 to add GLONASS
  • +8 to add GALILEO
  • +16 to add QZSS
  • +32 to add BEIDOU

Useful when you want to disable SBAS (sometimes interacts badly with RTK) or select a constellation.

pos2-armode =

  • continuous
  • instantaneous
  • fix-and-hold

This is the strategy for integer ambiguity resolution for GPS. Continuous gives the best results. Fix-and-hold can sometimes hold the ambiguity longer, but some offsets on position can appear.

pos2-gloarmode =

  • off
  • on
  • autocal

This is the strategy for integer ambiguity resolution for GLONASS. It is recommended to leave this parameter off, as it will generally not help in ambiguity resolution.

ant2-postype = base's position type

  • llh latitude/longitude/height in decimal degrees and meters
  • xyz ECEF coordinates in meters
  • single uses base's single data to calculate a position
  • posfile uses a position file
  • rinexhead uses a RINEX file header
  • rtcm extracts base's position from RTCM messages

These parameters are for setting base's position. It must be understood that getting a good position for the base is the key to accuracy. Please follow instructions on how to calculate base's position accurately. "Single" mode can be used (only for post-processing) if user does not want to enter base's position manually. However position calculation will be much less precise.

inpstr2-type =

  • serial from a UART link
  • file from a file
  • tcpsvr from a TCP server
  • tcpcli from a TCP client
  • ntripcli from a NTRIP client
  • ftp from FTP
  • http from HTTP

This parameter sets how correction data from the base is transmitted to the Edison. For instance with a radio link it can be UART, over Wifi it can be a TCP server, etc... It is also compatible with NTRIP.

inpstr2-path =

  • ttyUSB0:57600:8:n:1:off for a radio link plugged on the external USB port, baudrate 57600, 8 bits, no parity check, 1 stop bit, no flow control
  • 192.168.1.20:2424 for retrieving data from a TCP server located at 192.168.1.20, port 2424

This parameters sets the path for correction data depending on inpstr2-type.

inpstr2-format =

  • ubx U-Blox binary format for raw data
  • rtcm2 RTCM 2 protocol
  • rtcm3 RTCM 3 protocol

This parameter sets in what format the corrections are being sended. U-Blox receivers naturally outputs U-Blox binary format .ubx which is compact (little bandwith). This data can be converted with STR2STR to RTCM if needed. Other formats are also available if another base is used : oem4, oem3, ss2, hemis, skytraq, gw10, javad and sp3.

outstr1-type =

  • serial UART output
  • file file output
  • tcpsvr TCP server output
  • tcpcli TCP client output
  • ntripsvr NTRIP server output

With RTKLIB you can configure two outputs for the calculated solutions. UART is useful for getting the position to Pixhawk, file is also useful for avoiding post-processing.

outstr1-path =

  • ttyMFD1:38400:8:n:1:off ttyMFD1 is UART1 on the Edison, baudrate 38400, 8 bits, no parity check, 1 stop bit, no flow control
  • /usr/drotek/rtklib/sol%Y%m%d%h%M.pos for saving the solution to the corresponding folder, with a time tag in the name

Paths corresponding to outstr1-type =.

outstr1-format =

  • llh gives the solution in ASCII format, latitude, longitude and height separated by columns
  • xyz same in ECEF coordinates (Earth Centered Earth Fixed)
  • enu same in ENU coordinates (East, North, Up, the coordinates of the vector between base and rover)
  • nmea same in NMEA
  • ubx this is a functionality added by Drotek so that RTK GNSS can work with Pixhawk

U-Blox binary format has been added by Drotek in order to work with flight controllers.

logstr1-path =

  • /usr/drotek/rtklib/rov_%Y%m%d%h%M.ubx

This is the path for active logging folder. Then logs are moved to /usr/drotek/logs Useful for post-processing.

Configuring U-Blox chips

To configure the Ublox chips manually you have to use the U-Center software, available here.

You also need an FTDI adaptor sold here.

Then connect the FTDI adaptor to the board. You can choose to power the board through the FTDI with the 5V pin. If you don't, do not forget to still plug the GROUND pins together. Be careful not to apply several power supplies to the board!

drotek_rtk_gnss_ftdi_wiring

U-Blox's M8T UART has been directly connected to the "GPS RX and TX" labeled pins for configuration/debugging purposes. Keep in mind that the M8T is connected to the Edison with USB while changing configuration.

To connect Drotek GNSS RTK to U-Center, select the appropriate COM port :

drotek_rtk_gnss_ublox_com_port

In order to use the RTK algorithm, the receiver has to output raw data instead of computed navigation messages. This data contains all the pseudoranges, carrier phases, Doppler measurements etc... necessary to compute the algorithm. An example of raw data is shown below :

drotek_rtk_gnss_raw_data

The messages the GPS is sending can be seen in "View -> Messages View" tab.

The configuration can be set in the "View -> Configuration View" tab.

For instance in the "GNSS" tab you can config whether you want to use GPS, GPS + GLONASS + SBAS, etc... Now GALILEO is available with firmware 3.01 for M8 series!

drotek_rtk_gnss_ublox_config

In the "NAV5" tab, you can set the Dynamic Model for the GPS. This useful when there is no correction data coming, so the Edison will switch to Ublox's direct output. For example, if you are using the board with a Pixhawk, select "Airborne < 4g", so that position computation and filtering will be closer to reality, given that drones kinematics are quite fast.

drotek_rtk_gnss_nav5

Once you do a modification in any tab, do not forget to press the "Send" button at the bottom left corner, otherwise the modification will not be sent to the receiver.

drotek_rtk_gnss_sendbutton

"MSG" tab contains all the messages that can be set through M8T's outputs. The two important messages containig raw data are "02-15 RXM-RAWX" and "02-13 RXM-SFRBX". You can activate them by selecting them on the menu and then select the output port. In our case it is important that those two messages are set to the USB port, to which the Edison is connected.

drotek_rtk_gnss_RAWX

Then you can choose to send whatever message you want to the UART port, depending on what you connect to the board. For example, Pixhawk uses NAV-SOL, NAV-STATUS, NAV-POSLLH and NAV-VELNED messages. Do not forget the corresponding baudrate in the "PRT" tab (for instance 38400 for Pixhawk) :

drotek_rtk_gnss_ublox_baudrate

You do not need to set any baudrate for the USB port.

The rate of the receiver is a key parameter for RTK as it will set at what frequency the solutions are calculated. This can be configured within the "RATE" tab :

drotek_rtk_gps_rate

SBAS settings can be changed in "SBAS" tab. In order to save his configuration inside receiver's memory, go back to "CFG" tab, select the four devices and click on "Send", as shown in the picture below.

drotek_rtk_gps_save

Launching RTKLIB manually

RTKLIB’s main program can be found in /usr/drotek/rtklib/rtkrcv, so first SSH into your board and then use this command :

cd /usr/drotek/rtklib/

and ./rtkrcv to launch it.

Rtkrcv is a server that needs a configuration file. The following commands can be used : -o [PATH] to specify a configuration file (stored in /usr/drotek/config/) -t [1..5] for debugging purposes, writes a .trace file in rtkrcv’s path depending on the level of verbosity (from 1 to 5). It can be useful to understand why sometimes results are not as expected. -d [PATH] to redirect rtklib’s output to another console -s to automatically launch the server

A typical launch of rtkrcv is :

./rtkrcv –o /usr/drotek/config/active_config.conf – t 2

Then start and solution 1 must be typed in order to start the server and visualize solutions. These may last to appear as sometimes RTK algorithm needs some time to perform initial calculations (this also depends on signal strength).

Closing an SSH connection kills the rtkrcv process, so this is why –d command may be useful.

Accessing the Intel Edison

drotek_rtk_gnss_edison

There are three ways to access the Intel Edison :

  • Serial
  • WiFi Access Point
  • WiFi Router

We will ship the Edison in Access Point mode by default, so it can connect with the RTKLIB WEB CONSOLE easily. This is the most user-friendly way to communicate with the board. If you want to SSH into the board in Access Point mode, use the IP address 192.168.42.1 and a hyperterminal like Putty. You then get access to the embedded Yocto Linux.

drotek_rtk_gnss_putty_ssh drotek_rtk_gnss_putty_wifi

Serial port is available through UART2. This port is called /dev/ttyMFD2 inside Linux. For this, you will need an FTDI adaptor sold here.

Connect the FTDI adaptor to the board. You can choose to power the board through the FTDI with the 5V pin. If you don't, do not forget to still plug the GROUND pins together. Be careful not to apply several power supplies to the board!

drotek_rtk_gnss_ftdi_edison

Then go to your device manager to see what COM port is being used.

drotek_rtk_gnss_com_port

Then use Putty in serial mode, select the COM port created by the FTDI converter and enter 115200 for the baudrate. After pressing Enter you will be prompted to login.

drotek_rtk_gnss_putty_serial drotek_rtk_gnss_login

If you want to connect the Edison to a router, first connect to the board using an FTDI adapter. Once you have entered your login and password, type the following command to disable Access Point Mode :

configure_edison --disableOneTimeSetup --persist

Then type :

configure_edison --wifi

to list all the available networks and connect to them. The command :

ifconfig

can give you the IP address of the board. You can then use Putty with the new IP address to connect to Linux or a program like WinSCP if you want to retrieve some data from the board. If you wish to turn back to Access Point Mode, type :

configure_edison --enableOneTimeSetup --persist

Signal multiplexing

SMARTNAV RTK is equipped with multiplexors that ensure a hardware switch function. The output of the board can be selected between a U-Blox "normal" output or Edison's "precise" output. There are two scripts located at :

/usr/drotek/admin

that let you control these multiplexors.

If mux_low is executed U-Blox direct UART output will be redirected to board's output (JST or DF13 connectors). If mux_high is executed Edison's UART output will be redirected to board's output (JST or DF13 connectors).