/* * telemetry_new.h * * Created on: Jun 13, 2012 * Author: root */ #ifndef TELEMETRY_NEW_H_ #define TELEMETRY_NEW_H_ #pragma pack(1) typedef struct telemetry_critical_CIM { float anode_current[16]; unsigned short scr[16]; unsigned short ccr; unsigned short pcr; unsigned char DRS_runtime_error_status[4]; unsigned char ps_status; unsigned short Temp_status; unsigned short dis_pmt0 :1; unsigned short dis_pmt1 :1; unsigned short dis_pmt2 :1; unsigned short dis_pmt3 :1; unsigned short dis_pmt4 :1; unsigned short dis_pmt5 :1; unsigned short dis_pmt6 :1; unsigned short dis_pmt7 :1; unsigned short dis_pmt8 :1; unsigned short dis_pmt9 :1; unsigned short dis_pmt10 :1; unsigned short dis_pmt11 :1; unsigned short dis_pmt12 :1; unsigned short dis_pmt13 :1; unsigned short dis_pmt14 :1; unsigned short dis_pmt15 :1; }; typedef struct telemetry_routine_CIM { char temp_sdd1_1; char temp_sdd1_2; char temp_sdd2_1; char temp_sdd2_2; char temp_ps; unsigned short disc_thresh[16]; unsigned int scr[16]; unsigned short hv[16]; unsigned short AI_CA_status; unsigned short SCR_CA_status; unsigned short AI_LV1_status; unsigned short AI_UV1_status; unsigned short SCR_LV1_status; unsigned short SCR_UV1_status; unsigned short Discr_error_status; unsigned short HV_error_status; }; typedef struct Time { short tm_sec; short tm_min; short tm_hour; short tm_mday; short tm_mon; short tm_year; }; //tel_crit typedef struct tel_crit_new { telemetry_critical_CIM tel_crit_CIM[68]; //read from CIM unsigned short pcr_sys; //read from SBC-SLTG unsigned char status_DC[4]; //read from SBC-DC unsigned char status_SLTG[3]; //read from SBC-SLTG //to be finalized unsigned char status_TC[5]; //read from SBC-TC unsigned char status_LC[2]; //read from SBC-LC Time time; }; //tel_rout typedef struct tel_rout_new { telemetry_routine_CIM tel_rout_CIM[68]; unsigned char temp_LOC[8]; //read from SBC-TC Time time; }; struct FILE_HEADER { char TELESCOP[10]; // [OGIP2] Telescope/mission Name char EXTNAME[15]; // [HEASARC] Data is whether ACE/Calib/sky event/profile int RUN_ID; // [MACE.R1] Observation Run number/identifier int FLCOUNT; // [MACE.R1] File counter for the particular run char DATE_OBS[15]; // [HEASARC] Run Start date (yyyy-mm-dd) char TIME_OBS[10]; // [HEASARC] Run Start Time (hh:mm:ss) char DATE_END[15]; // [HEASARC] Run End date (yyyy-mm-dd) char TIME_END[10]; // [HEASARC] Run End Time (hh:mm:ss) double TSTART; // [HEASARC] Run Start Time in seconds since telescope installation day double TSTOP; // [HEASARC] Run End Time in seconds since telescope installation day double TELAPSE; // [HFWG.R11] Diff of start and end times int MJDREFI; // [HEASARC] Run Start MJD (integer part) float MJDREFF; // [HEASARC] Run Start MJD (fractional part) char TIMEUNIT[5]; // [HEASARC] Time unit of MJD ['days'] char TIMESYS[3]; // [HEASARC] 'TT' (Terrestrial Time) char TIMEREF[5]; // [HEASARC] 'local' / ‘UT’ char OBJECT[15]; // [HEASARC] Observed Object float RA_OBJ; // [HFWG.R3] Object RA [deg] float DEC_OBJ; // [HFWG.R3] Object DEC [deg] float RA_PNT; // [HFWG.R3] Pointing position RA [deg] float DEC_PNT; // [HFWG.R3] Pointing position dec [deg] float ALT_STA; // [MACE.R1] Start altitude position of telescope (deg) float ALT_END; // [MACE.R1] End altitude poisition of telescope (deg) float AZ_STA; // [MACE.R1] Start azimuth position of telescope (deg) float AZ_END; // [MACE.R1] End azimuth position of telescope (deg) char PNTMODE[8]; // [MACE.R1] Mode of Pointing (`track', `drift',’wobble’) char RADECSYS[5]; // [HFWG.R3] Co-ordinate system used ('fk5') float EQUINOX; // [HEASARC] Equinox used for co-ordinates (2000.0 for J2000) char OBSERVER[10]; // [HEASARC] Proposer's name int N_TELS; // [MACE.R1] No. of telescopes observing during this run char TELLIST[20]; // [MACE.R1] List of telescope IDs which are observing char TEL_ID[5]; // [MACE.R1] ID of the telescope which produced this event file char CREATOR[10]; // [HFWG.R7] Utility which generated this file `progname v1.2.3' char DATAFORV[10]; // [MACE.R1] Data format version char EVTVER[10]; // [MACE.R1] event-list version number float CAM_GAIN; // [MACE.R1] Average gain for all the camera pixels char DATARED[15]; // [MACE.R1]  Data compression method implemented int N_PIXELS; // [MACE.R1]  Total No. of pixels  alive during the observation int N_TRGPXL; // [MACE.R1]  Total no. of pixels available for Trigger generation int NSLC_PLS; // [MACE.R1] No. slices in which pulse profile is divided float TRIG_THR; // [MACE.R1]  MACE Trigger threshold value char TRIG_MUL[8]; // [MACE.R1]  MACE Trigger multiplicity char ONMODULES[68]; // [MACE.R1] string                                                 Module bit pattern (on/off) char EXTRA_KEY1[10]; // [MACE.R1] char EXTRA_KEY2[10]; // [MACE.R1] char EXTRA_KEY3[10]; // [MACE.R1] char EXTRA_KEY4[10]; // [MACE.R1] char EXTRA_KEY5[10]; // [MACE.R1] unsigned long CRC32SUM; // [MACE.R1] CRC32 Checksum value to test the integrity of the file } head; #endif /* TELEMETRY_NEW_H_ */