truetime-1.3
所属分类:网络编程
开发工具:matlab
文件大小:917KB
下载次数:3
上传日期:2010-01-24 21:21:12
上 传 者:
realli
说明: truetime 1.3工具箱,实现网络编程。。。
(truetime 1.3 toolbox)
文件列表:
truetime-1.3\docs\manual.pdf (875700, 2005-06-28)
truetime-1.3\examples\distributed\c++\actuator_init.cpp (1133, 2005-05-30)
truetime-1.3\examples\distributed\c++\controller_init.cpp (2336, 2004-09-13)
truetime-1.3\examples\distributed\c++\distributed.mdl (32592, 2005-05-30)
truetime-1.3\examples\distributed\c++\interference_init.cpp (957, 2004-09-13)
truetime-1.3\examples\distributed\c++\make.m (334, 2005-06-28)
truetime-1.3\examples\distributed\c++\sensor_init.cpp (1064, 2004-09-22)
truetime-1.3\examples\distributed\matlab\actcode.m (178, 2003-06-24)
truetime-1.3\examples\distributed\matlab\actuator_init.m (487, 2004-09-13)
truetime-1.3\examples\distributed\matlab\controller_init.m (967, 2004-09-13)
truetime-1.3\examples\distributed\matlab\ctrlcode.m (415, 2004-02-23)
truetime-1.3\examples\distributed\matlab\distributed.mdl (32566, 2005-06-21)
truetime-1.3\examples\distributed\matlab\dummycode.m (125, 2002-11-01)
truetime-1.3\examples\distributed\matlab\interfcode.m (218, 2005-06-21)
truetime-1.3\examples\distributed\matlab\interference_init.m (497, 2004-09-13)
truetime-1.3\examples\distributed\matlab\msgRcvActuator.m (94, 2004-08-19)
truetime-1.3\examples\distributed\matlab\msgRcvCtrl.m (90, 2004-08-19)
truetime-1.3\examples\distributed\matlab\msgRcvInterf.m (85, 2004-09-13)
truetime-1.3\examples\distributed\matlab\msgRcvSensor.m (111, 2003-08-06)
truetime-1.3\examples\distributed\matlab\senscode.m (250, 2005-01-18)
truetime-1.3\examples\distributed\matlab\sensor_init.m (540, 2004-09-13)
truetime-1.3\examples\motes\code.m (3030, 2005-06-23)
truetime-1.3\examples\motes\init.m (469, 2005-06-02)
truetime-1.3\examples\motes\moteanimation.m (4249, 2005-06-27)
truetime-1.3\examples\motes\motes.mdl (45775, 2005-06-22)
truetime-1.3\examples\motes\msgRcv.m (130, 2005-06-02)
truetime-1.3\examples\motes\node_init.m (821, 2005-06-02)
truetime-1.3\examples\overrun\hdlcode.m (255, 2004-08-23)
truetime-1.3\examples\overrun\overrun.mdl (13148, 2005-05-30)
truetime-1.3\examples\overrun\overrun_init.m (1052, 2005-06-21)
truetime-1.3\examples\overrun\pidcalc.m (281, 2004-08-19)
truetime-1.3\examples\overrun\pidcode.m (396, 2004-08-19)
truetime-1.3\examples\simple_pid\c++\controller.mdl (12393, 2003-10-23)
truetime-1.3\examples\simple_pid\c++\servo.mdl (13092, 2005-06-21)
truetime-1.3\examples\simple_pid\c++\servo_init.cpp (5114, 2004-09-13)
truetime-1.3\examples\simple_pid\matlab\blockcode.m (277, 2004-09-13)
truetime-1.3\examples\simple_pid\matlab\controller.mdl (12393, 2003-10-23)
... ...
-----------------------------------------------
TrueTime version 1.3
Example: Control and Coordination of Mobile Motes
Directory: $DIR/examples/motes
-----------------------------------------------
1. INTRODUCTION
This example shows how to visualise the movements of dynamically
moving motes using the built in functionality of Matlab. The example
consists of three motes, with dynamics in the "x" and "y" directions
modeled using simple integrators. The motes are sent out on a mission
which consists of visiting a number of checkpoints, seen as red marks
in the animation window. In the window, the transmission range of the
motes can be seen as large partly transparent coloured circles around
the smaller coloured motes. The checkpoints should be visited at least
once by some node in the group. When the motes are able to
communicate, they tell each other where they are heading and share
information on which nodes that have been visited by the group. When a
checkpoint has been visited it changes colour from green to red.
2. COMPILING THE SIMULATION FILES
2.1 Configuring the TrueTime Environment
Before starting Matlab, you must set the environment variable
TTKERNEL to point to the directory with the TrueTime kernel files:
Unix/Linux: > export TTKERNEL=$DIR/kernel
Windows: Control Panel / System / Advanced / Environment Variables
Then add the following lines to your MATLAB startup script. This
will set up all necessary paths to the TrueTime kernel files.
addpath(getenv('TTKERNEL'))
init_truetime;
2.2 Compilation
As described in the reference manual it is possible to write a
TrueTime simulation (i.e. the code functions for the tasks and the
initialization commands) either as m-files or as C++ functions. For
this example only the m-file approach is provided.
TrueTime in the MATLAB version is compiled once and for all
by running the command make_truetime from the command prompt.
This should be done the first time you are using TrueTime and
no further compilation is then required.
3. SIMULATIONS
Open the model motes.mdl to run the simulation.
- Run init.m to set up the data structures before you run the simulation.
- Run the simulation to see the animation. If you are interested in building
your own custom animation, look at the file moteanimation.m where the
"patch" command is used to paint the initial picture of every mote. These
pictures are then moved with the "set" command using the "XData" and "YData"
parameters.
近期下载者:
相关文件:
收藏者: