00001 #ifndef _WINC_STORMATTR
00002 #define _WINC_STORMATTR
00003
00004 #include <WXP/Const.h>
00005
00006 namespace WXP {
00007 struct StormAttr {
00008 int type;
00009 char id[4];
00010 float ang;
00011 float rad;
00012 int tvs;
00013 int meso;
00014 int hail;
00015 int shail;
00016 float hsize;
00017 float vil;
00018 float max_dbz;
00019 float max_dbz_z;
00020 float vlow;
00021 float tops;
00022 float dir;
00023 float spd;
00024 float mw_vol;
00026 StormAttr();
00027 int init();
00028 int checkType( const char *str );
00029 int decode( const char *str );
00030 inline bool isValid(){ return ang != Const::MISS; };
00031 inline int getType(){ return type; };
00032 inline const char *getId(){ return id; };
00033 inline float getAng(){ return ang; };
00034 inline float getRad(){ return rad; };
00035 inline int getTvs(){ return tvs; };
00036 inline int getMeso(){ return meso; };
00037 inline int getHail(){ return hail; };
00038 inline int getSHail(){ return shail; };
00039 inline float getHSize(){ return hsize; };
00040 inline float getVil(){ return vil; };
00041 inline float getMaxDbz(){ return max_dbz; };
00042 inline float getMaxDbzZ(){ return max_dbz_z; };
00043 inline float getVLow(){ return vlow; };
00044 inline float getTops(){ return tops; };
00045 inline float getDir(){ return dir; };
00046 inline float getSpd(){ return spd; };
00047 inline float getMWVol(){ return mw_vol; };
00048 int print();
00049 };
00050
00051 }
00052 #endif