MAG Level 1 Data Structures



mag_fft.h , v 1.7


#include "hdfi.h"

#define FFTBIN 32                /* 32 FFT frequency bins            */
#define MJ_FFT_CYC 5             /* Major frames per FFT cycle       */

struct MagFFTSet                 /* setkey=fG                           */
{
  uint32 sctime_readout;       /* 32 bit spacecraft readout time  */
  uint32 sctime_collection;       /* 32 bit spacecraft collection time  */

  uint32 QAC;			/* number of missing frames in this cycle */

  uint16 fft_statbits[MJ_FFT_CYC];   /* bits 15-9 - unused (=0) */
				     /* bit  8    = Rg (ST5 bit 2) */
				     /* lsByte    = ST6         */

  uint8 fft_val[10][FFTBIN];
  /* first index = 0 -> X-axis FFT transform real output    */
  /* first index = 1 -> Y-axis FFT transform real output    */
  /* first index = 2 -> Z-axis FFT transform real output    */
  /* first index = 3 -> X-Y cross-spectra real output       */
  /* first index = 4 -> X-Y cross-spectra imaginary output  */
  /* first index = 5 -> X-Z cross-spectra real output       */
  /* first index = 6 -> X-Z cross-spectra imaginary output  */
  /* first index = 7 -> Y-Z cross-spectra real output       */
  /* first index = 8 -> Y-Z cross-spectra imaginary output  */
  /* first index = 9 -> magnitude FFT transform real output */
};

mag_hskp.h , v 1.9

#include "hdfi.h"

struct MagHskpSet
{
  uint32 sctime_readout;           /* 32 bit spacecraft readout time  */
  uint32 sctime_collection;        /* 32 bit spacecraft collection time  */

  uint32 QAC;              /* number of missing frames in this cycle */
  uint8 QACarr[16]; /* each entry corresponds to a single minor frame */
		    /* if value =0 frame is OK.  =1 frame contains fill data*/

  uint8 st1a;            /* status byte 1, minor frame 1         */
  uint8 st2a;            /* status byte 2, minor frame 2         */
  uint8 st3;             /* status byte 3                        */
  uint8 st4;             /* status byte 4                        */
  uint8 st5;             /* status byte 5                        */
  uint8 st6;             /* status byte 6                        */
  uint8 pctemp;          /* power converter temperature status   */
  uint8 cmon;            /* current monitor reading status       */
  uint8 st1b;            /* status byte 1, minor frame 9         */
  uint8 st2b;            /* status byte 2, minor frame 10        */
  uint8 hk1;             /* housekeeping byte 1                  */
  uint8 hk2;             /* housekeeping byte 2                  */
  uint8 hk3;             /* housekeeping byte 3                  */
  uint8 hk4;             /* housekeeping byte 4                  */
  uint8 hk5;             /* housekeeping byte 5                  */
  uint8 sync;            /* sync byte, TBD                       */
  uint16 st;             /* st byte(s), TBD                      */ 
  uint8 in_temp;         /* inboard temperature                  */
  uint8 out_temp;        /* outboard temperature                 */
  uint8 in_pwrlvl;       /* inboard heater power level           */
  uint8 out_pwrlvl;      /* outboard heater power level          */
  uint8 current;         /* MAG current                          */
  uint8 SenIntTempPosY;  /* MAG +Y Sensor Interface Temp         */
  uint8 SenIntTempNegY;  /* MAG -Y Sensor Interface Temp         */
  uint8 MagPowBits;      /* MAG Power/Ordinance Bits */
				/* 7 - Main Sys Power A -       Bit pos  15 */
				/* 6 - Main Sys Power B -       Bit pos  16 */
				/* 5 - Main Int Heaters -       Bit pos  19 */
				/* 4 - Main Interface Heater -  Bit pos  56 */
				/* 3 - Main Boom Y Axis Arm  -  Bit pos  67 */
				/* 2 - Backup Boom Y Axis Arm-  Bit pos  72 */
				/* 1 - Unused -                             */
				/* 0 - Unused -                             */
};

mag_snapshot.h , v 1.6

#include "hdfi.h"

#define SNPVAL 21
#define SNAPCYCLELEN 340  /* The snapshot buffer is 340 major frames long */

struct MagSnapSet                   /* setkey=sG                     */
{
  uint32 sctime_readout;            /* 32 bit spacecraft readout time  */
  uint32 sctime_collection;            /* 32 bit spacecraft collection time  */

  uint32 QAC;                       /* number of missing frames in this cycle*/

         /* 21 x, y and z values per major frame  */
  uint16 hxyz[3][SNPVAL*SNAPCYCLELEN];

};

mag_vector.h , v 1.5

#include "hdfi.h"

#define MAGNUMVCT 96
#define MAGVECDIM 3

struct MagVectorSet
{
  uint32 sctime_readout;         /* 32 bit spacecraft readout time    */
  uint32 sctime_collection;         /* 32 bit spacecraft collection time    */

  uint32 QAC;              /* number of missing frame in this cycle */

  int16 vector[MAGVECDIM][MAGNUMVCT];  /* component of magnetic vector  */
};

mag_avgvec.h , v 1.2

#include "hdfi.h"

#define MAGAVGDIM 3

struct MagAvgVec
{
  uint32 sctime_readout;          /* 32 bit spacecraft readout time.    */
			          /* scclock for first minor frame */
  uint32 sctime_collection;       /* 32 bit spacecraft collection time    */
                                  /* beginning of MAG data collection cycle */
  uint32 QAC;                     /* number of missing minor frames in this 16-sec cycle */

  float64 b_inertial[MAGAVGDIM];  /* 16 second average mag vector in despun s/c */
			          /* inertial coordinates */
  float64 b_sigma;		  /* dBrms over 16 seconds */
};

magframe_out_br.h , v 1.7

#include "hdfi.h"

struct MagFrm_out_br
{
  float64 bin_start;  /* beginning of bin. # of sec since Jan 1 1996 UTC */
  float64 bin_end;    /* end of bin. # of sec since Jan 1 1996 UTC */

  float64 b_out[3];
  float64 b_mag_av;
  float64 b_sigma;
  uint32 iflag_out;
  uint8  weight;
};

/*The identity of the variables is as follows: */
/*b_out[3]	are the 3 (R,T,N) components of the output 16-second */
/*		average of the IMF. */
/*b_mag_av      the value of <|B|> computed over 16 seconds */
/*b_sigma       dBrms over 16 seconds */
/* weight       number of individual measurements in the average */
/*iflag_out	obsolete. Now set to be same as weight */

For comments, questions or suggestions regarding these data structures,
email: asc@srl.caltech.edu
Last update: Wed Nov 3 12:45:31 PST 1999