Show off your great outdoors app, indoors with a recorded NMEA log file

05-27-2020 12:29 AM
Esri Regular Contributor
2 0 231

Faking-it is generally frowned upon – but demonstrating an app that is designed to work outdoors with a GNSS receiver at say a conference, or for your colleagues in the office, warrants a little creative location simulation. For years we’ve hit this problem ourselves at the user conference in San Diego, and after various iterations of fake GPS, I’d like to share our latest offering, by way of an AppStudio sample.

As of AppStudio 4.2, the GNSS Discover sample has the ability for you to:

  • Record a NMEA log file from a connected location provider
  • Playback recorded NMEA messages as if they were coming directly from the connected location provider.

You can also play back files created from other apps – not just GNSS Discover. Some GNSS receivers have the ability to save these files and there are tools online that allow to create simulated files. You can also save the file on your phone and copy it to your desktop to playback. The same file is compatible on all platforms.

What is a NMEA log file?

NMEA 0183 is the data specification standard that AppStudio uses to communicate with GNSS receivers. NMEA messages contain lines of data called sentences. To cut a long story short, save these sentences to a file, and you can replay them in an AppStudio app just like when they are coming directly from a satellite system. The contents of the file will look something like this:

Record a NMEA log file

To capture a NMEA log file with the GNSS Discover sample, create an app with the sample and download it to Player. Connect a receiver to your device and head outside for a walk (or ride, or drive). For more information see Connect your receiver to your device.

  • Click the satellite icon at the top of the app and go to the GNSS location status page.
  • Switch to the Debug tab.
  • Click the Record button.

Whilst you are recording, you can return to the map screen or anywhere else in the app. When you are finished moving around, come back to the Debug tab and Stop recording.

Recorded log files are saved to the folder [User home directory]\ArcGIS\AppStudioPlayer. Each time you capture a new log a new file is created.

Playback a NMEA log file

Playback of a NMEA log file is almost indistinguishable from connecting to a physical receiver. On the location providers page, click Via File, browse to the NMEA log file and click OK.

On the About page of the file location provider there are two settings to consider: loop at end of file (great if you want to capture a short circuit that you can continuously loop through), and update rate. The default update rate is 1Hz which is typical of most receivers. This would mean the playback is in real time. Depending on your demonstration, it might suit to speed things up!

Once you have configured a file location provider, you can use the app in exactly the same way as you would with an external position source. The location status pages will show all the information as you would see from the external position source, and if your app is designed to capture locations, all the available metadata will be captured.

And of course – as this is now in AppStudio, you can expect for this feature to be coming soon in Survey123 and QuickCapture. Record a NMEA log in one app and use it in any of the others. Magic!