Home Page     Data Center     Research Tools     Post Process Results     Climate Processing     Internal  
  Data Access     Batch Data Downloads     Data Download Interface     FTP Access     File Formats     Documentation     CDAAC Data Users FAQ  

1. Introduction

The cosmic data bit streamer (CDBS) computers all run a 2.4-based kernel patched with the Real Time Application Interface (RTAI) v. 3.1 patch. The OpenGPS software consists of a few different binaries:

  • ogrt_module: Kernel-side module that implements the heart of the GPS receiver
  • ogr: User-side binary to read input files and dump any data files
  • ogMenu: User-side binary to display receiver status
  • ogLCD: User-side binary to drive LCD and dump status to ~/.plan file.

All the user-side binaries are installed in /usr/local/bin. The OpenGPS source can be found in /usr/local/src/OpenGPS.

2. Startup

When the computer is turned on, the following services start automatically:

  • /etc/init.d/net.eth0 - Network service, assumes DHCP unless changed via LCD
  • /etc/init.d/sysklogd - Provides message logging services for the system
  • /etc/init.d/sshd - Secure shell daemon
  • /etc/init.d/crond - Provides ability to run scripts at certain times
  • /etc/init.d/xinetd - Starts rsync and finger daemons on request
  • /etc/init.d/local - This scripts kicks off all the OpenGPS binaries listed below

The local script starts the following binaries:

  • ogrt_module - Inserts the necessary modules into the kernel
  • ogr - Runs the user-side OpenGPS binary
  • ogLCD - Starts the LCD program

The above parameters are set in /etc/conf.d/local.start.

3. OpenGPS

As soon as the system is started, OpenGPS will start to acquire satellites. The OpenGPS program for the Cosmic Data Bit Streamer sequentially cycles through the 32 PRNs searching for satellite signals. It does not use a priori information to acquire satellites, and therefore is robust with respect invalid time, position, or satellite ephemeris data. Satellites will be tracked until loss of lock. If a channel is not tracking, it is always attempting to acquire an untracked PRN.

There will be three directories in the /home/cdbs folder:

  1. data/ - Frame data is dumped into data/frames
  2. input/ - The input files to set up the OpenGPS code are located here
  3. log/ - Log files will go here

3.1. Data Files

Data files are created in the following format:

  • PRN - Satellite PRN (not SV number)
  • YYYYMMDD - Year,Month,Day
  • HH - Hour
  • hostName - As obtained from gethostname function call (cdbs)
  • hostNumber - 01-10 (cdbs01-cdbs10)
  • frameStart - GPS time for frame 1 start (time in seconds since initial GPS epoch)
  • sfMask - Binary mask of subframes in file (bit0=sf1, bit4=sf5). 0=not present, 1=present.
  • sfParityMask - If bit is set, then that subframe passed parity.
  • CN0 - Average Carrier to Noise ratio for that frame

The data file is defined by the following structure:

char hostName[8];
UINT8 prn;
UINT8 sfMask;
UINT8 sfParityMask;
UINT32 frameStart;
UINT32 subframe1[10]
UINT32 subframe2[10]
UINT32 subframe3[10]
UINT32 subframe4[10]
UINT32 subframe5[10]

(216 bytes)

An example file name:


This file indicates cdbs01 was tracking PRN02 on 21 March 2005 with a CN0 of 49dBHz during hour 10 (GPS time). All subframes were present and all parity passed.

3.2. Logs

User-side and kernel-side OpenGPS logs are stored in log/logmsg_info (the logmsg_err is not currently used). This file contains information about when the system time was set to GPS (and what the offset was), when a satellite is being tracked, etc.

3.3. Finger

The ogLCD program updates /home/cdbs/.plan every 60 seconds with OpenGPS status information (this same information can be seen on the LCD). In order to access this information, a simple finger request can be done to the host:

cdbs@cdbs01 data  finger cdbs@localhost
cdbs01 20050323-2349 08 *

See ogLCD for more information on what this output means.

3.4. Update code

To check out the newest OpenGPS code, follow the following steps:

  1. change to user root
    su root
  2. change to the OpenGPS directory
    cd /usr/local/OpenGPS
  3. run cvs update
    cvs up
  4. stop the OpenGPS code
    /etc/init.d/local stop
  5. compile the newest code
    cd src/ogr && make
  6. restart the OpenGPS code
    /etc/init.d/local start

4. Shutdown

When a shutdown command is issued via the LCD, the script /etc/init.d/local stop is run. The configuration settings is read from /etc/conf.d/local.stop. This script removes the OpenGPS kernel module with the following command modprobe -r ogrt_module. The file /etc/modules.d/ogrt is read before removing the kernel module. This file tells the module remover to first run /usr/local/bin/ before removing the kernel module. This script does the following:


killall ogMenu
killall ogLCD
killall ogr

sleep 2

exit 0

The script ensures all OpenGPS user-side binaries are stopped before removing the kernel module. A kernel oops is caused if these programs are not killed before removing the kernel modules because of shared memory not being de-allocated correctly.