Skip to content
Records data off of MCC DAQ and VectorNav INS
C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Records data off of MCC DAQ and VectorNav INS

Table of contents


Created for use on the BLUECAT V unmanned platform at the University of Kentucky. This was originally intended to run on a Raspberry Pi, but it should work on most Linux machines.



This may work with similar models, but has not been tested with anything but the above hardware.


  • VectorNav Programming Library v1.1

    • v1.1.4 has also been tested
    • Simply download, unzip, and run make to build library and example files.
        $ wget
        $ unzip
        $ cd vnproglib-1-1-4/cpp
        $ make
  • MCC Universal Library for Linux (uldaq)

    • This requires libusb
      • If you're on Ubuntu/Raspian, use sudo apt-get install libusb-1.0-0-dev. See the uldaq README for more installation options.
    • Install uldaq using the following commands:
        $ wget
        $ tar -xvjf libuldaq-1.0.0.tar.bz2
        $ cd libuldaq-1.0.0
        $ ./configure && make
        $ sudo make install

In order to support the symbolic link for the device, create a file in the /etc/udev/rules.d/ directory with the following rule:



  1. Clone this repository, then enter the directory that is created.
        git clone
  2. Edit the VNPATH and MCCPATH macros at the top of the makefile to match the locations where you installed the VectorNav and MCC software on your machine.
  3. Run make.
  4. Run ./getData to begin the program.

If the device already has the repository present, run git pull and make to update to update to the latest version.


  1. Before starting, create a config.txt file in the directory where you will be running the program
    • Fill with the following fields as whole numbers, separated by a tab character:
      • DAQ Sample Rate (0 - 100000 hz)
      • Number of channels to sample (aggregate sample rate cannot exceed 400 khz)
      • Voltage Range (1, 2, 5, 10)
      • Duration (in minutes)
  2. If you would like to start the recording by push button, change the PUSHTOSTART option in main.cpp to 1 and wire the GPIO pins as shown below. -
  3. To ensure the two devices are synchronized, connect the SYNC_OUT pin of the VectorNav to the TRIG_IN terminal (pin 37) of the DAQ
  4. Run ./getData to begin.
  5. Press enter to quit.
  • There are either 3 files for each recording session:

    • DATAXX.DAQ, where XX is some number between 00 and 99 This contains the raw binary data from the MCC DAQ. This can be interpreted as a series of double precision floats with each channel recorded from lowest channel number to highest on each sample.
    • CONFIGDATAXX.txt, where XX corresponds with a DATAXX.daq file This contains a record of the settings at which a particular DATAXX.daq session was run. It contains the rate, number of channels, voltage range, duration, and UTC time of when the session began. Each of these fields are separated by newlines.
    • VECTORNAVDATAXX.CSV, where XX corresponds with a DATAXX.daq file This contains the raw binary data from the VectorNav. It contains a series of 110 byte packets that can be read with the extract program, or the VectorNav Sensor Explorer
  • If you build with the default target or run make extract, you can decode the binary packets recorded from the VectorNav device. Do this with ./extract VECTORNAVDATAXX.CSV, which will create a file called VECTORNAVASCIIXX.CSV, which is human-readable.

Other notes

  • In order to prevent data loss in the event of power failure, it is necessary to edit the /etc/fstab file on your machine and add the sync mount option to the main partition. This ensures that writes to the files are immediately saved to the disk.

/dev/mncblk0p6 / ext4 defaults,sync,noatime 0 1

Important Resources

You can’t perform that action at this time.