sakthi priya amirtharaj
/
BAE_acsbeahk
acs bea hk together
Fork of BAE_vr3honeycomb1_christmas by
Embed:
(wiki syntax)
Show/hide line numbers
HK.h
00001 //to be saved as HK.h 00002 00003 #include "mbed.h" 00004 #define tstart -40 00005 #define tstep 8 00006 #define tstep_thermistor 8//verify!! 00007 #define tstart_thermistor -40 00008 #define vstart 3.3 00009 #define vstep 0.84667 00010 #define cstart 0.0691 00011 #define cstep 0.09133 00012 #define rsens 0.095 00013 #define Bnewvalue_start -100//in microTesla...max possible field is .0001 T 00014 #define Bnewvalue_step 13.333 00015 #define AngularSpeed_start -10//max possible ang. velocity in space is 10 deg/sec 00016 #define AngularSpeed_step 1.3333 00017 00018 00019 00020 typedef struct SensorData 00021 { 00022 float Voltage[16]; 00023 float Current[8]; 00024 float Temperature[1]; 00025 float PanelTemperature[4]; 00026 float BatteryTemperature; //to be populated 00027 char faultpoll; //polled faults 00028 char faultir; //interrupted faults 00029 char power_mode; //power modes 00030 00031 float AngularSpeed[3]; //in order x,y,z 00032 float Bnewvalue[3]; //in order Bx,By,Bz 00033 00034 00035 } SensorData; 00036 00037 00038 typedef struct SensorDataQuantised { 00039 char Voltage[8]; 00040 char Current[4]; 00041 char Temperature[1]; 00042 char PanelTemperature[2];//read by the 4 thermistors on solar panels 00043 char BatteryTemperature; //to be populated 00044 char faultpoll; //polled faults 00045 char faultir; //interrupted faults 00046 char power_mode; //power modes 00047 char AngularSpeed[2]; 00048 char Bnewvalue[2]; 00049 00050 //float magnetometer,gyro=>to be addes 00051 } SensorDataQuantised; 00052 00053 00054 typedef struct ShortBeacon 00055 { 00056 char Voltage[1]; //battery voltage from gauge, needs to be quantised 00057 char AngularSpeed[2]; //all the 3 data 00058 char SubsystemStatus[1]; //power modes 00059 char Temp[2]; //temp of solar panel 00060 //Temp[0]'s LSB=> PanelTemperature[0], Temp[0]'s MSB=> PanelTemperature[1], Temp[1]'s LSB=> PanelTemperature[2], Temp[1]'s MSB=> PanelTemperature[3] 00061 char ErrorFlag[1]; //fault 00062 }ShortBeacy; 00063 00064 00065 00066 void FUNC_HK_MAIN(); 00067 00068 int quantiz(float start,float step,float x); 00069 void init_beacon(ShortBeacy* x,SensorDataQuantised y);
Generated on Wed Jul 13 2022 21:19:31 by 1.7.2