SOURCE PACKAGE

INTRODUCTION

This is the BINEX reading/writing library, designed to ease the pain of reading and writing BINEX format files. BINEX is short for BINary EXchange format. It is a proposed standard developed by UNAVCO for reading, writing and archiving GPS receiver and other similar data.

For more information on BINEX, see:

This library is designed to work with C/C++ and F77/F90 as well as Perl. It is designed to be portable to most any UNIX platform using the GNU auto configuration tools.

USAGE

This library takes care of the standard BINEX 'envelope' portions. Functions are included to read a BINEX record, strip off and interpret the communications headers and trailers and return the enclosed chunk of binary data.

A function is also included to write a BINEX record, given the actual binary data. Provisions are also made for reading and writing single fields from the binary data in an endian-neutral fashion. 'Endian-ness' refers to the order in which multi-byte binary numbers are stored on a system. A system which stores the number 1 in a 16-bit integer as 0x01 (00000000 00000001 in binary) is called 'big-endian'. A system which stores the same number as 0x10 (00000001 00000000 in binary) is called 'little-endian'.

Typical solutions to dealing with these incompatibilities (which are fundamental differences at the CPU level) involve either:

The BINEX approach is to allow either byte order, but to label it as to which it is, and to allow the user the choice of how to write the data depending on the type of computer most often used.

The typical pattern for reading might be:

  1. Open a BINEX file for reading
  2. Read the header
  3. Allocate space for the data
  4. Read the body
  5. Use the extract* functions for reading the data into the endian-ness expected on your machine
  6. Close the file.

For writing, this might be:

  1. Open a new BINEX file for writing
  2. Allocate a buffer for the binary data
  3. Use the append* functions for adding data to the buffer in the endian-ness you request.
  4. Use the write_binex function to add headers/trailers and write the record to a file.
  5. Close the file.

Some perl libraries have been added which allow more convenient, higher level access to reading and writing binex files. For information on these higher level interfaces, see the files:

For more information, see the header file binex.h, and the example files:

PLATFORMS

It has currently been ported to:

Hardware    OS         Compilers
--------    --         ---------
INTEL x86   Linux      gcc, g77
ALPHA       DEC UNIX   DEC cc, f77, f90 
SUN SPARC   Solaris    Sun cc, f77, f90

PREREQUISITES

  1. A UNIX system
  2. An ANSI C compiler
  3. A FORTRAN 77 compiler (optional)
  4. A FORTRAN 90 compiler (optional)
  5. The Perl language (optional) (see http://www.perl.org)
  6. The SWIG interface generation package (needed for Perl support, see http://www.swig.org)

INSTALLATION

These are the basic steps, for more information on GNU configure options, see INSTALL.

> ./configure --prefix=/usr/local  # or whatever
> make
> make check
> make install  (this must be done as root, unless you specify a 'libdir' 
                 or a 'prefix' which is user writable)

For more information on the GNU configure script, see the INSTALL file in the package.