Weather casting with Machine Learning (SVM and SRNN).

Dependencies:   EthernetInterface GraphicHandler NTPClient SRNN SVM SensorModule mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers share.hpp Source File

share.hpp

00001 #ifndef SHARE_H_INCLUDED
00002 #define SHARE_H_INCLUDED
00003 
00004 #include "mbed.h"
00005 
00006 /* 共通のパラメタ類をマクロで定義 */
00007 
00008 #define PREDICT_LENGTH        (4)               // 予測系列長
00009 #define PREDICT_INTERVAL_TIME (1 * 60 * 60 * 1000)     // 予測間隔 : 1h
00010 #define LEN_DATA_SEQUENCE     (50)              // 観測データの履歴長
00011 #define NUM_WEATHERS          (4)               // 気候の種類
00012 #define DIM_SIGNAL            (3)               // 信号の次元(=センサの数)
00013 #define MCSVM_NUM_SAMPLES     (120)             // MCSVMのサンプル数
00014 #define MAX_LOG_LENGTH        (1000)            // 観測データファイルの最大行数(これをこえるとやばい値)
00015 #define SUITABLE_LOG_LENGTH   (500)             // 切り詰め後の最適なデータファイルの行数
00016 
00017 #define BUF_SIZE              (100)             // fprintfの時などに使われる文字列バッファの長さ
00018 
00019 /*
00020 #ifdef DEFAULT_STACK_SIZE
00021 #undef DEFAULT_STACK_SIZE 
00022 #define DEFAULT_STACK_SIZE ((WORDS_STACK_SIZE*4) * 2.25)
00023 #endif */ /* DEFAULT_STACK_SIZE */
00024 
00025 
00026 #ifdef OS_MAINSTKSIZE
00027 #undef OS_MAINSTKSIZE
00028 #define OS_MAINSTKSIZE (DEFAULT_STACK_SIZE*8)
00029 #endif /* OS_STKSIZE */
00030 
00031 #define OS_STKCHECK     // スタックオーバーフローの監視
00032 
00033 #ifdef BUFSIZ
00034 #undef BUFSIZ
00035 #define BUFSIZ (512)
00036 #endif /* BUFSIZ */
00037 
00038 #define SEQUENCE_DATA_NAME    "/local/SEQ_DAT.CSV"     // 系列データのファイル名
00039 #define PREDICT_DATA_NAME     "/local/PRE_DAT.CSV"     // 予測データのファイル名
00040 
00041 // 気候のインデックス
00042 typedef enum {
00043     TEMPERATURE  = 0,   // 気温
00044     AIR_PRESSURE = 1,   // 気圧
00045     HUMIDITY     = 2,   // 湿度
00046 } WEATHER_ID;
00047 
00048 // 天候を表す列挙型
00049 typedef enum {
00050     SHINY  = 0,  // 晴れ
00051     CLOUDY = 1,  // 曇
00052     RAINY  = 2,  // 雨
00053     SNOWY  = 3,  // 雪
00054 } WEATHER_STATUS;
00055 
00056 #endif /* SHARE_H_INCLUDED */