Knowledge Base

Teqc: Matlab scripts for reading and plotting COMPACT2 files

Teqc is a toolkit for manipulating GNSS data. It has many useful features for editing, translating and quality checking GNSS data (website). One feature of Teqc allows ascii files to be output for plotting. You can chose from two different file formats (COMPACT or COMPACT2). The COMPACT file format only includes data from the GPS constellation. The COMPACT2 file format was created to include data from other constellations. Currently (02/08/2012), teqc will only output data from the GPS and GLONASS constellations to the COMPACT2 file format. The COMPACT2 file format is described at http://ls.unavco.org/pipermail/teqc/2009/000827.html.

The following Matlab functions will read and plot the data from COMPACT2 format files:

read_compact_2.m    plot_compact_2.m

Note: These functions are not optimized for speed and may not be suitable for highrate data files. Reading and plotting a COMPACT2 file created from a daily 30sec RINEX takes ~4 seconds on a 2011 Macbook Pro. The form for the figures were inspired from the matlab script located here.

How to create COMPACT2 format files using teqc:

This example shows how to create COMPACT2 format files using a Trimble .tgd file:

1) Create a daily observation and navigation file.

teqc +obs + +nav +,+ -tbin 1d TEST 5024K68415201202070000a.tgd
! Notice ! incomplete code for parsing Trimble .dat record 32 (Galileo ion/UTC model) in file ’5024K68415201202070000a.tgd’ ... skipping
teqc:  creating file ’TEST0370.12g’ ...
teqc:  creating file ’TEST0380.12n’ ...
teqc:  creating file ’TEST0370.12n’ ...
teqc:  creating file ’TEST0380.12o’ ...
teqc:  creating file ’TEST0380.12g’ ...
teqc:  creating file ’TEST0390.12n’ ...

2) Create COMPACT2 ascii files using the qc and plot2 flags. The ’+qc’ flag will run Teqc’s quality check program. The ’+plot2’ flag will force Teqc to output plot files in the COMPACT2 file format. Teqc will automatically find any navigation files for the GPS (.12n) and GLONASS (.12g) satellites if they are present in the same directory. If they are not present, Teqc will not be able to create the COMPACT2 files.

teqc +plot2 +qc TEST0380.12o

The newly created COMPACT2 files:

  • TEST0380.iod 
  • TEST0380.ion
  • TEST0380.mp1 
  • TEST0380.mp2
  • TEST0380.sn1
  • TEST0380.sn2
  • TEST0380.azi
  • TEST0380.ele


How to use the matlab functions to read and plot COMPACT2 files:

1) The function read_compact_2.m must be included in your Matlab path or in the same directory for plot_compact_2.m to work.

2) To plot the GPS data included in a given COMPACT2 file, simply type "plot_compact_2(’filename’,’gps’)". An example is shown below:

3) An example figure showing the elevation angle of GPS satellites over a 24 hour period:





Attached Files (2)
Comments (3)
Comment by Henry Berglund on Wed, Sep 14th, 2016 at 6:40 PM
For a Matlab alternative check out the script read_teqc_compact.m, written by Dr. Felipe Nievinski, which does support compact 3. Please see the following link for details: https://www.mathworks.com/matlabcentral/fileexchange/31077-read-teqc-compact?requestedDomain=www.mathworks.com I also recommend that you check out the RinDump Utility provided by the GPSTk project University of Texas (Austin). It’s a command line tool written in C++ that can output various combinations of observables from RINEX files. The output is tabular, making it easy to import into Matlab. Here is a link to their homepage: http://www.gpstk.org/bin/view/Documentation/WebHome And here is a command line tool written in Python that also supports reading and plotting compact 3 formatted files: http://www.westernexplorers.us/GNSSplotters/
Comment by AFOLAYAN on Mon, Sep 12th, 2016 at 11:10 AM
Please, how can I get the new matlab code to read and plot the new compact 3 files output from TEQC? Thank you so much in advance.
Comment by Felipe G. Nievinski on Sun, Sep 8th, 2013 at 3:41 AM
For an alternative, see <http://www.mathworks.com/matlabcentral/fileexchange/31077>.
Security Code Security Code
Related Articles RSS Feed
Viewed 1742 times since Fri, Sep 4, 2015
How to remotely access receivers that are being downloaded using the WIGATE software
Viewed 6825 times since Tue, Nov 18, 2008
Binex stream capturing utility
Viewed 3121 times since Wed, Apr 1, 2009
EGADS automated downloading software
Viewed 6833 times since Tue, Feb 10, 2009
What is TEQC?
Viewed 4206 times since Tue, Nov 18, 2008
Basic HOWTO guide for creating metrological data products from a real time streams.
Viewed 1937 times since Tue, Feb 28, 2012
What is NTRIP?
Viewed 14350 times since Tue, Nov 18, 2008
Motorola Phone Tools
Viewed 2242 times since Mon, Apr 20, 2009

Last modified: Monday, 12-May-2014 00:18:29 UTC