00001 /* -*- mode:c++ -*- ******************************************************** 00002 * file: MoBANLocal.h 00003 * 00004 * author: Majid Nabi <m.nabi@tue.nl> 00005 * 00006 * http://www.es.ele.tue.nl/nes 00007 * 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: Implementation of the local module of the MoBAN mobility model 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 #include <BaseMobility.h> 00045 #include "MoBANBBItem.h" 00046 00058 class MoBANLocal : public BaseMobility 00059 { 00060 protected: 00061 00063 Coord referencePoint; 00064 00066 double radius; 00067 00069 double speed; 00070 00074 Coord stepSize; 00076 int numSteps; 00078 int step; 00082 Coord targetPos; 00083 00085 Coord stepTarget; 00086 00088 int catRefMove; 00089 00090 public: 00091 00093 virtual void initialize(int); 00094 00095 protected: 00096 00098 virtual void makeMove(); 00099 00101 virtual void setTargetPosition(); 00102 00104 virtual void receiveBBItem(int category, const BBItem *details, int scopeModuleId); 00105 00107 Coord insideWorld(Coord apoint); 00108 00109 00110 };