00001 /* -*- mode:c++ -*- ******************************************************** 00002 * file: Posture.h 00003 * 00004 * author: Majid Nabi <m.nabi@tue.nl> 00005 * 00006 * 00007 * http://www.es.ele.tue.nl/nes 00008 * 00009 * copyright: (C) 2010 Electronic Systems group(ES), 00010 * Eindhoven University of Technology (TU/e), the Netherlands. 00011 * 00012 * 00013 * This program is free software; you can redistribute it 00014 * and/or modify it under the terms of the GNU General Public 00015 * License as published by the Free Software Foundation; either 00016 * version 2 of the License, or (at your option) any later 00017 * version. 00018 * For further information see file COPYING 00019 * in the top level directory 00020 *************************************************************************** 00021 * part of: MoBAN (Mobility Model for wireless Body Area Networks) 00022 * description: A class to store the specification of a posture 00023 *************************************************************************** 00024 * Citation of the following publication is appreciated if you use MoBAN for 00025 * a publication of your own. 00026 * 00027 * M. Nabi, M. Geilen, T. Basten. MoBAN: A Configurable Mobility Model for Wireless Body Area Networks. 00028 * In Proc. of the 4th Int'l Conf. on Simulation Tools and Techniques, SIMUTools 2011, Barcelona, Spain, 2011. 00029 * 00030 * BibTeX: 00031 * @inproceedings{MoBAN, 00032 * author = "M. Nabi and M. Geilen and T. Basten.", 00033 * title = "{MoBAN}: A Configurable Mobility Model for Wireless Body Area Networks.", 00034 * booktitle = "Proceedings of the 4th Int'l Conf. on Simulation Tools and Techniques.", 00035 * series = {SIMUTools '11}, 00036 * isbn = {978-963-9799-41-7}, 00037 * year = {2011}, 00038 * location = {Barcelona, Spain}, 00039 * publisher = {ICST} } 00040 * 00041 **************************************************************************/ 00042 00043 00044 00045 #include <string.h> 00046 #include <BaseWorldUtility.h> 00047 00056 class Posture { 00057 protected: 00058 00060 unsigned int numNodes; 00061 00063 unsigned int postureID; 00064 00066 Coord* nodePs; 00067 00070 char posture_name[50]; 00071 00074 double** alphaMean; 00075 00078 double** alphaSD; // Standard deviation of alpha 00079 00081 double* nodeRadius; 00082 00084 double* nodeSpeed; 00085 00087 double postureMaxSpeed; 00088 00090 double postureMinSpeed; 00091 00092 public: 00093 00095 Posture(unsigned int , unsigned int ); 00096 00098 bool setPostureName(char *); 00099 00101 bool setPostureSpeed(double, double); 00102 00104 bool setRadius(unsigned int, double); 00105 00107 bool setSpeed(unsigned int, double); 00108 00110 bool setPs(unsigned int , Coord ); 00111 00113 bool setAlphaMean(unsigned int , unsigned int, double); 00114 00116 bool setAlphaSD(unsigned int , unsigned int , double); 00117 00119 bool isMobile(); 00120 00121 00123 int getPostureID(); 00124 00126 char* getPostureName(); 00127 00129 double getMaxSpeed(); 00130 00132 double getMinSpeed(); 00133 00135 double getRadius(unsigned int); 00136 00138 double getSpeed(unsigned int); 00139 00141 Coord getPs(unsigned int ); 00142 00144 double getAlphaMean(unsigned int , unsigned int); 00145 00147 double getAlphaSD(unsigned int , unsigned int); 00148 00149 };