Fetching NMEA Sentences Using LabVIEW Instrument Design Libraries for NI USRP RIO

Updated Jun 30, 2023

Environment

Hardware

  • USRP-2954
  • USRP-2953
  • USRP-2952
  • USRP-2950
  • USRP-2955
  • USRP-2974

LabVIEW instrument design libraries (IDL) for NI USRP RIO provide access to configurable FPGA. If the NI USRP RIO device has a GPSDO (e.g., NI USRP-295xR devices), NMEA sentences can be read on the host. This document is aimed to expose the API and its correct use to fetch these GPS-generated NMEA sentences.

NI LabVIEW IDLs for USRP have already the framework to fetch and parse NMEA sentences if the device is equipped with a GPSDO. The following steps can help to acquire the GPS data on the host.
  1. Generate the appropriate project and code files for the NI-USRP from LabVIEW>>Create Project>>NI-USRP.
  2.  On any of the top-level Host VI in the project, find Get GPS NMEA String.vi inside the Instrument Drivers>>USRP RIO>>GPS palette.
  3. Place the VI to execute after Open and Configure Device.vi. Generally, a user may want to receive NMEA sentences continuously. In that case, it will be beneficial to place it inside one of the available loops or create a new parallel loop especially if it is expected to perform some processing on the NMEA data.
  4. The Get GPS NMEA String.vi will need niUSRPRIO session and NMEA Select String. Currently, GPRMC and GPGGA sentences are the supported options in NMEA Select String.
  5. The following snapshot shows the Get GPS NMEA String.vi integrated with Rx Streaming (Host).vi. It can be similarly integrated into the other top-level host VIs in NI USRP RIO template projects.
Diagram  Description automatically generated

Additional Information:
  • Please note that NMEA data is of a much slower rate as compared to IQ data. Therefore, the API might not be able to produce valid NMEA sentences in every iteration if executed at a higher rate. A simple check identifying an empty string from Get GPS NMEA Strings VI can help confirm the validity.
  • The GPS data may be blank or inaccurate if GPS is not locked.
  • The GPS timestamp does not precisely correlate with the IQ data on the host.