Centimeter GPS with any Android app (mock location)

Android RTK

In this tutorial we will explain how to configure Ardusimple RTK receivers to be used as mock location for Android smartphones/tablets in order to get centimeter position accuracy.

If you are not familiar with the term, mock location means that you cheat your Android device to use an external GNSS receiver as if it was its own internal one.
This has the advantage that any GPS/GNSS app that works with your Android device can benefit of centimeter level accuracy.

Step 1:

This step only needs to be done once.

We will use Lefebure NTRIP Client app both to get NTRIP corrections and to use mock location for Android.
Go to the Play Store and install the app, we will configure it later.

Step 2:

This step only needs to be done once.

To enable mock locations in Android we will need to get Developer permissions. The procedure may vary slightly between different Android versions and smartphone models (you can Google your “Smartphone model + enable mock location” if you can’t find the exact options).

On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen. To enable developer options, tap the Build Number, MIUI version or similar option 7 times. You can find this option in one of the following locations, depending on your Android version:

  • Settings > About Phone > Build Number
  • Settings > System > About Phone > Build Number

Once you have access to Developer options, you can go to Settings > Additional Settings and at the bottom you will find Developer options.
In this big list, tap Select mock location app and select Lefebure NTRIP Client from the list.

Step 3:

Power any of your professional kits by connecting their USB cable to your smartphone/tablet/power source.
If you get any popup message to connect the USB device with any app, you can ignore it (unless you want to connect via USB OTG, which is covered in this other tutorial)

Enable your smartphone/tablet Bluetooth, and pair it with your professional kit.
When pairing your device, notice that it may appear as simpleRTK2B or as a generic MAC number (e.g.: F0:0A:95:9D:68:16).
The password is always 1234.

The pairing only needs to be done once.

Step 4:

  • Open Lefebure NTRIP Client
  • Click on the gear icon to enter the setup menu
  • Select Receiver Settings and set:
    • Receiver Connection to External via Bluetooth.
    • Bluetooth Device to the name of the simpleRTK2B BT connection.
    • GPS Mock Locations check.
    • You can also add the Antenna Height if you are performing high accuracy surveying tasks.
    • You can additionally log the GPS or NTRIP Data by checking the options.
  • Go back to the main settings menu and select NTRIP settings.
  • Set your NTRIP service credentials (Caster IP, Caster Port, Username and Password).
These are Ardusimple credentials shown only as an example, use your own 🙂

These settings need to be done only once unless you change your NTRIP credentials.

  • Go to the main screen and click the CONNECT button.
  • Once the connection with the server is stablished, the app will ask you to select the NTRIP station from which you want to receive the corrections.
  • If everything is properly set you will see a yellow progress bar that will download corrections continuously
NTRIP smartphone step 6

Step 5:

Open your favorite GPS/GNSS application and use it as usual.
You will be using the external RTK GNSS receiver instead of the smartphone/tablet internal GPS receiver

We have tested this functionality with the following popular apps:

  • Google Maps
  • ODK Collect
  • Mapit GIS

If you test it in other apps, you can send us an email at info@ardusimple.com and we will add it to the list

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.