OAP File Format

Version 1

National Center for Atmospheric Research

Research Aviation Facility

Table of Contents


The goal of this file format is to provide a common packaging for PMS2D, HVPS, 2DS, Greyscale, and other OAP probes that produce a 4,096 byte data record, regardless of the format of the contents of the 4KB record.

Work may continue on a particle frame or record in the future.

NCAR-RAF OAP Format Page Contains more information on historical data, and formats of some of the internal 4KB buffers.

File Component Descriptions

1 File header

The file header is in ASCII XML. Example:

  <?xml version="1.0" encoding="ISO-8859-1"?>
  <OAP version="1">
   <Institution>NCAR Research Aviation Facility</Institution>
    <probe id="C4" type="Fast2DC" resolution="25" nDiodes="64" clockFreq="12" laserWaveLength="658" serialnumber="F2DC003" suffix="_LPO"/>
    <probe id="C6" type="Fast2DC_v2" resolution="10" nDiodes="64" clockFreq="33.333" laserWaveLength="660" serialnumber="F2DC002" suffix="_LPC"/>

    <probe id="P1" type="TwoDP" resolution="200" nDiodes="32" serialnumber="2DP10" suffix="_RWI"/>

Additional meta-data may present and is encouraged. Each line is ended with a new-line character ('\n').


Attribute Description
There will be one probe element for each probe that is present in the data file.
Required A two letter key or short integer that uniquily identify the probe in the file. Some standard values are listed below.
Required Resolution of probe in micrometers. Typically diode diameter.
Required Number of diodes in the probe. 32 for the traditional PMS2D probes. 128 for the 3V-CPI.
Highly recommended Probe serial number, for documentation purposes or calibration lookup.
Highly recommended Short description to identify probe type.
Optional For use in identifying location and grouping variables. Should start with an undescore. Required for RAF processing use.
Optional Timing word clock frequency in Mhz.
Optional Laser wave length in nanometers.
Optional Identify byte order. Options are "big" or "little". Default is "big".

Highly Recommended

Attribute Description
URL pointing to this description.
The scientific project that produced the data.
The date on which the data was created.

2 Record Format

The PMS-2D raw data comes in 4 kilo-byte records of 32 bit slices from the probe (1024 slices). The interface card then wraps a record header around that with time stamp and other pertinent information. The data is stored in big-endian format, so all data will need to be swapped when used on Intel architecture (Linux or MS Windows).

OAP Logical Record Format
/* Values currently in use for the 'id' field. */
// Traditional 32 diode PMS2D probes.
#define PMS2DC1         0x4331
#define PMS2DC2         0x4332
#define PMS2DP1         0x5031
#define PMS2DP2         0x5032

// 64 diode Fast 2DC, 25um.
#define PMS2DC4         0x4334
#define PMS2DC5         0x4335
// 64 diode Fast 2DC, 10um.
#define PMS2DC6         0x4336
// 64 diode Fast 2DP, 200um.
#define PMS2DP4         0x5034

// 64 diode DMT CIP, 25um.
#define PMS2DC8         0x4338
// 64 diode DMT PIP, 100um.
#define PMS2DP8         0x5038

// Greyscale which we never flew.
#define PMS2DG1         0x4731
#define PMS2DG2         0x4732

#define HVPS1           0x4831
#define HVPS2           0x4832
#define SPEC2D3H        0x3348
#define SPEC2D3V        0x3356
#define SPEC2DSH        0x5348
#define SPEC2DSV        0x5356

struct P2d_rec {
  int16_t id;				/* 'P1','C1','P2','C2', H1, etc */
  int16_t hour;
  int16_t minute;
  int16_t second;
  int16_t year;				/* starting in 2007 w/ PACDEX */
  int16_t month;			/* starting in 2007 w/ PACDEX */
  int16_t day;				/* starting in 2007 w/ PACDEX */
  int16_t tas;				/* true air speed, m/s	*/
  int16_t msec;				/* msec of this record	*/
  int16_t overld;			/* overload time, msec	*/
  unsigned char data[4096];		/* image buffer		*/
typedef struct P2d_rec P2d_rec;

The id word tells whether it is a 2d-C, 2d-P or an HVPS. The 1 or 2 signifies first or second probe. Hex values are 'C1' = 0x4331, 'P1' = 0x5031 etc. int16_t is typically known as a 16 bit short.

Time stamp
The hour, minute, second, and msec belong to the LAST slice of the record. This is traditionally stamped by the data system after it is interrupted by the probe that it is ready to download data.

True Air Speed
The true air speed (tas) truncated or rounded to the nearest meter per second.

The overld value is the amount of time in milliseconds the probe was shut off while the interface card was unloading data.

Utility Programs

Software related to OAP probes is all located in one github repository https://github.com/ncar/aircraft_oap. Check out with 'git clone --recursive https://github.com/ncar/aircraft_oap'.

For further information contact:

Chris Webster
National Center for Atmospheric Research
Research Aviation Facility
(303) 497-1044


Last update: Fri Jun 29 07:23:32 MDT 2018