All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
CalibratedHk.h
1 
9 #ifndef CALIBRATEDHK_H
10 #define CALIBRATEDHK_H
11 
12 //Includes
13 #include <TObject.h>
14 #include "AnitaConventions.h"
15 #include "simpleStructs.h"
16 
17 
18 #ifndef NUM_VOLTAGES
19 #define NUM_VOLTAGES 11
20 #endif
21 #ifndef NUM_CURRENTS
22 #define NUM_CURRENTS 7
23 #endif
24 #ifndef NUM_INT_TEMPS
25 #define NUM_INT_TEMPS 15
26 #endif
27 #ifndef NUM_SBS_TEMPS
28 #define NUM_SBS_TEMPS 3
29 #endif
30 #ifndef NUM_NTU_TEMPS
31 #define NUM_NTU_TEMPS 3
32 #endif
33 #ifndef NUM_EXT_TEMPS
34 #define NUM_EXT_TEMPS 15
35 #endif
36 #ifndef NUM_POWERS
37 #define NUM_POWERS 5
38 #endif
39 
40 #ifndef NUM_ATTITUDE
41 #define NUM_ATTITUDE 13
42 #endif
43 #ifndef NUM_PRESSURES
44 #define NUM_PRESSURES 2
45 #endif
46 #ifndef NUM_SUNSENSORS
47 #define NUM_SUNSENSORS 4
48 #endif
49 #ifndef NUM_ACCELEROMETERS
50 #define NUM_ACCELEROMETERS 2
51 #endif
52 
53 class RawHk;
54 
55 
57 
61 class CalibratedHk: public TObject
62 {
63  public:
64  CalibratedHk();
65  ~CalibratedHk();
66 
67  CalibratedHk(RawHk *hkPtr, RawHk *avzPtr, RawHk *calPtr);
68 
69  unsigned char gHdr_verId; // verId from GenericHeader_t
70  // GenericHeader_t gHdr;
71 
72  Int_t run;
73  UInt_t realTime;
74  UInt_t payloadTime;
75  UInt_t payloadTimeUs;
76 
77  Float_t voltage[NUM_IP320_BOARDS][CHANS_PER_IP320];
78  Float_t useful[NUM_IP320_BOARDS][CHANS_PER_IP320];
79  Float_t magX;
80  Float_t magY;
81  Float_t magZ;
82  Short_t sbsTemp[3];
83  Short_t ntuTemp[3];
84 
85  Float_t getInternalTemp(int index);
86  Float_t getSBSTemp(int index);
87  Float_t getNTUTemp(int index);
88  Float_t getExternalTemp(int index);
89  Float_t getVoltage(int index);
90  Float_t getCurrent(int index);
91  Float_t getPower(int index);
92  Float_t getAttitude(int index);
93  Float_t getPressure(int index);
94  Float_t getAccelerometer(int acInd, int type);
95  Float_t getRawSunsensor(int ssInd, int type);
96  Float_t getNeobrickTemp() {return useful[1][38];}
97  Float_t getNeobrickPres() {return useful[1][39];}
98 
99  //Sunsensor Stuff
100  void getSSMagnitude(int ssInd, Float_t *magnitude,Float_t *magX, Float_t *magY);
101  Float_t getSSTemp(int ssInd);
102  Int_t getSSXRatio(int ssInd, Float_t *xRatio);
103  Int_t getSSYRatio(int ssInd, Float_t *yRatio);
104  Int_t getFancySS(int ssInd, Float_t pos[3], Float_t *azimuth,
105  Float_t *elevation, Float_t *relAzimuth);
106 
107  Float_t getSSAzimuth(int ssInd);
108  Float_t getSSAzimuthAdu5(int ssInd);
109  Float_t getSSElevation(int ssInd);
110 
111  static const char *getPowerName(int index);
112  static const char *getCurrentName(int index);
113  static const char *getVoltageName(int index);
114  static const char *getExternalTempName(int index);
115  static const char *getInternalTempName(int index);
116  static const char *getSBSTempName(int index);
117  static const char *getNTUTempName(int index);
118  static const char *getAttitudeName(int index);
119  static const char *getSSName(int index);
120 
121  ClassDef(CalibratedHk,11);
122 };
123 
124 
125 #endif //CALIBRATEDHK_H
static const char * getAttitudeName(int index)
Return char string name of attitude sensor.
Float_t getVoltage(int index)
Returns voltage (0:10)
Int_t getFancySS(int ssInd, Float_t pos[3], Float_t *azimuth, Float_t *elevation, Float_t *relAzimuth)
Convert sunsensor data to elevation and azimuth.
void getSSMagnitude(int ssInd, Float_t *magnitude, Float_t *magX, Float_t *magY)
Get sunsensor magnitude.
Float_t getExternalTemp(int index)
Returns external temperature in degrees (0:24)
UInt_t payloadTime
Time in unixTime.
Definition: CalibratedHk.h:74
Float_t getNeobrickTemp()
Returns the neobrick temperature.
Definition: CalibratedHk.h:96
Float_t voltage[3][40]
Array of voltages.
Definition: CalibratedHk.h:77
Float_t getNTUTemp(int index)
Returns NTU temperature in degrees (0:3)
static const char * getSBSTempName(int index)
Return char string name of SBS temperature sensor.
static const char * getSSName(int index)
Return string name of sun-sensor.
Float_t getAccelerometer(int acInd, int type)
Returns accelerometer stuff.
Float_t getSSTemp(int ssInd)
Get sunsensor temperature.
UInt_t payloadTimeUs
Sub second time in us.
Definition: CalibratedHk.h:75
static const char * getExternalTempName(int index)
Return char string name of external temperature sensor.
Float_t getPower(int index)
Returns power (0:5)
Short_t ntuTemp[3]
The 7 (packed) NTU temperature sensors.
Definition: CalibratedHk.h:83
Float_t magY
Magnetometer y direction.
Definition: CalibratedHk.h:80
Float_t getRawSunsensor(int ssInd, int type)
Returns raw sunsensor stuff, here type goes x1,x2,y1,y2,T.
Float_t getPressure(int index)
Returns pressure (0:1)
Float_t getInternalTemp(int index)
Returns internal temperature in degrees (0:14)
RawHk – The Raw ANITA Housekeeping.
Definition: RawHk.h:24
static const char * getVoltageName(int index)
Return char string name of voltage.
Int_t getSSXRatio(int ssInd, Float_t *xRatio)
Get sunsensor x-ratio.
~CalibratedHk()
Default destructor.
CalibratedHk – The calibrated housekeeping data.
Definition: CalibratedHk.h:61
Float_t useful[3][40]
Array of calibrated temperatures, currents, etc.
Definition: CalibratedHk.h:78
Float_t magZ
Magnetometer z direction.
Definition: CalibratedHk.h:81
static const char * getNTUTempName(int index)
Return char string name of SBS temperature sensor.
Float_t magX
Magnetometer x direction.
Definition: CalibratedHk.h:79
Float_t getCurrent(int index)
Returns current (0:11)
Float_t getSBSTemp(int index)
Returns SBS temperature in degrees (0:3)
Short_t sbsTemp[3]
The three onboard temperature sensors.
Definition: CalibratedHk.h:82
Int_t run
Assigned offline.
Definition: CalibratedHk.h:72
Float_t getAttitude(int index)
Returns attitude (0:12)
static const char * getPowerName(int index)
Return char string name of power.
Int_t getSSYRatio(int ssInd, Float_t *yRatio)
Get sunsensor y-ratio.
static const char * getInternalTempName(int index)
Return char string name of internal temperature sensor.
CalibratedHk()
Default constructor.
Float_t getNeobrickPres()
Returns the neobrick pressure.
Definition: CalibratedHk.h:97
static const char * getCurrentName(int index)
Return char string name of current.
UInt_t realTime
Time in unixTime.
Definition: CalibratedHk.h:73