www.pudn.com > opengpssim.zip > readme


******************************* ReadMe ****************************** 
 
 
           OpenGPSSim - A simple software GPS signal correlator 
 
                            Version: 0.1.1 
 
 
 
  OpenGPSSim is a _simple_ GPS receiver simulation tool. OpenGPSSim 
  is based on Clifford Kelley's (cwkelley@earthlink.net)  
  OpenSourceGPS distribution (see www.home.earthlink.net/~cwkelley).  
  Several routines are taken from Antonio Tabernero Galan's gar2rnx  
  tool (see artico.lma.fi.upm.es/numerico/miembros/antonio/async/) 
 
* This program is free software; you can redistribute it and/or modify * 
* it under the terms of the GNU General Public License as published by * 
* the Free Software Foundation; either version 2 of the License, or    * 
* (at your option) any later version.                                  * 
*                                                                      * 
* This program is distributed in the hope that it will be useful,      * 
* but WITHOUT ANY WARRANTY; without even the implied warranty of       * 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        * 
* GNU General Public License for more details.                         * 
*                                                                      * 
* You should have received a copy of the GNU General Public License    * 
* along with this program; if not, write to the Free Software          * 
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            * 
 
  ***************************************************************** 
    The files 'gpsfuncs.cpp', 'gpsrcvr.cpp' and 'gp2021.cpp' are  
    modified versions of the files with the same name from Clifford  
    Kelley's OpenSourceGPS distribution. The unmodified files can  
    be obtained from http://www.home.earthlink.net/~cwkelley 
  ***************************************************************** 
 
--------------------------------------------------------------------- 
 
  OpenGPSSim is composed of three programs: 
 
  'ogsxmit' calculates a downconverted, 2-bit quantized GPS signal 
  and writes the data to './data/ogsraw.dat'. Navigation data is read 
  from input files, one file for each satellite. Sampling frequency is  
  5.7 MHZ, 4 samples are stored in one byte (8 bit). Therefore,  
  'ogsxmit' produces about 1.4 MByte per second simulation time.  
  Simulation time and other parameters are set in parameter file  
  './bin/xmit_par.dat'. 
 
  'ogsrcvr' reads the downconverted GPS signal from './data/ogsraw.dat',  
  tracks it and - if successful - writes the navigation message (1 frame,  
  1500 bits) to files './data/nav-out-PRN' (PRN=1,...,32)., in-phase and  
  quad-phase values are written to './data/iq-out-PRN', carrier frequency  
  doppler is stored in './data/carfrq-out-PRN'. Parameters are set in  
  parameter file './bin/rcvr_par.dat'. 
 
  'ogsencdec' translates navigation messages between binary and ASCII 
  formats. 
 
--------------------------------------------------------------------- 
 
  Installation: 
 
  1) unzip the zip-archive 

  2) cd to subdirectories 'encdec', 'xmit' and 'rcvr' and compile, 
     i.e. (OGSROOT : OpenGPSSim root directory) 

       cd ${OGSROOT}/encdec; make        cd ${OGSROOT}/xmit; make        cd ${OGSROOT}/rcvr; make      
     executables 'ogsencdec', 'ogsxmit' & 'ogsxmit' are placed in  
     subdirectory '${OGSROOT}/bin'. 
 
--------------------------------------------------------------------- 
 
  Example simulation procedure: 
 
  1)  generate navigation messages: 
 
  First the 1500 bit navigation message has to be generated. (1500 bit 
  at 50 Hz corresponds to 30 seconds simulation time. For longer time 
  periods the same message is re-used. Subcommutation of subframe 4 & 5 
  is not yet implemented). 
   
  Two template files are found in './data/': 
 
    nav-01-template-01-06.txt 
    nav-11-template-01-06.txt 
 
  Files names can be chosen freely. However, the satellite PRN must 
  be present and the extensions has to be '.txt' (indicating ASCII format). 

     cd ${OGSROOT} 
    ./bin/ogsencdec nav-01-template-01-06.txt 
    ./bin/ogsencdec nav-11-template-01-06.txt 
 
  translates both files into 1500 byte binary format; the result is written  
  to: 
 
    nav-01-template-01-06 
    nav-11-template-01-06 
 
 
  [Remark: If you own a Garmin GPS receiver you might be able to use 
   Antonio Tabernero Galan's async/gar2rnx tool to extract the navigation 
   data from real observations 
   (see artico.lma.fi.upm.es/numerico/miembros/antonio/async/).  
   An example file is '${OGSROOT}/data/393540x36.g12', the navigation data 
   can be extracted using 'ogsencdec' as well. The command 
 
    cd ${OGSROOT} 
    ./bin/ogsencdec -l -a 393540x36.g12 
 
   lists all PRN present in this data file. Then, e.g. 
 
    cd ${OGSROOT} 
    ./bin/ogsencdec -s 1 -a 393540x36.g12 
 
   extracts all navigation frames transmitted by satellite PRN=1. 
   A pair of files (binary and ASCII) is created for each complete  
   navigation frame found: 
 
    nav-PP-WWWW-SSSSSS-AA-BB 
    nav-PP-WWWW-SSSSSS-AA-BB.txt 
 
   where 
 
    PP      : PRN  
    WWWW    : GPS week number 
    SSSSSS  : time of week [sec] 
    AA      : page number in subframe 4 
    BB      : page number in subframe 5 
 
   Files with extension 'txt' are ASCII files, file without extension 
   are binary files.] 
 
 
  2)  once the navigation messages are generated, calculation of simulated  
  GPS signal can be started with: 
 
    cd ${OGSROOT} 
    ./bin/ogsxmit -n nav-PRN-template-01-06 
 
  Control parameters are read from './bin/xmit_par.dat'. 'ogsxmit' writes  
  output to './data/ogsraw.dat'. Currently, a simulation time period 
  is set to 45 seconds in './bin/xmit_par.dat'. Therefore,  
  './data/ogsraw.dat' grows to more than 60 MByte. 
 
  3)  the signal tracking process is started by 
 
    cd ${OGSROOT} 
    ./bin/ogsrcvr -i -r 
 
  produces for each PRN found in the signal output files (in our example 
  PRN 1 and 11 are present): 
 
    nav-out-01 and nav-out-11 
    iq-out-01 and iq-out-11 
    carfrq-out-01 and carfrq-out-11 
 
  4)  analyse navigation data files 
 
    cd ${OGSROOT} 
    ./bin/ogsencdec -r nav-out-01 
    ./bin/ogsencdec -r nav-out-11 
 
  translates the contents of nav-out-01 and nav-out-11 to ASCII format 
  and writes it to 
 
    nav-out-01.txt 
    nav-out-11.txt 
 
  The values found in these files should correspond to those of the 
  input files 
 
    nav-01-template-01-06.txt 
    nav-11-template-01-06.txt 
 
  It is instructive to plot the in-phase and quad-phase values stored  
  in data files: 
 
    iq-out-01 and iq-out-11 
 
  (these are binary files - data formats are described in  
  './doc/dataformats.txt') 
 
--------------------------------------------------------------------- 
 
  Notes: 
 
  'ogsxmit' writes about 1.4 MByte of data per second simulation 
  time. Thus, a 30 seconds simulation (1 data frame) produces 
  about 42 MByte of data. 
 
  Currently, 'ogsxmit' does _not_ take into account GPS satellites  
  positions and receiver location. Thus, calculation of receiver  
  position is not performed. 
 
  The simulation is _much_ slower than real time: it takes about 
  20 sec to construct and about 10 sec to track 1 sec of data on  
  a 450 MHZ PC. Tracking speed can be increased by reducing the  
  number of active channels (parameter 'number active channels'  
  in parameter file 'bin/rcvr_par.dat', maximum value is 12). 
   
  The software receiver is a 12 channel, single wavelength receiver,  
  C/A code only, carrier and code 2nd order Costas PLL (code aiding  
  not yet implemented). PLL parameters set by parameter file  
  './bin/rcvr_par.dat' 
 
  File formats are described in './doc/dataformats.txt' 
 
--------------------------------------------------------------------- 
 
Send comments and suggestions to gbeyerle@gfz-potsdam.de 
 
*********************************************************************