UNAVCO Logo
 
 
UNAVCO Knowledgebase

Knowledgebase Home | Glossary | Favorites | Login Knowledgebase Home | Glossary | Favorites | Login
Search the Knowledgebase Browse by Category
Teqc: Matlab scripts for reading and plotting COMPACT2 files
Article Details

Last Updated
8th of February, 2012

User Opinions (6 votes)
100% thumbs up 0% thumbs down

How would you rate this answer?
Helpful
Not helpful

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:

plot_compact_2.jpg

 

 

 

Visitor Comments
  1. Comment #1 (Posted by Felipe G. Nievinski )
    For an alternative, see <http://www.mathworks.com/matlabcentral/fileexchange/31077>.
Post Comment for "Teqc: Matlab scripts for reading and plotting COMPACT2 files"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
   Email Address:
* Your Comment:
* Enter the code below:
 
Related Articles
No related articles were found.
Attachments