LE YOU / func

Dependents:   mas

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RawData.h Source File

RawData.h

00001 #include "mbed.h"
00002 
00003 #ifndef __MAS_RAW_DATA_H__
00004 #define __MAS_RAW_DATA_H__
00005 
00006 class RawData
00007 {
00008 public:
00009     time_t __time;
00010     float __temp;               // unit : Degree Celsius
00011     float __humi;               // unit : %
00012     float __prss;           // unit : kPa
00013     int32_t __acc[3];           // unit : 
00014     int32_t __gyr[3];           // unit :
00015     int32_t __mag[3];           // unit :
00016     float __temp_offset;        // unit : Degree Celsius
00017     float __humi_offset;        // unit : %
00018     float __pressure_offset;
00019     float __altitude_offset;    // unit : m
00020     int32_t __acc_offset[3];    // unit :
00021     int32_t __gyr_offset[3];    // unit :
00022     int32_t __mag_offset[3];    // unit :
00023     
00024 public:
00025     RawData();
00026     void add_year_10();
00027     void add_year_1();
00028     void add_month();
00029     void add_day();
00030     void add_hour();
00031     void add_min_10();
00032     void add_min_1();
00033     void add_sec_10();
00034     void add_sec_1();
00035     void add_temp_sign();
00036     void add_temp_10();
00037     void add_temp_1();
00038     void add_temp_1_10();
00039     void add_humi_10();
00040     void add_humi_1();
00041     void add_humi_1_10();
00042     void add_altitude_1();
00043     void add_altitude_10();
00044     void add_altitude_100();
00045     void add_altitude_1000();
00046     time_t calc_datetime();
00047     float calc_temperature();
00048     float calc_humidity();
00049     int32_t calc_altitude();
00050     int32_t calc_cpassdir();
00051     void str_date(char *buffer);
00052     void str_time(char *buffer);
00053     void str_temperature(char *buffer);
00054     void str_humidity(char *buffer);
00055     void str_pressure(char *buffer);
00056     void str_altitude(char *buffer);
00057     void str_magnetic(char *buffer);
00058     void str_direction(char *buffer);
00059     
00060 private:
00061     char* printDouble(char* str, double v,int integerDigits=2, int decimalDigits=1);
00062 };
00063 
00064 
00065 #endif // __MAS_RAW_DATA_H__