file: logr_ntas_sofs_rec.html

LOGR53 (NTAS/SOFS) Record Format - Firmware Version 4.2x or later - 29 Mar 2012

The current record format provides for storage of data at each 1 minute sample interval. 64 bytes binary are currently stored per record in fixed format. (Note that this will likely change in the future). Storage is based upon a 'C' language structure shown here:


/* LOGR 64 byte packed data record structure for storage in FLASH */
struct LOGR_record
   {
   unsigned char hour;   /* time is not packed for ease of verifying */
   unsigned char min;
   unsigned char day;
   unsigned char mon;
   unsigned char year;   /* year is offset from 2000 (no good after year 2255 :-) */
   unsigned short record;   /* sequential record number from startup */
   unsigned char mux_parm;  /* which option parameter in this record */
   short we,wn;   /* wind speed m/sec */
                  /* (short)(we * 100) ==> +/- 327.67 m/s */
                  /* (short)(wn * 100) ==> +/- 327.67 m/s */
   unsigned short wsavg,wmax,wmin;      /* (ushort)(wsavg * 100) ==> 0 - 655.35 m/s */
                                        /* (ushort)(wmax * 100) ==> 0 - 655.35 m/s */
                                        /* (ushort)(wmin * 100) ==> 0 - 655.35 m/s */

   short vdavg,compass;  /* last vane degrees, last compass degrees */
                         /* (short)(vdavg * 10) ==> +/- 3276.7 degrees */
                         /* (short)(compass * 10) ==> +/- 3276.7 degrees */

   unsigned short bp;   /* barometer millibars */
               /* (ushort)((bp - 900.0) * 100) ==> 900.00 - 1555.35 mbar */

   short rh;  /* humidity %, deg C */
              /* (short)(rh * 100) ==> +/- 327.67 %RH */
   unsigned short th;  /* (ushort)((th + 20.0) * 1000) ==> -20.000 to +45.535 degC */

   short sr;  /* short wave w/m^2 */
              /* (ushort)(sr * 10) ==> +/- 3276.7 w/m^2 */

   unsigned short dome,body;  /* long wave dome and body thermistors
                                 deg Kelvin, thermopile microvolts */
                              /* (ushort)(dome * 100) ==> 0 - 655.35 degK */
                              /* (ushort)(body * 100) ==> 0 - 655.35 degK */
   short tpile;               /* (short)(tpile * 10) ==> +/- 3276.7 microvolts */

   short lwflux;  /* lwr flux */
                  /* (short)(lwflux * 10) ==> +/-3276.7 w/m^2 */

   short prlev;  /* precipitation values */
                 /* (short)(prlev * 100) ==> +/-327.67 mm */

   unsigned short sct; /* SeaCat sea temp deg C */
                       /* (ushort)((sct + 5.0) * 1000) ==> -5.000 to +60.535 degC */
   unsigned short scc; /* SeaCat conductivity Siemens */
                       /* (ushort)(scc * 10000) ==> 0.000 to +6.5535 Siemens/meter */

   short bat1,bat2,bat3,bat4;  /* misc. battery */
                               /* (short)(bat1 * 1000) ==> +/- 32.767 VDC */

   unsigned long opt_parm;     /* optional value indicated in mux_parm */
   unsigned char ird_stat;	   /* iridium & wmo status values */
   unsigned char wmo_stat;
   unsigned short spare1,spare2;      /* optional spare value */
   unsigned short used;         /* set to 0xA5A5 upon record write */
   };


Records may be dumped via XMODE command (very slow!) or by directly reading the removable FLASH storage card in a Linux-based PC.

A typical 64 byte binary record looks something like this (in HEX-ASCII):

0A222D150707CE01........841A0604FE0C3E247F4500F07F45A5A5

Wow! So now what!

First, note the following:
All integers are 2 bytes, stored MS byte first.

From the structures above, note that time is stored first, so:



TIME:
Bytes 0 - 4

0A22150700 is time as follows:



SEQUENTIAL RECORD NUMBER:
Bytes 5,6

A sequential record number is kept from power up - possibly useful for untangling problem data records with bad time ?? (may be eliminated in future software versions)



MUX'ED PARAMETER NUMBER (NOT USED - more detail later...):
Bytes 7

DATA VALUES (more detail later...):
Bytes 8 - 61

Refer to the 'C' structure above for position and packing of each 2-byte integer data value (remember, MS byte first)



SBD FLAGS
Bytes 56 - 57

Each single byte flag carries the most recent status for SBD transmission; in other words, the status for the transmission attempt at the top of the hour for data from the previous hour.

The flags are defined as follows:

#define SBD_OK 0			/* successful transmission */
#define SBDI_FAILED_TIMEOUT 1		/* no response from satellite */
#define SBDI_FAILED_ACK 2		/* bad ack from sat */
#define SBDWB_LOAD_FAILED 3		/* should never see these next 3 */
#define SBDWB_CMD_FAILED 4
#define SBDWB_BAD_CKSUM 5
#define SBD_READY 6			/* only on system reset (power up) before first transmission */



USED TAG
Bytes 62 - 63

These bytes are used to indicate that a record in FLASH storage has been written by the LOGR53. It is used internally by the instrument firmware to, for example, determine the next available record location upon power-up. These bytes should always be A5A5h in a used record, and FFFFh in an unused portion of the FLASH card.